Compare commits

..
38 Commits
Author SHA1 Message Date
MysteriousAges bf57ac3491 Lang & changelog. Version ++. 2013-04-11 23:10:40 -07:00
MysteriousAges e8421f40fe New bees, EE3 "integration". Nuggets, Frames. 2013-04-11 23:08:17 -07:00
MysteriousAges b8d12b1f9a Lots of new bees, pulling out most dependencies on Thaumcraft 3 into helper; making it possible to run without. 2013-04-11 02:40:25 -07:00
MysteriousAges 1476470054 More work on Bee Jar. 2013-04-02 20:02:09 -07:00
MysteriousAges 89fb41b814 Flammability configuration option; start of effect jar 2013-03-28 09:21:00 -07:00
MysteriousAges f44591b47d Removing Apiary junk FOREVERZ. (Not really; moved to branch.)
Purify + Node growth? Fuck you. You die here.
2013-03-26 00:00:58 -07:00
MysteriousAges fd82a0ef72 Fixing things, and adding balance to grafter. 2013-03-24 13:34:17 -07:00
MysteriousAges cbbf2558fd Merge branch 'master' of bitbucket.org:MysteriousAges/thaumicbees 2013-03-13 19:53:53 -07:00
MysteriousAges 76f541bc3f Exdending length of come bee effects
Adding hunger-inducing to grafter
Adding Greatwood & Silverwood log planks
Fixing more Version Info shit.
2013-03-13 19:53:39 -07:00
MysteriousAges 7f95da0f6c Implementing some functions for Apiary. I think it might get shelved for now... 2013-03-13 17:39:54 -07:00
MysteriousAges 3798f1f771 Version really should be the ant variable. 2013-03-06 20:59:55 -08:00
MysteriousAges 721a60c994 Holy fuck that was a mess. 2013-03-06 20:44:06 -08:00
MysteriousAges 4a03a5f48c Revert "Merge branch 'machineDev' of https://bitbucket.org/MysteriousAges/thaumicbees into machineDev"
This reverts commit c6720b7417, reversing
changes made to 575c799587.
2013-03-06 19:44:01 -08:00
MysteriousAges c6720b7417 Merge branch 'machineDev' of https://bitbucket.org/MysteriousAges/thaumicbees into machineDev 2013-03-06 19:36:14 -08:00
MysteriousAges 575c799587 Revert "Revert "Merge from master.""
This reverts commit 2c324174e4.
2013-03-06 19:33:09 -08:00
MysteriousAges 2c324174e4 Revert "Merge from master."
This reverts commit e92d9c131e.
2013-03-06 19:30:43 -08:00
MysteriousAges 28f5a15f0a Merge branch 'master' of https://github.com/MysteriousAges/ThaumicBees-Loc 2013-03-06 16:48:31 -08:00
MysteriousAges 9bed2d3749 Fixing problems with grafter not enchanting; version checking. 2013-03-06 13:42:57 -08:00
MysteriousAges 1a394ce858 Changelog. 2013-03-05 18:09:50 -08:00
MysteriousAges 5d3bd8bde2 Adjusting version info to match format Version checking supports. Better fix would be to add support in version checking. 2013-03-05 18:08:53 -08:00
MysteriousAges 5279a6e64a Update to 1.4.3 2013-03-05 01:06:29 -08:00
MysteriousAges 2c2306b223 Adding aspects for Extra Bees items
Adding support for remote version checking! Wahoo!
2013-03-05 00:57:31 -08:00
MysteriousAges 8aaa24c3c1 Adding new keys. 2013-03-04 14:08:42 -08:00
MysteriousAges e32c05ab3e Merge branch 'machineDev'
Conflicts:
	thaumicbees_src/thaumicbees/main/Config.java

Deleting block classes from this branch, because GO AWAY.
2013-03-04 13:18:15 -08:00
MysteriousAges f21bd467c2 Uncommenting blocks in Config. 2013-03-04 13:10:21 -08:00
MysteriousAges d3e93188c0 Edits to build.xml & mod info. 2013-03-04 13:09:50 -08:00
MysteriousAges e92d9c131e Merge from master. 2013-03-04 13:04:21 -08:00
MysteriousAges 1bee56adf3 Die, build.number. You don't need to be tracked. 2013-03-04 13:03:15 -08:00
MysteriousAges 85a2723ef8 Checkin before moving Apiary stuff to branch. 2013-03-04 13:02:15 -08:00
MysteriousAges 29069e7e9f Grafter & Scoop~! 2013-03-03 23:50:29 -08:00
MysteriousAges c8be483bf0 Merge branch 'master' of bitbucket.org:MysteriousAges/thaumicbees
Conflicts:
	thaumicbees_src/thaumicbees/main/Config.java
2013-02-27 19:29:18 -08:00
MysteriousAges 92ace4e9a3 Scoop work. 2013-02-27 17:49:32 -08:00
MysteriousAges aed979a19f dev 2013-02-26 17:56:57 -08:00
MysteriousAges 0fa9a6ed23 New capsule, more refactoring. More research. More config options for capsule stack size 2013-02-22 16:14:17 -08:00
MysteriousAges b3660ecf58 Removing build number from repo. 2013-02-18 12:37:37 -08:00
MysteriousAges 5eb787352b Planks & Refactoring. 2013-02-18 12:13:31 -08:00
MysteriousAges a7774e1fca Loc problems getting fixed. 2013-02-15 13:00:30 -08:00
MysteriousAges 596ae798ec Initial commit. en_US only. 2013-02-12 17:34:33 -08:00
65 changed files with 3671 additions and 1052 deletions

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
#Build Number for ANT. Do not edit!
#Sat Feb 09 14:11:48 PST 2013
build.number=114
+18 -13
View File
@@ -17,7 +17,7 @@
<property name="mc.version" value="1.4.7"/> <property name="mc.version" value="1.4.7"/>
<property name="forge.version" value="6.6.0.507"/> <property name="forge.version" value="6.6.0.507"/>
<property name="thaumicbees.version" value="1.3.0"/> <property name="thaumicbees.version" value="1.4.4"/>
<!-- for local deployment only, not used by main --> <!-- for local deployment only, not used by main -->
<property name="deploy.type" value="previews" /> <property name="deploy.type" value="previews" />
@@ -74,13 +74,14 @@
<include name="thaumcraft/**" /> <include name="thaumcraft/**" />
</fileset> </fileset>
<fileset dir="${src.dir}/thaumicbees_src"> <fileset dir="${src.dir}/thaumicbees_src">
<include name="**/net/mysteriousages/**" />
<include name="**/thaumicbees/**" /> <include name="**/thaumicbees/**" />
<include name="**/forestry/**" /> <include name="**/forestry/**" />
</fileset> </fileset>
</copy> </copy>
<copy todir="${clientsrc.dir}" overwrite="true" failonerror="true"> <copy todir="${clientsrc.dir}" overwrite="true" failonerror="true">
<fileset dir="${src.dir}/thaumicbees_src"> <fileset dir="${src.dir}/thaumicbees_src">
<include name="**/VersionInfo.java" /> <include name="**/VersionInfo.java" />
</fileset> </fileset>
<filterset> <filterset>
@@ -88,7 +89,6 @@
<filter token="VERSION" value="${thaumicbees.version}" /> <filter token="VERSION" value="${thaumicbees.version}" />
<filter token="BUILD_NUMBER" value="${build.number}" /> <filter token="BUILD_NUMBER" value="${build.number}" />
<filter token="FINGERPRINT" value="${key.fingerprint}" /> <filter token="FINGERPRINT" value="${key.fingerprint}" />
<filter token="MODVERSION" value="${thaumicbees.version} - ${build.number}" />
</filterset> </filterset>
</copy> </copy>
@@ -118,12 +118,14 @@
<!-- Copy classes --> <!-- Copy classes -->
<copy todir="${classes.dir}/client"> <copy todir="${classes.dir}/client">
<fileset dir="${mcp.dir}/reobf/minecraft"> <fileset dir="${mcp.dir}/reobf/minecraft">
<include name="**/thaumicbees/**" />
<include name="**/forestry/plugins/**" />
<exclude name="forestry/api/**" /> <exclude name="forestry/api/**" />
<exclude name="thaumcraft/**" />
<include name="**/thaumicbees/**" />
<include name="**/net/mysteriousages/**" />
<include name="**/thaumcraft/api/IVisRepairable.class" />
<include name="**/thaumcraft/api/EnumTag.class" />
<include name="**/thaumcraft/api/ObjectTags.class" />
</fileset> </fileset>
</copy> </copy>
@@ -134,12 +136,15 @@
<exclude name="build.number"/> <exclude name="build.number"/>
</fileset> </fileset>
</copy> </copy>
<!-- Copy localizations (We have none yet.) -->
<!--<copy todir="${classes.dir}/client"> <copy todir="${classes.dir}/client" overwrite="true" failonerror="true">
<fileset dir="${lang.dir}"> <fileset dir="${src.dir}/thaumicbees_res">
<exclude name="README.md"/> <include name="**/mcmod.info" />
</fileset> </fileset>
</copy>--> <filterset>
<filter token="MODVERSION" value="${thaumicbees.version} - ${build.number}" />
</filterset>
</copy>
</target> </target>
<!-- Package the jars --> <!-- Package the jars -->
+81
View File
@@ -1,3 +1,84 @@
Made greatwood & silverwood planks fireproof by default - added a config option to toggle it.
Added Nuggets - Iron, Copper, Tin, Silver, Lead. Should craft into 1st ore dictionary ingot of appropriate type.
Added Shards - Diamond, Emerald.
Added 15 new bees. Have fun~ <3
Added Equivalent Exchange 3 compatability! (It's 1 thing, don't get terribly excited.)
New frame type! Search Strongholds for them.
1.4.3c
Thaumium Grafter now doubles your chance to get Greatwood & Silverwood saplings.
Thaumium Grafter now takes extra damage when trying to break Greatwood & Silverwood leaves.
Thaumium Grafter now has a balancing feature when repairing.
Extra... uh. "Enhancements". =D
1.4.3b
Greatwood & Silverwood planks support BuildCraft facades.
Tweaking Aura cost for Repair on Thaumium Grafters and other balance.
Turns out I can't get the version crap to work properly. More fixes.
1.4.3a
Changed Version info embedded in mod to match format supported by Version checking. Will need to make this more robust in the future.
Fixed bug with Thaumium Grafter not being enchantable.
1.4.3
Added automatic version-checking for ThaumicBees! From this version on, when a new version becomes available, it will notify you in-game. Notifications can be switched off via a config file option.
Fixed missing aspects on Extra Bees combs.
1.4.2
Added Void Capsules - hold up to 8 buckets of liquid with one! It's a waterproof bag of holding! Plus stacking.
Fix: Added Greatwood & Silverwood slabs to the ore dictionary so they should work as normal.
Added Thaumium Scoop - 30 uses, can be enchanted with Repair.
Added Thaumium Grafter - 15 uses, can be enchanted with Repair.
1.4.1
Added Greatwood and Silverwood planks. Since Greatwood and Silverwood are tougher than other trees, you'll need some extra machinery. To obtain these, jam a log of the appropriate tree into a Forestry carpenter and provide a half bucket of water.
Added slabs for the new planks also.
1.4.0a
Fixed some issues with the Node bee's effect.
1.4.0
New branch of bees containing 3 new species. A new type of frame!
Thaumaturge's Backpack now require Amber rather than Gold Nuggets.
Due to popular complaint, the Bees & Magic node now requires Unified Thaumic Field Theory to unlock.
Moving all kinds of string contstants out of code into Localization files.
Also fixed crazy aspects showing up on things that shouldn't have those aspects.
ACTUALLY fixed issue with untyped node mutations failing.
1.3.0d
Fixed an issue with mutations requiring a non-specific type of node to fail.
1.3.0c
Discovered a function call that will crash dedicated servers. If you are running ThuamicBees on a server, please update to this revision.
1.3.0b
Fixed a problem with capsules not being registered with the Forge Liquid Dictionary. You should be able to use them just about everywhere, now.
Fixed the issue with certain items appearing twice in Creative Mode tabs.
1.3.0a
Some bug fixes, including uncommenting some mutation-related code, research tweaking.
Added the last bee for a long while, probably. Good luck getting it.
Common TB crashes stemming from Forestry issues should now be reported a little better, especially the backpack registration & item texture file related things. Errors should appear in your log, so make sure you read the log before you report the error here. It could be something silly on your end that is causing the crash.
1.3.0
3 new species of bee: Vis, Pure, and Flux! Each requires an aura node nearby, and may have some side-effects...
New Thaumcraft research! Open up your Thaumanomicon to see it.
New Apiary Frames! They run off magic, confers bees with bonuses, and may have an impact outside of your apiary...
1.2.705B - Replaced 1.2.705
Fixed issue with bad Mutation class, allowing pure bees to turn into any bee that involves them in a mutation.
Also ACTUALLY fixed issue with Extra Bees loading after ThaumicBees on *nix-based systems.
1.2.705
*Stealth update: Fixed an issue with TB loading before Extra Bees, resulting in some Null Pointers getting passed and choked on. If you get this issue, please re-download 1.2.705. No other changes were made in this version.
*8 new species of bees, including "Praecantatio", which, like the other Elemental bees, may contain Vis shards in its propolis. Some of the new species may also have extra evil involved, so be ready for anything.
*Extra integration with Extra Bees! Mutations for some of the new bees. If Extra Bees is present, their mutations will require EB species rather than the base Forestry species.
*Changed the "Charmed" mutation to avoid conflicting with Extra Bees. (Binnie already had one there, so mine got moved.)
*New bee branch, similar to Extra Bees's mob spawning bees.
*One new bee from a new branch, the rest of which will come once Azanor releases the Thaumcraft API.
1.1.702-67 - Replaced 1.1.702-62 1.1.702-67 - Replaced 1.1.702-62
Additional Magic Capsules, featuring ExtraBees liquids, and RailCraft Creosote & Steam. (Yes, steam capsules. It's magic. That's how. :P) Additional Magic Capsules, featuring ExtraBees liquids, and RailCraft Creosote & Steam. (Yes, steam capsules. It's magic. That's how. :P)
Tagged additional Forestry items with Thaumcraft aspects. Tagged additional Forestry items with Thaumcraft aspects.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 53 KiB

+68 -16
View File
@@ -3,8 +3,14 @@
<properties version="1.0"> <properties version="1.0">
<!-- Item names --> <!-- Item names -->
<entry key="item.jellyBabies.name">Handful of Jelly Babies</entry> <entry key="item.jellyBabies.name">Handful of Jelly Babies</entry>
<entry key="item.tb.thaumiumScoop.name">Thaumium Scoop</entry>
<entry key="item.tb.thaumiumGrafter.name">Thaumium Grafter</entry>
<!-- Block names --> <!-- Block names -->
<entry key="tile.tb.planks.greatwood.name">Greatwood Planks</entry>
<entry key="tile.tb.slab.wood.greatwood.name">Greatwood Slab</entry>
<entry key="tile.tb.planks.silverwood.name">Silverwood Planks</entry>
<entry key="tile.tb.slab.wood.silverwood.name">Silverwood Slab</entry>
<!-- Comb names --> <!-- Comb names -->
<entry key="tb.comb.occult">Occult Comb</entry> <entry key="tb.comb.occult">Occult Comb</entry>
@@ -18,9 +24,11 @@
<entry key="tb.comb.magic">Infused Comb</entry> <entry key="tb.comb.magic">Infused Comb</entry>
<entry key="tb.comb.aware">Memory Comb</entry> <entry key="tb.comb.aware">Memory Comb</entry>
<entry key="tb.comb.furtive">Furtive Comb</entry> <entry key="tb.comb.furtive">Furtive Comb</entry>
<entry key="tb.comb.soul">Soul Comb</entry>
<!-- Wax names --> <!-- Wax names -->
<entry key="tb.wax.magic">Magic Wax</entry> <entry key="tb.wax.magic">Magic Wax</entry>
<entry key="tb.wax.soul">Soulful Wax</entry>
<!-- Drop names --> <!-- Drop names -->
<entry key="tb.drop.enchanting">Enchanting Drop</entry> <entry key="tb.drop.enchanting">Enchanting Drop</entry>
@@ -28,6 +36,16 @@
<!-- Pollen names --> <!-- Pollen names -->
<entry key="tb.pollen.unusual">Unusual Pollen</entry> <entry key="tb.pollen.unusual">Unusual Pollen</entry>
<entry key="tb.pollen.phased">Phased Pollen</entry>
<!-- Nugget names -->
<entry key="tb.nugget.iron">Iron Nugget</entry>
<entry key="tb.nugget.copper">Copper Nugget</entry>
<entry key="tb.nugget.tin">Tin Nugget</entry>
<entry key="tb.nugget.silver">Silver Nugget</entry>
<entry key="tb.nugget.lead">Lead Nugget</entry>
<entry key="tb.nugget.diamond">Diamond Nugget</entry>
<entry key="tb.nugget.emerald">Emerald Nugget</entry>
<!-- Propolis names --> <!-- Propolis names -->
<entry key="tb.propolis.dull">Dull Propolis</entry> <entry key="tb.propolis.dull">Dull Propolis</entry>
@@ -50,9 +68,11 @@
<entry key="tb.frame.metabolic">Metabolic Frame</entry> <entry key="tb.frame.metabolic">Metabolic Frame</entry>
<entry key="tb.frame.necrotic">Necrotic Frame</entry> <entry key="tb.frame.necrotic">Necrotic Frame</entry>
<entry key="tb.frame.temporal">Temporal Frame</entry> <entry key="tb.frame.temporal">Temporal Frame</entry>
<entry key="tb.frame.oblivion">Oblivion Frame</entry>
<!-- Capsule names --> <!-- Capsule names -->
<entry key="tb.capsule.magic">Magic Capsule</entry> <entry key="tb.capsule.magic">Magic Capsule</entry>
<entry key="tb.capsule.void">Void Capsule</entry>
<!-- Liquids --> <!-- Liquids -->
<entry key="tb.liquid.">Empty</entry> <entry key="tb.liquid.">Empty</entry>
@@ -128,6 +148,8 @@
<entry key="thaumicbees.speciesFlux.description">"I thought they would help clean up, but it only makes things worse!"|Kreicus, Apprentice Thaumaturge</entry> <entry key="thaumicbees.speciesFlux.description">"I thought they would help clean up, but it only makes things worse!"|Kreicus, Apprentice Thaumaturge</entry>
<entry key="thaumicbees.speciesNode">Node</entry> <entry key="thaumicbees.speciesNode">Node</entry>
<entry key="thaumicbees.speciesNode.description">Having undergone a freak mutation, these bees now attract magic to them.|Apinomicon</entry> <entry key="thaumicbees.speciesNode.description">Having undergone a freak mutation, these bees now attract magic to them.|Apinomicon</entry>
<entry key="thaumicbees.speciesRejuvenating">Rejuvenating</entry>
<entry key="thaumicbees.speciesRejuvenating.description">The hum of the hive is magical, and over time is absorbed by nearby nodes.|Apinomicon</entry>
<entry key="thaumicbees.speciesSkulking">Skulking</entry> <entry key="thaumicbees.speciesSkulking">Skulking</entry>
<entry key="thaumicbees.speciesSkulking.description">These bees have become xenophobic and bad-tempered. Use caution.|Apinomicon</entry> <entry key="thaumicbees.speciesSkulking.description">These bees have become xenophobic and bad-tempered. Use caution.|Apinomicon</entry>
<entry key="thaumicbees.speciesBrainy">Brainy</entry> <entry key="thaumicbees.speciesBrainy">Brainy</entry>
@@ -139,20 +161,50 @@
<entry key="thaumicbees.speciesBatty">Batty</entry> <entry key="thaumicbees.speciesBatty">Batty</entry>
<entry key="thaumicbees.speciesBatty.description">They tend to attract bats to their hives through means unknown.|Apinomicon</entry> <entry key="thaumicbees.speciesBatty.description">They tend to attract bats to their hives through means unknown.|Apinomicon</entry>
<entry key="thaumicbees.speciesGhastly">Ghastly</entry> <entry key="thaumicbees.speciesGhastly">Ghastly</entry>
<entry key="thaumicbees.speciesGhastly.description">"*sigh*... Really, Myst?"|Taveria</entry> <entry key="thaumicbees.speciesGhastly.description">"*sigh*... Really, Myst?"|Taveria, irritated Apiarist</entry>
<entry key="thaumicbees.speciesTimely">Timely</entry> <entry key="thaumicbees.speciesTimely">Timely</entry>
<entry key="thaumicbees.speciesTimely.description">"An apiarist is never late. He arrives precicely when he means to!"|Sengir, Mad Apiarist</entry> <entry key="thaumicbees.speciesTimely.description">"An apiarist is never late. He arrives precisely when he means to!"|Sengir, Mad Apiarist</entry>
<entry key="thaumicbees.speciesLordly">Lordly</entry> <entry key="thaumicbees.speciesLordly">Lordly</entry>
<entry key="thaumicbees.speciesLordly.description">They live in peace, within the sight of the Eye of Harmony|Tattered Remains of ancient Apinomicon</entry> <entry key="thaumicbees.speciesLordly.description">They live in peace, within the sight of the Eye of Harmony|Tattered Remains of ancient Apinomicon</entry>
<entry key="thaumicbees.speciesDoctoral">Doctoral</entry> <entry key="thaumicbees.speciesDoctoral">Doctoral</entry>
<entry key="thaumicbees.speciesDoctoral.description">"Would you like a Jelly Baby?"|Passing stranger with a great scarf and a blue box</entry> <entry key="thaumicbees.speciesDoctoral.description">"Would you like a Jelly Baby?"|Passing stranger with a great scarf and a blue box</entry>
<entry key="thaumicbees.speciesMinium">Minium</entry>
<entry key="thaumicbees.speciesMinium.description">"They're the least of your concern. Like, the Minium concern! ... get it?"|MysteriousAges, Former Comedian</entry>
<entry key="thaumicbees.speciesSpirit">Spirit</entry>
<entry key="thaumicbees.speciesSpirit.description">It is said these bees are able to contact the dead.|Apinomicon</entry>
<entry key="thaumicbees.speciesSoul">Soul</entry>
<entry key="thaumicbees.speciesSoul.description">"The Dread Pirate Roberts has come for your SOOOOOOULS!"|Dread Pirate Roberts</entry>
<entry key="thaumicbees.speciesIron">Iron</entry>
<entry key="thaumicbees.speciesIron.description">Having absorbed some of the base metal, these bees can concentrate the essence of iron from the region.|Apinomicon</entry>
<entry key="thaumicbees.speciesGold">Gold</entry>
<entry key="thaumicbees.speciesGold.description"></entry>
<entry key="thaumicbees.speciesCopper">Copper</entry>
<entry key="thaumicbees.speciesCopper.description"></entry>
<entry key="thaumicbees.speciesTin">Tin</entry>
<entry key="thaumicbees.speciesTin.description"></entry>
<entry key="thaumicbees.speciesSilver">Silver</entry>
<entry key="thaumicbees.speciesSilver.description"></entry>
<entry key="thaumicbees.speciesLead">Lead</entry>
<entry key="thaumicbees.speciesLead.description"></entry>
<entry key="thaumicbees.speciesDiamond">Diamond</entry>
<entry key="thaumicbees.speciesDiamond.description"></entry>
<entry key="thaumicbees.speciesEmerald">Emerald</entry>
<entry key="thaumicbees.speciesEmerald.description">It is said they have been to a land ruled by a Great Wizard, and have taken the aspect of his city.|Apinomicon</entry>
<entry key="thaumicbees.speciesChicken">Poultry</entry>
<entry key="thaumicbees.speciesChicken.description">"Cluck. Cluck cluck! ... You heard me."|Confused bee</entry>
<entry key="thaumicbees.speciesBeef">Beefy</entry>
<entry key="thaumicbees.speciesBeef.description">"Moo, moo, moo. Wait, what?"|Confused bee</entry>
<entry key="thaumicbees.speciesPork">Porcine</entry>
<entry key="thaumicbees.speciesPork.description">"Oink, oink. Er.... bzzz?"|Confused bee</entry>
<!-- Bee Alleles --> <!-- Bee Alleles -->
<entry key="thaumicbees.effectCurative">Cleansing</entry> <entry key="thaumicbees.effectCurative">Cleansing</entry>
<entry key="thaumicbees.effecteffectDigSpeed">Mining</entry> <entry key="thaumicbees.effecteffectDigSpeed">Mining</entry>
<entry key="thaumicbees.effecteffectMoveSpeed">Swiftness</entry> <entry key="thaumicbees.effecteffectMoveSpeed">Swiftness</entry>
<entry key="thaumicbees.effecteffectSlowSpeed">Time Warp</entry> <entry key="thaumicbees.effecteffectSlowSpeed">Time Warp</entry>
<entry key="thaumicbees.effectNodeGeneration">Aura Attract</entry> <entry key="thaumicbees.effectNodeGeneration">Aura Attract</entry>
<entry key="thaumicbees.effectNodePurify">Purify Aura</entry>
<entry key="thaumicbees.effectNodeFlux">Aura Flux</entry>
<entry key="thaumicbees.effectBrainy">Brainy</entry> <entry key="thaumicbees.effectBrainy">Brainy</entry>
<entry key="thaumicbees.effectBatty">Batty</entry> <entry key="thaumicbees.effectBatty">Batty</entry>
<entry key="thaumicbees.effectWispy">Wispy</entry> <entry key="thaumicbees.effectWispy">Wispy</entry>
@@ -160,31 +212,31 @@
<entry key="tb.bees.flower.book">Books</entry> <entry key="tb.bees.flower.book">Books</entry>
<entry key="tb.bees.flower.magic">Magic Flowers</entry> <entry key="tb.bees.flower.magic">Magic Flowers</entry>
<entry key="tb.bees.flower.node">Node</entry> <entry key="tb.bees.flower.node">Node</entry>
<entry key="tb.bees.flower.nodePure">Purify Node</entry>
<entry key="tb.bees.flower.nodeFlux">Fluxify Node</entry>
<!-- Classifications --> <!-- Classifications -->
<entry key="classification.arcane">Arcane</entry> <entry key="classification.arcane">Arcane</entry>
<entry key="classification.arcane.latin">Arcanus</entry>
<entry key="classification.arcane.description"></entry> <entry key="classification.arcane.description"></entry>
<entry key="classification.supernatural">Supernatural</entry> <entry key="classification.supernatural">Supernatural</entry>
<entry key="classification.supernatural.latin">Coeleste</entry>
<entry key="classification.supernatural.description"></entry> <entry key="classification.supernatural.description"></entry>
<entry key="classification.scholarly">Scholarly</entry> <entry key="classification.scholarly">Scholarly</entry>
<entry key="classification.scholarly.latin">Docto</entry>
<entry key="classification.scholarly.description"></entry> <entry key="classification.scholarly.description"></entry>
<entry key="classification.thaumic">Thaumic</entry> <entry key="classification.thaumic">Thaumic</entry>
<entry key="classification.thaumic.latin">Thaumis</entry>
<entry key="classification.thaumic.description"></entry> <entry key="classification.thaumic.description"></entry>
<entry key="classification.skulking">Skulking</entry> <entry key="classification.skulking">Skulking</entry>
<entry key="classification.skulking.latin">Malevolens</entry>
<entry key="classification.skulking.description"></entry> <entry key="classification.skulking.description"></entry>
<entry key="classification.vis">Vis</entry> <entry key="classification.vis">Aware</entry>
<entry key="classification.vis.latin">Patabilis</entry>
<entry key="classification.vis.description"></entry> <entry key="classification.vis.description"></entry>
<entry key="classification.time">Time</entry> <entry key="classification.time">Time</entry>
<entry key="classification.time.latin">Sempiternus</entry> <entry key="classification.time.description"></entry>
<entry key="classification.time.description"></entry> <entry key="classification.soul">Soulful</entry>
<entry key="classification.soul.description"></entry>
<entry key="classification.alchemical">Alchemical</entry>
<entry key="classification.alchemical.description"></entry>
<entry key="classification.metallic">Metallic</entry>
<entry key="classification.metallic.description"></entry>
<entry key="classification.gem">Gem</entry>
<entry key="classification.gem.description"></entry>
<entry key="classification.fleshy">Fleshy</entry>
<entry key="classification.fleshy.description"></entry>
</properties> </properties>
+2 -1
View File
@@ -1,11 +1,12 @@
[ [
{ {
"modid": "ThaumicBees", "modid": "ThaumicBees",
"version": "@MODVERSION@",
"name": "ThaumicBees", "name": "ThaumicBees",
"url": "http://bit.ly/XFDvLY", "url": "http://bit.ly/XFDvLY",
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.", "description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
"authors": [ "MysteriousAges" ], "authors": [ "MysteriousAges" ],
"credits": "Thanks to Sengir and Azanor for awesome mods! Also thanks to Binnie and Florastar. (:", "credits": "SirSengir, Azanor, Binnie & the Forestry Dev peeps",
"logoFile": "/gfx/thaumicbees/logo.png" "logoFile": "/gfx/thaumicbees/logo.png"
} }
] ]
@@ -99,8 +99,38 @@ Like the Magic Frame, this frame consumes aura to maintain its enchantments. Thi
<longText>You have been seeking a way to significantly extend bee life. It should be possible by adding a frame enchanted with the essence of time to the hive.</longText> <longText>You have been seeking a way to significantly extend bee life. It should be possible by adding a frame enchanted with the essence of time to the hive.</longText>
<page type="text">Keeping bees has been frustrating, as the insects' short lives requires you to manually intervene far too often. <page type="text">Keeping bees has been frustrating, as the insects' short lives requires you to manually intervene far too often.
A new variation of your frame design, this version involving some Time magic, should help extend their lives significantly.</page> A new variation of your frame design, this version involving some Time magic, should help extend their lives significantly. Like the Magic frame, this one too requires aura to run, and will produce flux now and again.</page>
<page type="infusioncrafting">FRAMETIME</page> <page type="infusioncrafting">FRAMETIME</page>
</project> </project>
<project id="VOIDCAPSULE">
<name>Void Capsule</name>
<popupText>Another Dimension of Liquid Storage</popupText>
<longText>It seems reasonable that if you can shift blocks and other matter into an alternate dimension temporarily, you should be able to do something similar with liquids.</longText>
<page type="text">These new capsules can hold the equivalent of 8 buckets' worth of liquid by syphoning off a large quantity into a pocket dimension temporarily.
Like other capsules, they are fragile and are typically single-use. They have proven popular for long-term storage.</page>
<page type="infusioncrafting">VOIDCAPSULE</page>
</project>
<project id="THAUMIUMSCOOP">
<name>Thaumium Scoop</name>
<popupText>Stronger, Faster, Bee-ter</popupText>
<longText>It is possible to improve the durability of the scoop by creating them out of sterner materials. While you're at it, it may be helpful to enable them to be enchanted with restorative magics.</longText>
<page type="text">This improved scoop is more durable than the plain one your non-magical beekeeping friends are liable to use. It is good for three times as long as the average scoop at the cost of using some thaumium instead.
Because the thaumium present in its construction, it is possible to enchant the scoop with a Repairing spell in the usual manner.</page>
<page type="arcanecrafting">THAUMIUMSCOOP</page>
</project>
<project id="THAUMIUMGRAFTER">
<name>Thaumium Grafter</name>
<popupText>The Treesnipper</popupText>
<longText>This improved grafter is more durable than the plain one your non-magical arborist acquaintances tend to use in their exploits. It should be possible to allow them to be enchanted with repairing magic to make them last indefinitely.</longText>
<page type="text">Adding Thaumium to your grafter design has increased its durability significantly - up to two times longer than regular grafters.
It is also possible to enchant them with the Repair enchant, given sufficient experience.</page>
<page type="arcanecrafting">THAUMIUMGRAFTER</page>
</project>
</research> </research>
@@ -0,0 +1,199 @@
package net.mysteriousages.utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
/**
* Provides some common functionality for Inventory clusters. Performs bounds-checking on slot args.
*
* @author MysteriousAges
*
*/
public class GenericInventory implements IInventory
{
private ItemStack[] inventory;
private String name;
private int stackLimit;
public GenericInventory(String inventoryName, int slotCount)
{
this(inventoryName, slotCount, 64);
}
public GenericInventory(String inventoryName, int slotCount, int maxStackSize)
{
this.inventory = new ItemStack[slotCount];
this.name = inventoryName;
this.stackLimit = maxStackSize;
}
@Override
public int getSizeInventory()
{
return this.inventory.length;
}
@Override
public ItemStack getStackInSlot(int slot)
{
ItemStack result = null;
if (this.slotNumberValid(slot))
{
result = this.inventory[slot];
}
return result;
}
@Override
public ItemStack decrStackSize(int slot, int count)
{
ItemStack result = null;
if (this.slotNumberValid(slot))
{
if (this.inventory[slot] != null)
{
result = this.inventory[slot].splitStack(Math.min(count, this.inventory[slot].stackSize));
if (this.inventory[slot].stackSize <= 0)
{
this.inventory[slot] = null;
}
}
}
return result;
}
@Override
public ItemStack getStackInSlotOnClosing(int slot)
{
return this.getStackInSlot(slot);
}
@Override
public void setInventorySlotContents(int slot, ItemStack itemStack)
{
if (this.slotNumberValid(slot))
{
this.inventory[slot] = itemStack;
}
}
@Override
public String getInvName()
{
return this.name;
}
@Override
public int getInventoryStackLimit()
{
return this.stackLimit;
}
public ItemStack[] getInventory()
{
return this.inventory;
}
@Override
public void onInventoryChanged() { }
@Override
public boolean isUseableByPlayer(EntityPlayer player)
{
return true;
}
/**
* Accepts an ItemStack and attempts to merge it with a similar item stack or an empty slot.
* @param stack
* @return Any leftover items, or null if the merge completed successfully.
*/
public ItemStack attemptStackMerge(ItemStack stack)
{
for (int i = 0; i < this.inventory.length; ++i)
{
if (this.inventory[i] == null)
{
this.inventory[i] = stack;
stack = null;
break;
}
else if (this.inventory[i].isItemEqual(stack))
{
int freeSlots = stack.getItem().getItemStackLimit() - this.inventory[i].stackSize;
this.inventory[i].stackSize += freeSlots;
stack.stackSize -= freeSlots;
}
if (stack.stackSize <= 0)
{
stack = null;
break;
}
}
return stack;
}
public void writeToNBT(NBTTagCompound tag)
{
tag.setString("Name", this.name);
tag.setInteger("Size", this.inventory.length);
NBTTagList itemList = new NBTTagList();
for (int i = 0; i < this.inventory.length; ++i)
{
NBTTagCompound itemTag = new NBTTagCompound();
itemTag.setByte("Slot", (byte)i);
this.inventory[i].writeToNBT(itemTag);
itemList.appendTag(itemTag);
}
tag.setTag("Items", itemList);
}
public void readFromNBT(NBTTagCompound tag)
{
this.name = tag.getString("Name");
NBTTagList itemList = tag.getTagList("Items");
int length = tag.getInteger("Size");
this.inventory = new ItemStack[length];
for (int i = 0; i < itemList.tagCount(); ++i)
{
NBTTagCompound item = (NBTTagCompound)itemList.tagAt(i);
int slotId = item.getByte("Slot");
if (slotId >= 0 && slotId < this.inventory.length)
{
this.inventory[slotId] = ItemStack.loadItemStackFromNBT(item);
}
}
}
/**
* Checks to see if the given slot number is valid with the inventory size
* @param slot
* @return True, if slot in [0, inventory size)
*/
protected boolean slotNumberValid(int slot)
{
return slot >= 0 && slot < this.inventory.length;
}
@Override
public void openChest() { }
@Override
public void closeChest() { }
}
@@ -0,0 +1,71 @@
package net.mysteriousages.utils;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
/**
* Provides basic functionality for an owned inventory.
* @author MysteriousAges
*
*/
public class GenericOwnedInventory extends GenericInventory
{
private String ownerName;
private boolean isPublic;
public GenericOwnedInventory(EntityPlayer player, String inventoryName, int slotCount)
{
super(inventoryName, slotCount);
this.setInfo(player);
}
public GenericOwnedInventory(EntityPlayer player, String inventoryName, int slotCount, int maxStackSize)
{
super(inventoryName, slotCount, maxStackSize);
this.setInfo(player);
}
private void setInfo(EntityPlayer player)
{
this.ownerName = player.username;
}
public void setPubliclyAccessible(boolean flag)
{
this.isPublic = flag;
}
public String getOwnerName()
{
return this.ownerName;
}
public boolean isPubliclyAccessible()
{
return this.isPublic;
}
@Override
public boolean isUseableByPlayer(EntityPlayer player)
{
return this.isPublic || this.ownerName.equalsIgnoreCase(player.username);
}
@Override
public void writeToNBT(NBTTagCompound tag)
{
super.writeToNBT(tag);
tag.setString("Owner", this.ownerName);
tag.setBoolean("PublicFlag", this.isPublic);
}
@Override
public void readFromNBT(NBTTagCompound tag)
{
super.readFromNBT(tag);
this.ownerName = tag.getString("Owner");
this.isPublic = tag.getBoolean("PublicFlag");
}
}
+38 -19
View File
@@ -1,8 +1,9 @@
package thaumicbees.bees; package thaumicbees.bees;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import thaumicbees.compat.ThaumcraftHelper; import thaumicbees.main.utils.compat.ThaumcraftHelper;
import forestry.api.apiculture.IAlleleBeeSpecies; import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IAlleleFlowers;
import forestry.api.genetics.AlleleManager; import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele; import forestry.api.genetics.IAllele;
@@ -10,11 +11,13 @@ public class Allele implements IAllele
{ {
public static AlleleInteger fertilityHighDominant; public static AlleleInteger fertilityHighDominant;
public static AlleleFlower flowerBookshelf; public static IAlleleFlowers flowerBookshelf;
public static AlleleFlower flowerThaumcraft; public static IAlleleFlowers flowerThaumcraft;
public static AlleleFlower flowerAuraNode; public static IAlleleFlowers flowerAuraNode;
public static AlleleFlower flowerNodePurify; @Deprecated
public static AlleleFlower flowerNodeFluxify; public static IAlleleFlowers flowerNodePurify;
@Deprecated
public static IAlleleFlowers flowerNodeFluxify;
public static AlleleEffectCure cleansingEffect; public static AlleleEffectCure cleansingEffect;
public static AlleleEffectPotion digSpeed; public static AlleleEffectPotion digSpeed;
@@ -24,36 +27,52 @@ public class Allele implements IAllele
public static AlleleEffectSpawnMob spawnWisp; public static AlleleEffectSpawnMob spawnWisp;
public static AlleleEffectSpawnMob spawnBats; public static AlleleEffectSpawnMob spawnBats;
public static AlleleEffectSpawnMob spawnGhast; public static AlleleEffectSpawnMob spawnGhast;
public static AlleleEffectAuraNodeGrow nodeGen; public static AlleleEffectAuraNodeAttract effectNodeAttract;
public static AlleleEffectAuraNodePurify effectNodePurify;
public static AlleleEffectAuraNodeFlux effectNodeFlux;
public static AlleleEffectAuraNodeCharge effectNodeCharge;
public static void setupAdditionalAlleles() public static void setupAdditionalAlleles()
{ {
Allele.fertilityHighDominant = new AlleleInteger("fertilityHighDominant", 3, true); Allele.fertilityHighDominant = new AlleleInteger("fertilityHighDominant", 3, true);
Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true); Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true);
Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), false); if (ThaumcraftHelper.isActive())
Allele.flowerAuraNode = new AlleleFlower("flowerAuraNode", new FlowerProviderAuraNode(), true); {
Allele.flowerNodePurify = new AlleleFlower("flowerAuraNodePurify", new FlowerProviderAuraNodePurify(), false); Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), false);
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", new FlowerProviderAuraNodeFlux(), false); Allele.flowerAuraNode = new AlleleFlower("flowerAuraNode", new FlowerProviderAuraNode(), true);
Allele.flowerNodePurify = new AlleleFlower("flowerAuraNodePurify", new FlowerProviderAuraNode(), false);
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", new FlowerProviderAuraNode(), false);
}
else
{
Allele.flowerThaumcraft = (IAlleleFlowers)Allele.getBaseAllele("flowersVanilla");
Allele.flowerAuraNode = (IAlleleFlowers)Allele.getBaseAllele("flowersVanilla");
Allele.flowerNodePurify = (IAlleleFlowers)Allele.getBaseAllele("flowersVanilla");
Allele.flowerNodeFluxify = (IAlleleFlowers)Allele.getBaseAllele("flowersVanilla");
}
Allele.effectNodeAttract = new AlleleEffectAuraNodeAttract("effectNodeGeneration", false, 400);
Allele.effectNodePurify = new AlleleEffectAuraNodePurify("effectNodePurify", false, 600, 150);
Allele.effectNodeFlux = new AlleleEffectAuraNodeFlux("effectNodeFlux", true, 300, 300);
Allele.effectNodeCharge = new AlleleEffectAuraNodeCharge("effectNodeCharge", true, 1200);
Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false); Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false);
Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", Potion.digSpeed, 7, false); Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", Potion.digSpeed, 15, false);
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", Potion.moveSpeed, 5, false); Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", Potion.moveSpeed, 10, false);
Allele.slowSpeed = new AlleleEffectPotion("effectSlowSpeed", Potion.moveSlowdown, 3, false); Allele.slowSpeed = new AlleleEffectPotion("effectSlowSpeed", Potion.moveSlowdown, 3, false);
Allele.nodeGen = new AlleleEffectAuraNodeGrow("effectNodeGeneration", false, 400);
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID); Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID);
Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2); Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, ThaumcraftHelper.Entity.FIREBAT.entityID); Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, ThaumcraftHelper.Entity.FIREBAT.entityID);
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat"); Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, ThaumcraftHelper.Entity.WISP.entityID); Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive");
Allele.spawnWisp.setThrottle(1800); Allele.spawnWisp.setThrottle(1800).setChanceToSpawn(79);
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghast"); Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghast", "mob.ghast.moan");
Allele.spawnGhast.setThrottle(2000).setChanceToSpawn(20).setMaxMobsInSpawnZone(1); Allele.spawnGhast.setThrottle(2060).setChanceToSpawn(10).setMaxMobsInSpawnZone(1);
} }
private String uid; private String uid;
@@ -9,6 +9,7 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World; import net.minecraft.world.World;
import thaumicbees.main.ThaumicBees; import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.LocalizationManager;
import forestry.api.apiculture.IAlleleBeeEffect; import forestry.api.apiculture.IAlleleBeeEffect;
import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing; import forestry.api.apiculture.IBeeHousing;
@@ -34,7 +35,7 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
@Override @Override
public String getIdentifier() public String getIdentifier()
{ {
return LanguageRegistry.instance().getStringLocalization(getUID()); return LocalizationManager.getLocalizedString(getUID());
} }
@Override @Override
@@ -11,12 +11,12 @@ import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing; import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData; import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodeGrow extends AlleleEffect public class AlleleEffectAuraNodeAttract extends AlleleEffect
{ {
private int throttle; private int throttle;
public AlleleEffectAuraNodeGrow(String id, boolean isDominant, int timeout) public AlleleEffectAuraNodeAttract(String id, boolean isDominant, int timeout)
{ {
super(id, isDominant); super(id, isDominant);
this.throttle = timeout; this.throttle = timeout;
@@ -39,7 +39,7 @@ public class AlleleEffectAuraNodeGrow extends AlleleEffect
if (value >= throttle) if (value >= throttle)
{ {
World w = housing.getWorld(); World w = housing.getWorld();
if (w.rand.nextInt(15) < 1) if (w.rand.nextInt(10) < 1)
{ {
float x = housing.getXCoord(); float x = housing.getXCoord();
float y = housing.getYCoord(); float y = housing.getYCoord();
@@ -48,7 +48,7 @@ public class AlleleEffectAuraNodeGrow extends AlleleEffect
if (nodeId != -1) if (nodeId != -1)
{ {
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId); AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
if (node.level >= node.baseLevel * 3 / 4) if (node.level >= node.baseLevel * 4 / 5)
{ {
x = (float)(x - node.xPos); x = (float)(x - node.xPos);
y = (float)(y - node.yPos); y = (float)(y - node.yPos);
@@ -59,11 +59,11 @@ public class AlleleEffectAuraNodeGrow extends AlleleEffect
y = y / distance; y = y / distance;
z = z / distance; z = z / distance;
x *= 0.0125f; x *= 0.05f;
y *= 0.0125f; y *= 0.05f;
z *= 0.0125f; z *= 0.05f;
ThaumcraftApi.queueNodeChanges(nodeId, node.baseLevel * -3 / 10, w.rand.nextInt(1), false, null, x, y, z); ThaumcraftApi.queueNodeChanges(nodeId, node.baseLevel * -1 / 13, w.rand.nextInt(2), false, null, x, y, z);
} }
} }
} }
@@ -0,0 +1,59 @@
package thaumicbees.bees;
import net.minecraft.world.World;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodeCharge extends AlleleEffect
{
private int effectTimeout;
AlleleEffectAuraNodeCharge(String id, boolean dominant, int timeout)
{
super(id, dominant);
this.effectTimeout = timeout;
}
@Override
public IEffectData validateStorage(IEffectData storedData)
{
if (storedData == null)
{
storedData = new EffectData(1, 0, 0);
}
return storedData;
}
@Override
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
{
int timeout = storedData.getInteger(0);
if (timeout >= this.effectTimeout)
{
World world = housing.getWorld();
int x = housing.getXCoord();
int y = housing.getYCoord();
int z = housing.getZCoord();
EnumTag tag;
do
{
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
}
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
ThaumcraftApi.increaseLowestAura(world, x, y, z, 1);
}
else
{
storedData.setInteger(0, timeout + 1);
}
return storedData;
}
}
@@ -0,0 +1,65 @@
package thaumicbees.bees;
import net.minecraft.world.World;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodeFlux extends AlleleEffect
{
private int effectTimeout;
private int nodeRange;
AlleleEffectAuraNodeFlux(String id, boolean dominant, int timeout, int range)
{
super(id, dominant);
this.effectTimeout = timeout;
this.nodeRange = range;
}
@Override
public IEffectData validateStorage(IEffectData storedData)
{
if (storedData == null)
{
storedData = new EffectData(1, 0, 0);
}
return storedData;
}
@Override
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
{
int timeout = storedData.getInteger(0);
if (timeout >= this.effectTimeout)
{
World world = housing.getWorld();
int x = housing.getXCoord();
int y = housing.getYCoord();
int z = housing.getZCoord();
EnumTag tag;
do
{
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
}
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
if (nodeId != -1)
{
int quantity = world.rand.nextInt(2) + 1;
ThaumcraftApi.queueNodeChanges(nodeId, 0, 0, false, new ObjectTags().add(tag, quantity), 0f, 0f, 0f);
}
}
else
{
storedData.setInteger(0, timeout + 1);
}
return storedData;
}
}
@@ -0,0 +1,75 @@
package thaumicbees.bees;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import thaumcraft.api.AuraNode;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.Config;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodePurify extends AlleleEffect
{
private int effectTimeout;
private int nodeRange;
public AlleleEffectAuraNodePurify(String id, boolean dominant, int timeout, int range)
{
super(id, dominant);
this.effectTimeout = timeout;
this.nodeRange = range;
}
@Override
public IEffectData validateStorage(IEffectData storedData)
{
if (storedData == null)
{
storedData = new EffectData(1, 0, 0);
}
return storedData;
}
@Override
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
{
int timeout = storedData.getInteger(0);
if (timeout >= this.effectTimeout)
{
World world = housing.getWorld();
int x = housing.getXCoord();
int y = housing.getYCoord();
int z = housing.getZCoord();
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
if (nodeId >= 0)
{
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
if (node != null)
{
int aspectCount = node.flux.tags.size();
if (aspectCount > 0)
{
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
if (selectedTag != null && housing.addProduct(new ItemStack(Config.solidFlux, 1, selectedTag.id), true))
{
node.flux.remove(selectedTag, 1);
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().remove(selectedTag, 1), 0, 0, 0);
}
}
}
}
storedData.setInteger(0, 0);
}
else
{
storedData.setInteger(0, timeout + 1);
}
return storedData;
}
}
@@ -21,11 +21,17 @@ public class AlleleEffectSpawnMob extends AlleleEffect
protected boolean spawnsWhilePlayerNear; protected boolean spawnsWhilePlayerNear;
protected String alternateMob; protected String alternateMob;
protected String mobName; protected String mobName;
protected String mobSound;
protected int throttle; protected int throttle;
protected int chanceToSpawn; protected int chanceToSpawn;
protected int maxMobsInArea; protected int maxMobsInArea;
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn) public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn)
{
this(id, isDominant, mobToSpawn, null);
}
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn, String mobSoundFx)
{ {
super(id, isDominant); super(id, isDominant);
this.aggosOnPlayer = false; this.aggosOnPlayer = false;
@@ -33,6 +39,7 @@ public class AlleleEffectSpawnMob extends AlleleEffect
this.throttle = 200; this.throttle = 200;
this.chanceToSpawn = 100; this.chanceToSpawn = 100;
this.maxMobsInArea = 6; this.maxMobsInArea = 6;
this.mobSound = mobSoundFx;
} }
@Override @Override
@@ -109,6 +116,17 @@ public class AlleleEffectSpawnMob extends AlleleEffect
} }
else else
{ {
if (this.mobSound != null && w.rand.nextInt(100) < 35)
{
int range = genome.getTerritory()[0];
double x = housing.getXCoord() + w.rand.nextDouble() * (range * 2) - range;
range = genome.getTerritory()[1];
double y = housing.getYCoord() + w.rand.nextDouble() * (range * 2) - range;
range = genome.getTerritory()[2];
double z = housing.getZCoord() + w.rand.nextDouble() * (range * 2) - range;
w.playSoundEffect(x, y, z, this.mobSound, 0.5f,
(w.rand.nextFloat() - w.rand.nextFloat()) * 0.2f + 1.0f);
}
storedData.setBoolean(0, true); storedData.setBoolean(0, true);
} }
} }
@@ -3,8 +3,8 @@ package thaumicbees.bees;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.FMLLog;
import thaumicbees.compat.ThaumcraftHelper;
import thaumicbees.item.ItemArmorApiarist; import thaumicbees.item.ItemArmorApiarist;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing; import forestry.api.apiculture.IBeeHousing;
import net.minecraft.entity.EntityList; import net.minecraft.entity.EntityList;
@@ -18,9 +18,9 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
private byte[] wispTypes = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 }; private byte[] wispTypes = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 };
public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn) public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn, String soundToPlay)
{ {
super(id, isDominant, mobToSpawn); super(id, isDominant, mobToSpawn, soundToPlay);
} }
@Override @Override
@@ -57,11 +57,7 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
Field type = wispEntity.getDeclaredField("type"); Field type = wispEntity.getDeclaredField("type");
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]); type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
} }
catch (Exception e) catch (Exception e) { /*Last time I had a request to post error messages, I regretted it.*/ }
{
FMLLog.info("ThaumicBees is using an invalid classname: " + ThaumcraftHelper.Entity.WISP.getClassName()
+ " Please report this error in the thread if you see it.", (Object[])null);
}
spawnedFlag = world.spawnEntityInWorld(mob); spawnedFlag = world.spawnEntityInWorld(mob);
if (this.aggosOnPlayer && player != null) if (this.aggosOnPlayer && player != null)
@@ -2,6 +2,8 @@ package thaumicbees.bees;
import java.util.ArrayList; import java.util.ArrayList;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import forestry.api.genetics.AlleleManager; import forestry.api.genetics.AlleleManager;
@@ -10,23 +12,30 @@ import forestry.api.genetics.IClassification;
public enum BeeClassification implements IClassification public enum BeeClassification implements IClassification
{ {
ARCANE("Arcane"), ARCANE("Arcane", "Arcanus"),
SUPERNATURAL("Supernatural"), SUPERNATURAL("Supernatural", "Occultus"),
SCHOLARLY("Scholarly"), SCHOLARLY("Scholarly", "Docto"),
THAUMIC("Thaumic"), THAUMIC("Thaumic", "Thaumis"),
SKULKING("Skulking"), SKULKING("Skulking", "Malevolens"),
VIS("Vis"), VIS("Vis", "Vis"),
TIME("Time"), TIME("Time", "Tempestivus"),
SOUL("Soul", "Animus"),
ALCHEMICAL("Alchemical", "Alchimia"),
METALLIC("Metallic", "Metallicis"),
GEM("Gem", "Lapidi"),
FLESHY("Fleshy", "Carnosa"),
; ;
private String uID; private String uID;
private String latin;
private ArrayList<IAlleleSpecies> species; private ArrayList<IAlleleSpecies> species;
private IClassification parent; private IClassification parent;
private EnumClassLevel level; private EnumClassLevel level;
private BeeClassification(String name) private BeeClassification(String name, String scientific)
{ {
this.uID = "classification." + name.toLowerCase(); this.uID = "classification." + name.toLowerCase();
this.latin = scientific;
this.level = EnumClassLevel.GENUS; this.level = EnumClassLevel.GENUS;
this.species = new ArrayList(); this.species = new ArrayList();
this.parent = AlleleManager.alleleRegistry.getClassification("family.apidae"); this.parent = AlleleManager.alleleRegistry.getClassification("family.apidae");
@@ -48,19 +57,19 @@ public enum BeeClassification implements IClassification
@Override @Override
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization(getUID()); return LocalizationManager.getLocalizedString(getUID());
} }
@Override @Override
public String getScientific() public String getScientific()
{ {
return LanguageRegistry.instance().getStringLocalization(getUID() + ".latin"); return this.latin;
} }
@Override @Override
public String getDescription() public String getDescription()
{ {
return LanguageRegistry.instance().getStringLocalization(getUID() + ".description"); return LocalizationManager.getLocalizedString(getUID() + ".description");
} }
@Override @Override
@@ -302,7 +302,8 @@ public class BeeGenomeManager
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone"); genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone"); genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringAverage"); genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringAverage");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerNodePurify; genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodePurify;
return genome; return genome;
} }
@@ -314,7 +315,8 @@ public class BeeGenomeManager
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.FLUX; genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.FLUX;
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone"); genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone"); genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerNodeFluxify; genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeFlux;
return genome; return genome;
} }
@@ -326,7 +328,19 @@ public class BeeGenomeManager
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.NODE; genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.NODE;
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest"); genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode; genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.nodeGen; genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeAttract;
return genome;
}
public static IAllele[] getTemplateRejuvinating()
{
IAllele[] genome = getTemplateBaseVis();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.REJUVENATING;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.effectNodeCharge;
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
return genome; return genome;
} }
@@ -466,6 +480,166 @@ public class BeeGenomeManager
return genome; return genome;
} }
private static IAllele[] getTemplateBaseAlchemical()
{
IAllele[] genome = getTemplateBaseThaumic();
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
return genome;
}
public static IAllele[] getTemplateMinium()
{
IAllele[] genome = getTemplateBaseAlchemical();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.MINIUM;
return genome;
}
private static IAllele[] getTemplateBaseSoul()
{
IAllele[] genome = getTemplateBaseThaumic();
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
return genome;
}
public static IAllele[] getTemplateSpirit()
{
IAllele[] genome = getTemplateBaseSoul();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SPIRIT;
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanShortened");
return genome;
}
public static IAllele[] getTemplateSoul()
{
IAllele[] genome = getTemplateBaseSoul();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SOUL;
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
return genome;
}
private static IAllele[] getTemplateBaseMetallic()
{
IAllele[] genome = getTemplateBaseThaumic();
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlowest");
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
return genome;
}
public static IAllele[] getTemplateIron()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.IRON;
return genome;
}
public static IAllele[] getTemplateGold()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.GOLD;
return genome;
}
public static IAllele[] getTemplateCopper()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.COPPER;
return genome;
}
public static IAllele[] getTemplateTin()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.TIN;
return genome;
}
public static IAllele[] getTemplateSilver()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SILVER;
return genome;
}
public static IAllele[] getTemplateLead()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.LEAD;
return genome;
}
public static IAllele[] getTemplateDiamond()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.DIAMOND;
return genome;
}
public static IAllele[] getTemplateEmerald()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.EMERALD;
return genome;
}
public static IAllele[] getTemplateChicken()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.CHICKEN;
return genome;
}
public static IAllele[] getTemplateBeef()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BEEF;
return genome;
}
public static IAllele[] getTemplatePork()
{
IAllele[] genome = getTemplateBaseMetallic();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.PORK;
return genome;
}
public static ItemStack getBeeNBTForSpecies(BeeSpecies species, EnumBeeType beeType) public static ItemStack getBeeNBTForSpecies(BeeSpecies species, EnumBeeType beeType)
{ {
ItemStack taggedBee; ItemStack taggedBee;
+175 -78
View File
@@ -12,43 +12,70 @@ import thaumcraft.api.EnumNodeType;
import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.ThaumicBees; import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.MoonPhase; import thaumicbees.main.utils.MoonPhase;
import thaumicbees.main.utils.compat.EquivalentExchangeHelper;
import thaumicbees.main.utils.compat.ExtraBeesHelper;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
public class BeeMutation implements IBeeMutation public class BeeMutation implements IBeeMutation
{ {
public static BeeMutation Esoteric; private static BeeMutation Esoteric;
public static BeeMutation Esoteric1; private static BeeMutation Esoteric1;
public static BeeMutation Mysterious; private static BeeMutation Mysterious;
public static BeeMutation Mysterious1; private static BeeMutation Mysterious1;
public static BeeMutation Arcane; private static BeeMutation Arcane;
public static BeeMutation Charmed; private static BeeMutation Charmed;
public static BeeMutation Enchanted; private static BeeMutation Enchanted;
public static BeeMutation Supernatural; private static BeeMutation Supernatural;
public static BeeMutation Stark; private static BeeMutation Stark;
public static BeeMutation Pupil; private static BeeMutation Fire;
public static BeeMutation Scholarly; private static BeeMutation Water;
public static BeeMutation Savant; private static BeeMutation Pupil;
public static BeeMutation Aware; private static BeeMutation Scholarly;
public static BeeMutation Vis; private static BeeMutation Savant;
public static BeeMutation Vis1; private static BeeMutation Aware;
public static BeeMutation Pure; private static BeeMutation Vis;
public static BeeMutation Flux; private static BeeMutation Vis1;
public static BeeMutation Node; private static BeeMutation Pure;
public static BeeMutation Node1; private static BeeMutation Flux;
public static BeeMutation Skulking; private static BeeMutation Node;
public static BeeMutation Brainy; private static BeeMutation Node1;
public static BeeMutation Gossamer; private static BeeMutation Skulking;
public static BeeMutation Wispy; private static BeeMutation Brainy;
public static BeeMutation Batty; private static BeeMutation Gossamer;
public static BeeMutation Ghastly; private static BeeMutation Wispy;
public static BeeMutation Timely; private static BeeMutation Batty;
public static BeeMutation Lordly; private static BeeMutation Ghastly;
public static BeeMutation Doctoral; private static BeeMutation Timely;
private static BeeMutation Lordly;
private static BeeMutation Doctoral;
private static BeeMutation Spirit;
private static BeeMutation Spirit1;
private static BeeMutation Soul;
private static BeeMutation Minium;
private static BeeMutation Iron;
private static BeeMutation Gold;
private static BeeMutation Copper;
private static BeeMutation Tin;
private static BeeMutation Silver;
private static BeeMutation Lead;
private static BeeMutation Diamond;
private static BeeMutation Emerald;
private static BeeMutation Lead1;
private static BeeMutation Lead2;
private static BeeMutation Beef;
private static BeeMutation Chicken;
private static BeeMutation Pork;
private static BeeMutation Aura;
private static BeeMutation Aura1;
public static void setupMutations() public static void setupMutations()
{ {
IAlleleBeeSpecies baseA, baseB;
BeeMutation.Esoteric = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Demonic"), BeeSpecies.ESOTERIC, 10); BeeMutation.Esoteric = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Demonic"), BeeSpecies.ESOTERIC, 10);
BeeMutation.Esoteric1 = new BeeMutation(Allele.getBaseSpecies("Heroic"), Allele.getBaseSpecies("Demonic"), BeeSpecies.ESOTERIC, 25); BeeMutation.Esoteric1 = new BeeMutation(Allele.getBaseSpecies("Heroic"), Allele.getBaseSpecies("Demonic"), BeeSpecies.ESOTERIC, 25);
BeeMutation.Mysterious = new BeeMutation(BeeSpecies.ESOTERIC, Allele.getBaseSpecies("Ended"), BeeSpecies.MYSTERIOUS, 10); BeeMutation.Mysterious = new BeeMutation(Allele.getBaseSpecies("Ended"), BeeSpecies.ESOTERIC, BeeSpecies.MYSTERIOUS, 15);
BeeMutation.Mysterious1 = new BeeMutation(Allele.getBaseSpecies("Demonic"), BeeSpecies.ESOTERIC, BeeSpecies.MYSTERIOUS, 4);
BeeMutation.Arcane = new BeeMutation(BeeSpecies.ESOTERIC, BeeSpecies.MYSTERIOUS, BeeSpecies.ARCANE, 8) BeeMutation.Arcane = new BeeMutation(BeeSpecies.ESOTERIC, BeeSpecies.MYSTERIOUS, BeeSpecies.ARCANE, 8)
.setMoonPhaseBonus(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT, 1.5f); .setMoonPhaseBonus(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT, 1.5f);
BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Diligent"), Allele.getBaseSpecies("Valiant"), BeeSpecies.CHARMED, 20); BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Diligent"), Allele.getBaseSpecies("Valiant"), BeeSpecies.CHARMED, 20);
@@ -56,68 +83,138 @@ public class BeeMutation implements IBeeMutation
BeeMutation.Supernatural = new BeeMutation(BeeSpecies.CHARMED, BeeSpecies.ENCHANTED, BeeSpecies.SUPERNATURAL, 10) BeeMutation.Supernatural = new BeeMutation(BeeSpecies.CHARMED, BeeSpecies.ENCHANTED, BeeSpecies.SUPERNATURAL, 10)
.setMoonPhaseBonus(MoonPhase.WAXING_GIBBOUS, MoonPhase.WANING_GIBBOUS, 1.5f); .setMoonPhaseBonus(MoonPhase.WAXING_GIBBOUS, MoonPhase.WANING_GIBBOUS, 1.5f);
BeeMutation.Pupil = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.ENCHANTED, BeeSpecies.PUPIL, 10); BeeMutation.Pupil = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.ENCHANTED, BeeSpecies.PUPIL, 10);
BeeMutation.Scholarly = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.ARCANE, BeeSpecies.SCHOLARLY, 8);
BeeMutation.Savant = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.SCHOLARLY, BeeSpecies.SAVANT, 6);
BeeMutation.Stark = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.SUPERNATURAL, BeeSpecies.STARK, 8); BeeMutation.Stark = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.SUPERNATURAL, BeeSpecies.STARK, 8);
BeeMutation.Aware = new BeeMutation(Allele.getBaseSpecies("Demonic"), Allele.getBaseSpecies("Edenic"), BeeSpecies.AWARE, 12);
BeeMutation.Vis = new BeeMutation(BeeSpecies.AWARE, BeeSpecies.ARCANE, BeeSpecies.VIS, 9)
.setAuraNodeRequired(40);
BeeMutation.Vis1 = new BeeMutation(BeeSpecies.AWARE, BeeSpecies.STARK, BeeSpecies.VIS, 12)
.setAuraNodeRequired(80);
BeeMutation.Pure = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Edenic"), BeeSpecies.PURE, 7)
.setAuraNodeTypeRequired(5, EnumNodeType.PURE).setMoonPhaseBonus(MoonPhase.NEW, MoonPhase.NEW, 1.6f);
BeeMutation.Flux = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Edenic"), BeeSpecies.FLUX, 7)
.setAuraNodeTypeRequired(30, EnumNodeType.UNSTABLE).setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 1.6f);
BeeMutation.Node = new BeeMutation(BeeSpecies.VIS, BeeSpecies.VIS, BeeSpecies.NODE, 2)
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WANING_HALF, MoonPhase.WANING_HALF);
BeeMutation.Node1 = new BeeMutation(BeeSpecies.VIS, BeeSpecies.VIS, BeeSpecies.NODE, 2)
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WAXING_HALF);
// Now we get into a little bit of branching...
if (ThaumicBees.getConfig().ExtraBeesInstalled)
{
setupMutationsExtraBeesBase();
}
else
{
setupMutationsForestryBase();
}
BeeMutation.Gossamer.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.WANING_CRESCENT);
BeeMutation.Wispy = new BeeMutation(BeeSpecies.GOSSAMER, Allele.getBaseSpecies("Cultivated"), BeeSpecies.WISPY, 8);
BeeMutation.Timely = new BeeMutation(Allele.getBaseSpecies("Industrious"), BeeSpecies.ENCHANTED, BeeSpecies.TIMELY, 10); BeeMutation.Timely = new BeeMutation(Allele.getBaseSpecies("Industrious"), BeeSpecies.ENCHANTED, BeeSpecies.TIMELY, 10);
BeeMutation.Lordly = new BeeMutation(BeeSpecies.TIMELY, Allele.getBaseSpecies("Imperial"), BeeSpecies.LORDLY, 9); BeeMutation.Lordly = new BeeMutation(BeeSpecies.TIMELY, Allele.getBaseSpecies("Imperial"), BeeSpecies.LORDLY, 9);
BeeMutation.Doctoral = new BeeMutation(BeeSpecies.TIMELY, BeeSpecies.LORDLY, BeeSpecies.DOCTORAL, 7); BeeMutation.Doctoral = new BeeMutation(BeeSpecies.TIMELY, BeeSpecies.LORDLY, BeeSpecies.DOCTORAL, 7);
}
private static void setupMutationsExtraBeesBase() BeeMutation.Minium = new BeeMutation(Allele.getBaseSpecies("Sinister"), BeeSpecies.MYSTERIOUS, BeeSpecies.MINIUM, 11);
{
try BeeMutation.Spirit = new BeeMutation(Allele.getBaseSpecies("Fiendish"), BeeSpecies.ENCHANTED, BeeSpecies.SPIRIT, 12);
BeeMutation.Spirit1 = new BeeMutation(Allele.getBaseSpecies("Fiendish"), Allele.getBaseSpecies("Ended"), BeeSpecies.SPIRIT, 20);
BeeMutation.Soul = new BeeMutation(Allele.getBaseSpecies("Fiendish"), BeeSpecies.SPIRIT, BeeSpecies.SOUL, 11);
BeeMutation.Iron = new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Diligent"), BeeSpecies.IRON, 10);
baseA = (BeeSpecies.MINIUM.isActive()) ? BeeSpecies.MINIUM : Allele.getBaseSpecies("Imperial");
baseB = (BeeSpecies.LEAD.isActive()) ? BeeSpecies.LEAD : BeeSpecies.IRON;
BeeMutation.Gold = new BeeMutation(baseA, baseB, BeeSpecies.GOLD, 8);
if (BeeSpecies.COPPER.isActive())
{
BeeMutation.Copper = new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Meadows"), BeeSpecies.COPPER, 12);
}
if (BeeSpecies.TIN.isActive())
{
BeeMutation.Tin = new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Forest"), BeeSpecies.TIN, 12);
}
if (BeeSpecies.SILVER.isActive())
{
BeeMutation.Silver = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Modest"), BeeSpecies.SILVER, 10);
}
if (BeeSpecies.LEAD.isActive())
{
if (BeeSpecies.COPPER.isActive())
{
BeeMutation.Lead = new BeeMutation(Allele.getBaseSpecies("Industrious"), BeeSpecies.COPPER, BeeSpecies.LEAD, 13);
}
if (BeeSpecies.TIN.isActive())
{
BeeMutation.Lead1 = new BeeMutation(Allele.getBaseSpecies("Industrious"), BeeSpecies.TIN, BeeSpecies.LEAD, 13);
}
BeeMutation.Lead2 = new BeeMutation(Allele.getBaseSpecies("Industrious"), Allele.getBaseSpecies("Common"), BeeSpecies.LEAD, 9);
}
BeeMutation.Diamond = new BeeMutation(Allele.getBaseSpecies("Austere"), BeeSpecies.GOLD, BeeSpecies.DIAMOND, 6);
baseA = (BeeSpecies.SILVER.isActive()) ? BeeSpecies.SILVER : Allele.getBaseSpecies("Imperial");
BeeMutation.Emerald = new BeeMutation(Allele.getBaseSpecies("Austere"), baseA, BeeSpecies.EMERALD, 6);
if (BeeSpecies.BEEF.isActive())
{
BeeMutation.Beef = new BeeMutation(Allele.getBaseSpecies("Common"), BeeSpecies.SKULKING, BeeSpecies.BEEF, 10);
}
if (BeeSpecies.CHICKEN.isActive())
{
BeeMutation.Chicken = new BeeMutation(Allele.getBaseSpecies("Common"), BeeSpecies.SKULKING, BeeSpecies.CHICKEN, 10);
}
if (BeeSpecies.PORK.isActive())
{
BeeMutation.Pork = new BeeMutation(Allele.getBaseSpecies("Common"), BeeSpecies.SKULKING, BeeSpecies.PORK, 10);
}
// Now we get into a little bit of branching...
if (ExtraBeesHelper.isActive())
{ {
BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getExtraSpecies("desolate"), BeeSpecies.SKULKING, 10); BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getExtraSpecies("desolate"), BeeSpecies.SKULKING, 10);
BeeMutation.Brainy = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("rotten"), BeeSpecies.BRAINY, 12);
BeeMutation.Gossamer = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("ancient"), BeeSpecies.GOSSAMER, 10);
BeeMutation.Batty = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("rock"), BeeSpecies.BATTY, 14);
BeeMutation.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("creeper"), BeeSpecies.GHASTLY, 13); BeeMutation.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("creeper"), BeeSpecies.GHASTLY, 13);
} }
catch (Exception e) else
{ {
FMLLog.warning("ThaumicBees encountered an error attempting to register mutations using Extra Bees species! Ensure Extra Bees was able to initialize correctly!"); BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getBaseSpecies("Modest"), BeeSpecies.SKULKING, 10);
FMLLog.info("Could not use Extra Bees species for mutations. Falling back to Forestry defaults."); BeeMutation.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Austere"), BeeSpecies.GHASTLY, 13);
setupMutationsForestryBase();
} }
}
private static void setupMutationsForestryBase() if (ThaumcraftHelper.isActive())
{ {
BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getBaseSpecies("Modest"), BeeSpecies.SKULKING, 10); BeeMutation.Scholarly = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.ARCANE, BeeSpecies.SCHOLARLY, 8);
BeeMutation.Brainy = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Sinister"), BeeSpecies.BRAINY, 10); BeeMutation.Savant = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.SCHOLARLY, BeeSpecies.SAVANT, 6);
BeeMutation.Gossamer = new BeeMutation(BeeSpecies.SKULKING, BeeSpecies.SUPERNATURAL, BeeSpecies.GOSSAMER, 10);
BeeMutation.Batty = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Frugal"), BeeSpecies.BATTY, 11); BeeMutation.Aware = new BeeMutation(Allele.getBaseSpecies("Demonic"), Allele.getBaseSpecies("Edenic"), BeeSpecies.AWARE, 12);
BeeMutation.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Austere"), BeeSpecies.GHASTLY, 13); BeeMutation.Vis = new BeeMutation(BeeSpecies.AWARE, BeeSpecies.ARCANE, BeeSpecies.VIS, 9)
.setAuraNodeRequired(40);
BeeMutation.Vis1 = new BeeMutation(BeeSpecies.AWARE, BeeSpecies.STARK, BeeSpecies.VIS, 12)
.setAuraNodeRequired(80);
BeeMutation.Pure = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Edenic"), BeeSpecies.PURE, 7)
.setAuraNodeTypeRequired(5, EnumNodeType.PURE).setMoonPhaseBonus(MoonPhase.NEW, MoonPhase.NEW, 1.6f);
BeeMutation.Flux = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Edenic"), BeeSpecies.FLUX, 7)
.setAuraNodeTypeRequired(30, EnumNodeType.UNSTABLE).setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 1.6f);
BeeMutation.Node = new BeeMutation(BeeSpecies.PURE, BeeSpecies.FLUX, BeeSpecies.NODE, 2)
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WANING_HALF, MoonPhase.WANING_HALF);
BeeMutation.Node1 = new BeeMutation(BeeSpecies.PURE, BeeSpecies.FLUX, BeeSpecies.NODE, 2)
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WAXING_HALF);
if (ExtraBeesHelper.isActive())
{
BeeMutation.Brainy = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("rotten"), BeeSpecies.BRAINY, 12);
BeeMutation.Gossamer = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("ancient"), BeeSpecies.GOSSAMER, 10);
BeeMutation.Batty = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("rock"), BeeSpecies.BATTY, 14);
BeeMutation.Aura = new BeeMutation(BeeSpecies.VIS, Allele.getExtraSpecies("energetic"), BeeSpecies.REJUVENATING, 3);
BeeMutation.Aura1 = new BeeMutation(BeeSpecies.VIS, Allele.getExtraSpecies("energetic"), BeeSpecies.REJUVENATING, 3);
}
else
{
BeeMutation.Brainy = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Sinister"), BeeSpecies.BRAINY, 10);
BeeMutation.Gossamer = new BeeMutation(BeeSpecies.SKULKING, BeeSpecies.SUPERNATURAL, BeeSpecies.GOSSAMER, 10);
BeeMutation.Batty = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Frugal"), BeeSpecies.BATTY, 11);
BeeMutation.Aura = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Industrious"), BeeSpecies.REJUVENATING, 3);
BeeMutation.Aura1 = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Industrious"), BeeSpecies.REJUVENATING, 3);
}
BeeMutation.Gossamer.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.WANING_CRESCENT);
BeeMutation.Wispy = new BeeMutation(BeeSpecies.GOSSAMER, Allele.getBaseSpecies("Cultivated"), BeeSpecies.WISPY, 8);
BeeMutation.Aura.setMoonPhaseRestricted(MoonPhase.WANING_CRESCENT, MoonPhase.WANING_CRESCENT);
BeeMutation.Aura1.setMoonPhaseRestricted(MoonPhase.WAXING_CRESCENT, MoonPhase.WAXING_CRESCENT);
}
else
{
BeeMutation.Fire = new BeeMutation(BeeSpecies.STARK, Allele.getBaseSpecies("Fiendish"), BeeSpecies.FIRE, 10);
if (ExtraBeesHelper.isActive())
{
BeeMutation.Water = new BeeMutation(BeeSpecies.STARK, Allele.getExtraSpecies("ocean"), BeeSpecies.WATER, 12);
BeeMutation.Water = new BeeMutation(BeeSpecies.STARK, Allele.getExtraSpecies("river"), BeeSpecies.WATER, 8);
}
else
{
BeeMutation.Water = new BeeMutation(BeeSpecies.STARK, Allele.getBaseSpecies("Marshy"), BeeSpecies.WATER, 10);
}
}
if (EquivalentExchangeHelper.isActive())
{
BeeMutation.Minium = new BeeMutation(Allele.getBaseSpecies("Frugal"), BeeSpecies.PUPIL, BeeSpecies.MINIUM, 10);
}
} }
private IAllele parent1; private IAllele parent1;
+181 -18
View File
@@ -11,19 +11,23 @@ import java.util.HashMap;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import thaumicbees.compat.ForestryHelper;
import thaumicbees.compat.ThaumcraftHelper;
import thaumicbees.item.types.CombType; import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType; import thaumicbees.item.types.DropType;
import thaumicbees.item.types.NuggetType;
import thaumicbees.item.types.PollenType; import thaumicbees.item.types.PollenType;
import thaumicbees.item.types.ResourceType; import thaumicbees.item.types.ResourceType;
import thaumicbees.main.Config; import thaumicbees.main.Config;
import thaumicbees.main.utils.LocalizationManager;
import thaumicbees.main.utils.compat.EquivalentExchangeHelper;
import thaumicbees.main.utils.compat.ForestryHelper;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement; import net.minecraft.stats.Achievement;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.oredict.OreDictionary;
public enum BeeSpecies implements IAlleleBeeSpecies public enum BeeSpecies implements IAlleleBeeSpecies
{ {
@@ -67,6 +71,8 @@ public enum BeeSpecies implements IAlleleBeeSpecies
BeeClassification.VIS, 0x004c99, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false), BeeClassification.VIS, 0x004c99, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
NODE("Node", "conficiens", NODE("Node", "conficiens",
BeeClassification.VIS, 0xFFF266, 0xFF8CE9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false), BeeClassification.VIS, 0xFFF266, 0xFF8CE9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
REJUVENATING("Rejuvenating", "arcanus vitae",
BeeClassification.VIS, 0x91D0D9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
SKULKING("Skulking", "malevolens", SKULKING("Skulking", "malevolens",
BeeClassification.SKULKING, 0x524827, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true), BeeClassification.SKULKING, 0x524827, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
BRAINY("Brainy", "cerebrum", BRAINY("Brainy", "cerebrum",
@@ -76,7 +82,7 @@ public enum BeeSpecies implements IAlleleBeeSpecies
WISPY("Wispy", "umbrabilis", WISPY("Wispy", "umbrabilis",
BeeClassification.SKULKING, 0x9cb8d5, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false), BeeClassification.SKULKING, 0x9cb8d5, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
BATTY("Batty", "chiroptera", BATTY("Batty", "chiroptera",
BeeClassification.SKULKING, 0x27350d, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false,true), BeeClassification.SKULKING, 0x27350d, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
GHASTLY("Ghastly", "pallens", GHASTLY("Ghastly", "pallens",
BeeClassification.SKULKING, 0xccccee, 0xbf877c, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false), BeeClassification.SKULKING, 0xccccee, 0xbf877c, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
TIMELY("Timely", "gallifreis", TIMELY("Timely", "gallifreis",
@@ -85,10 +91,96 @@ public enum BeeSpecies implements IAlleleBeeSpecies
BeeClassification.TIME, 0xC6AF86, 0x8E0213, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false), BeeClassification.TIME, 0xC6AF86, 0x8E0213, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
DOCTORAL("Doctoral", "medicus qui", DOCTORAL("Doctoral", "medicus qui",
BeeClassification.TIME, 0xDDE5FC, 0x4B6E8C, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false), BeeClassification.TIME, 0xDDE5FC, 0x4B6E8C, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
MINIUM("Minium", "mutabilis",
BeeClassification.ALCHEMICAL, 0xac0921, 0x3a030b, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
SPIRIT("Spirit", "larva",
BeeClassification.SOUL, 0xb2964b, EnumTemperature.WARM, EnumHumidity.NORMAL, false, true),
SOUL("Soul", "anima",
BeeClassification.SOUL, 0x7d591b, EnumTemperature.HELLISH, EnumHumidity.NORMAL, true, false),
IRON("Iron", "ferrus",
BeeClassification.METALLIC, 0x686868, 0xE9E9E9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
GOLD("Gold", "aurum",
BeeClassification.METALLIC, 0x684B01, 0xFFFF0B, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
COPPER("Copper", "aercus",
BeeClassification.METALLIC, 0x684B01, 0xFFC81A, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
TIN("Tin", "stannum",
BeeClassification.METALLIC, 0x3E596D, 0xA6BACB, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
SILVER("Silver", "argenteus",
BeeClassification.METALLIC, 0x747C81, 0x96BFC4, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
LEAD("Lead", "plumbeus",
BeeClassification.METALLIC, 0x96BFC4, 0x91A9F3, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
DIAMOND("Diamond", "diamond",
BeeClassification.GEM, 0x209581, 0x8DF5E3, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
EMERALD("Emerald", "prasinus",
BeeClassification.GEM, 0x005300, 0x17DD62, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
CHICKEN("Chicken", "pullus",
BeeClassification.FLESHY, 0x7D431E, 0xE0905E, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
BEEF("Beef", "bubulae",
BeeClassification.FLESHY, 0x40221A, 0xAC6753, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
PORK("Pork", "porcina",
BeeClassification.FLESHY, 0x725D2F, 0xD2BF93, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
; ;
public static void setupBeeSpecies() public static void setupBeeSpecies()
{ {
// Species must be set inactive prior to registration.
if (ThaumcraftHelper.isActive())
{
AIR.addSpecialty(new ItemStack(Config.tcNuggets, 1, ThaumcraftHelper.NuggetType.QUICKSILVER.ordinal()), 8);
EARTH.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()), 6);
BRAINY.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.ZOMBIE_BRAIN.ordinal()), 2);
CHICKEN.addSpecialty(new ItemStack(Config.tcNuggetChicken, 1), 9);
BEEF.addSpecialty(new ItemStack(Config.tcNuggetBeef, 1), 9);
PORK.addSpecialty(new ItemStack(Config.tcNuggetPork, 1), 9);
}
else
{
SCHOLARLY.setInactive();
SAVANT.setInactive();
AIR.setInactive();
EARTH.setInactive();
INFUSED.setInactive();
PURE.setInactive();
FLUX.setInactive();
NODE.setInactive();
REJUVENATING.setInactive();
BRAINY.setInactive();
GOSSAMER.setInactive();
WISPY.setInactive();
BATTY.setInactive();
CHICKEN.setInactive();
BEEF.setInactive();
PORK.setInactive();
}
if (EquivalentExchangeHelper.isActive())
{
MINIUM.addSpecialty(new ItemStack(Config.eeMinuimShard), 6);
}
else
{
MINIUM.setInactive();
}
// Oredict bees
if (OreDictionary.getOres("ingotCopper").size() <= 0)
{
COPPER.setInactive();
}
if (OreDictionary.getOres("ingotTin").size() <= 0)
{
TIN.setInactive();
}
if (OreDictionary.getOres("ingotSilver").size() <= 0)
{
SILVER.setInactive();
}
if (OreDictionary.getOres("ingotLead").size() <= 0)
{
LEAD.setInactive();
}
ESOTERIC.addProduct(Config.combs.getStackForType(CombType.OCCULT), 20) ESOTERIC.addProduct(Config.combs.getStackForType(CombType.OCCULT), 20)
.setGenome(BeeGenomeManager.getTemplateEsoteric()) .setGenome(BeeGenomeManager.getTemplateEsoteric())
.register(); .register();
@@ -124,12 +216,10 @@ public enum BeeSpecies implements IAlleleBeeSpecies
.setGenome(BeeGenomeManager.getTemplateStark()) .setGenome(BeeGenomeManager.getTemplateStark())
.register(); .register();
AIR.addProduct(Config.combs.getStackForType(CombType.AIRY), 9) AIR.addProduct(Config.combs.getStackForType(CombType.AIRY), 9)
.addSpecialty(new ItemStack(Config.tcNuggets, 1, ThaumcraftHelper.NuggetType.QUICKSILVER.ordinal()), 8)
.setGenome(BeeGenomeManager.getTemplateAir()) .setGenome(BeeGenomeManager.getTemplateAir())
.register(); .register();
FIRE.addProduct(Config.combs.getStackForType(CombType.FIREY), 15) FIRE.addProduct(Config.combs.getStackForType(CombType.FIREY), 15)
.addSpecialty(new ItemStack(Item.blazePowder), 8) .addSpecialty(new ItemStack(Item.blazePowder), 4).setGenome(BeeGenomeManager.getTemplateFire())
.setGenome(BeeGenomeManager.getTemplateFire())
.register(); .register();
WATER.addProduct(Config.combs.getStackForType(CombType.WATERY), 20) WATER.addProduct(Config.combs.getStackForType(CombType.WATERY), 20)
.addSpecialty(new ItemStack(Block.ice), 1) .addSpecialty(new ItemStack(Block.ice), 1)
@@ -137,7 +227,6 @@ public enum BeeSpecies implements IAlleleBeeSpecies
.setGenome(BeeGenomeManager.getTemplateWater()) .setGenome(BeeGenomeManager.getTemplateWater())
.register(); .register();
EARTH.addProduct(Config.combs.getStackForType(CombType.EARTHY), 30) EARTH.addProduct(Config.combs.getStackForType(CombType.EARTHY), 30)
.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()), 6)
.setGenome(BeeGenomeManager.getTemplateEarth()) .setGenome(BeeGenomeManager.getTemplateEarth())
.register(); .register();
INFUSED.addProduct(Config.combs.getStackForType(CombType.INFUSED), 20) INFUSED.addProduct(Config.combs.getStackForType(CombType.INFUSED), 20)
@@ -158,14 +247,20 @@ public enum BeeSpecies implements IAlleleBeeSpecies
NODE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20) NODE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
.setGenome(BeeGenomeManager.getTemplateNode()) .setGenome(BeeGenomeManager.getTemplateNode())
.register(); .register();
REJUVENATING.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
.setGenome(BeeGenomeManager.getTemplateRejuvinating())
.register();
SKULKING.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10) SKULKING.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
.setGenome(BeeGenomeManager.getTemplateSkulking()) .setGenome(BeeGenomeManager.getTemplateSkulking())
.register(); .register();
BRAINY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10) BRAINY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
.addProduct(new ItemStack(Item.rottenFlesh), 6) .addProduct(new ItemStack(Item.rottenFlesh), 6)
.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.ZOMBIE_BRAIN.ordinal()), 2)
.setGenome(BeeGenomeManager.getTemplateBrainy()) .setGenome(BeeGenomeManager.getTemplateBrainy())
.register(); .register();
BATTY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
.addSpecialty(new ItemStack(Item.gunpowder), 4)
.setGenome(BeeGenomeManager.getTemplateBatty())
.register();
GOSSAMER.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 15) GOSSAMER.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 15)
.setGenome(BeeGenomeManager.getTemplateGossamer()) .setGenome(BeeGenomeManager.getTemplateGossamer())
.register(); .register();
@@ -173,26 +268,75 @@ public enum BeeSpecies implements IAlleleBeeSpecies
.addSpecialty(new ItemStack(Config.fCraftingResource, 1, ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()), 4) .addSpecialty(new ItemStack(Config.fCraftingResource, 1, ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()), 4)
.setGenome(BeeGenomeManager.getTemplateWispy()) .setGenome(BeeGenomeManager.getTemplateWispy())
.register(); .register();
BATTY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
.addSpecialty(new ItemStack(Item.gunpowder), 4)
.setGenome(BeeGenomeManager.getTemplateBatty())
.register();
GHASTLY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 8) GHASTLY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 8)
.addSpecialty(new ItemStack(Item.ghastTear), 2) .addSpecialty(new ItemStack(Item.ghastTear), 2)
.setGenome(BeeGenomeManager.getTemplateGhastly()) .setGenome(BeeGenomeManager.getTemplateGhastly())
.register(); .register();
TIMELY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25) TIMELY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25)
.addProduct(Config.pollen.getStackForType(PollenType.PHASED), 10)
.setGenome(BeeGenomeManager.getTemplateTimely()) .setGenome(BeeGenomeManager.getTemplateTimely())
.register(); .register();
LORDLY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 5) LORDLY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 5)
.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25) .addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25)
.addProduct(Config.pollen.getStackForType(PollenType.PHASED), 15)
.setGenome(BeeGenomeManager.getTemplateLordly()) .setGenome(BeeGenomeManager.getTemplateLordly())
.register(); .register();
DOCTORAL.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 10) DOCTORAL.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 10)
.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 30) .addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25)
.addSpecialty(new ItemStack(Config.jellyBaby), 4) .addProduct(Config.pollen.getStackForType(PollenType.PHASED), 19)
.addSpecialty(new ItemStack(Config.jellyBaby), 7)
.setGenome(BeeGenomeManager.getTemplateDoctoral()) .setGenome(BeeGenomeManager.getTemplateDoctoral())
.register(); .register();
MINIUM.addProduct(Config.combs.getStackForType(CombType.OCCULT), 16)
.setGenome(BeeGenomeManager.getTemplateMinium())
.register();
SPIRIT.addProduct(Config.combs.getStackForType(CombType.SOUL), 13)
.setGenome(BeeGenomeManager.getTemplateSpirit())
.register();
SOUL.addProduct(Config.combs.getStackForType(CombType.SOUL), 24)
.setGenome(BeeGenomeManager.getTemplateSoul())
.register();
IRON.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.addSpecialty(Config.nuggets.getStackForType(NuggetType.IRON), 8)
.setGenome(BeeGenomeManager.getTemplateIron())
.register();
GOLD.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.addSpecialty(new ItemStack(Item.goldNugget, 1), 6)
.setGenome(BeeGenomeManager.getTemplateGold())
.register();
COPPER.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.addSpecialty(Config.nuggets.getStackForType(NuggetType.COPPER), 9)
.setGenome(BeeGenomeManager.getTemplateCopper())
.register();
TIN.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.addSpecialty(Config.nuggets.getStackForType(NuggetType.TIN), 9)
.setGenome(BeeGenomeManager.getTemplateTin())
.register();
SILVER.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.addSpecialty(Config.nuggets.getStackForType(NuggetType.SILVER), 6)
.setGenome(BeeGenomeManager.getTemplateSilver())
.register();
LEAD.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.addSpecialty(Config.nuggets.getStackForType(NuggetType.LEAD), 7)
.setGenome(BeeGenomeManager.getTemplateLead())
.register();
DIAMOND.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.addSpecialty(Config.nuggets.getStackForType(NuggetType.DIAMOND), 3)
.setGenome(BeeGenomeManager.getTemplateDiamond())
.register();
EMERALD.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.addSpecialty(Config.nuggets.getStackForType(NuggetType.EMERALD), 2)
.setGenome(BeeGenomeManager.getTemplateEmerald())
.register();
CHICKEN.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.setGenome(BeeGenomeManager.getTemplateChicken())
.register();
BEEF.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.setGenome(BeeGenomeManager.getTemplateBeef())
.register();
PORK.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.HONEY.ordinal()), 10)
.setGenome(BeeGenomeManager.getTemplatePork())
.register();
} }
private String binomial; private String binomial;
@@ -205,6 +349,7 @@ public enum BeeSpecies implements IAlleleBeeSpecies
private boolean hasEffect; private boolean hasEffect;
private boolean isSecret; private boolean isSecret;
private boolean isCounted; private boolean isCounted;
private boolean isActive;
private IClassification branch; private IClassification branch;
private HashMap products; private HashMap products;
private HashMap specialty; private HashMap specialty;
@@ -212,14 +357,16 @@ public enum BeeSpecies implements IAlleleBeeSpecies
private String uid; private String uid;
private boolean dominant; private boolean dominant;
private final static boolean defaultSecretSetting = true;
private BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant) private BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
{ {
this(speciesName, genusName, classification, 0, firstColour, 0xFF6E0D, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant); this(speciesName, genusName, classification, 0, firstColour, 0xFF6E0D, preferredTemp, preferredHumidity, hasGlowEffect, defaultSecretSetting, true, isSpeciesDominant);
} }
private BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant) private BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
{ {
this(speciesName, genusName, classification, 0, firstColour, secondColour, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant); this(speciesName, genusName, classification, 0, firstColour, secondColour, preferredTemp, preferredHumidity, hasGlowEffect, defaultSecretSetting, true, isSpeciesDominant);
} }
private BeeSpecies(String speciesName, String genusName, IClassification classification, int body, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesSecret, boolean isSpeciesCounted, boolean isSpeciesDominant) private BeeSpecies(String speciesName, String genusName, IClassification classification, int body, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesSecret, boolean isSpeciesCounted, boolean isSpeciesDominant)
@@ -241,6 +388,7 @@ public enum BeeSpecies implements IAlleleBeeSpecies
specialty = new HashMap(); specialty = new HashMap();
this.branch = classification; this.branch = classification;
this.branch.addMemberSpecies(this); this.branch.addMemberSpecies(this);
this.isActive = true;
} }
public BeeSpecies setGenome(IAllele genome[]) public BeeSpecies setGenome(IAllele genome[])
@@ -273,12 +421,12 @@ public enum BeeSpecies implements IAlleleBeeSpecies
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization(getUID()); return LocalizationManager.getLocalizedString(getUID());
} }
public String getDescription() public String getDescription()
{ {
return LanguageRegistry.instance().getStringLocalization(getUID() + ".description"); return LocalizationManager.getLocalizedString(getUID() + ".description");
} }
public int getBodyType() public int getBodyType()
@@ -311,6 +459,17 @@ public enum BeeSpecies implements IAlleleBeeSpecies
return hasEffect; return hasEffect;
} }
public BeeSpecies setInactive()
{
this.isActive = false;
return this;
}
public boolean isActive()
{
return this.isActive;
}
public boolean isSecret() public boolean isSecret()
{ {
return isSecret; return isSecret;
@@ -367,6 +526,10 @@ public enum BeeSpecies implements IAlleleBeeSpecies
private BeeSpecies register() private BeeSpecies register()
{ {
BeeManager.breedingManager.registerBeeTemplate(this.getGenome()); BeeManager.breedingManager.registerBeeTemplate(this.getGenome());
if (!this.isActive)
{
AlleleManager.alleleRegistry.blacklistAllele(this.getUID());
}
return this; return this;
} }
@@ -4,6 +4,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
import thaumcraft.api.AuraNode; import thaumcraft.api.AuraNode;
import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.Config; import thaumicbees.main.Config;
import thaumicbees.main.utils.LocalizationManager;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
@@ -45,7 +46,7 @@ public class FlowerProviderAuraNode implements IFlowerProvider
@Override @Override
public String getDescription() public String getDescription()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.bees.flower.node"); return LocalizationManager.getLocalizedString("tb.bees.flower.node");
} }
@Override @Override
@@ -4,6 +4,7 @@ import cpw.mods.fml.common.registry.LanguageRegistry;
import thaumcraft.api.EnumTag; import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags; import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.utils.LocalizationManager;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeGenome;
@@ -38,6 +39,6 @@ public class FlowerProviderAuraNodeFlux extends FlowerProviderAuraNode
@Override @Override
public String getDescription() public String getDescription()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.bees.flower.nodeFlux"); return LocalizationManager.getLocalizedString("tb.bees.flower.nodeFlux");
} }
} }
@@ -9,6 +9,7 @@ import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags; import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.Config; import thaumicbees.main.Config;
import thaumicbees.main.utils.LocalizationManager;
import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeGenome;
public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode
@@ -22,7 +23,7 @@ public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode
@Override @Override
public String getDescription() public String getDescription()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.bees.flower.nodePure"); return LocalizationManager.getLocalizedString("tb.bees.flower.nodePure");
} }
@Override @Override
@@ -1,5 +1,6 @@
package thaumicbees.bees; package thaumicbees.bees;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@@ -47,6 +48,6 @@ public class FlowerProviderBookshelf implements IFlowerProvider
public String getDescription() public String getDescription()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.bees.flower.book"); return LocalizationManager.getLocalizedString("tb.bees.flower.book");
} }
} }
@@ -2,6 +2,8 @@ package thaumicbees.bees;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import thaumicbees.main.Config; import thaumicbees.main.Config;
import thaumicbees.main.utils.LocalizationManager;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.world.World; import net.minecraft.world.World;
@@ -33,11 +35,18 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
{ {
boolean flag = false; boolean flag = false;
int blockDown = world.getBlockId(x, y - 1, z); int blockDown = world.getBlockId(x, y - 1, z);
if (world.isAirBlock(x, y, z) && (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID)) if (world.isAirBlock(x, y, z))
{ {
int rand = world.rand.nextInt(10); if (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID)
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, (rand >= 5) ? 2 : 3); {
flag = true; world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.SHIMMERLEAF.ordinal());
flag = true;
}
else if (blockDown == Block.sand.blockID)
{
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.CINDERPEARL.ordinal());
flag = true;
}
} }
return flag; return flag;
} }
@@ -45,7 +54,7 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
@Override @Override
public String getDescription() public String getDescription()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.bees.flower.magic"); return LocalizationManager.getLocalizedString("tb.bees.flower.magic");
} }
@Override @Override
@@ -0,0 +1,27 @@
package thaumicbees.block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
public class BlockEffectJar extends BlockContainer
{
public BlockEffectJar(int id)
{
super(id, Material.glass);
}
@Override
public TileEntity createNewTileEntity(World w)
{
return new TileEntityEffectJar();
}
}
@@ -1,56 +0,0 @@
package thaumicbees.block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumicbees.main.CommonProxy;
import thaumicbees.tile.TileEntityMagicApiary;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
public class BlockMagicApiary extends BlockContainer
{
public BlockMagicApiary(int par1)
{
super(par1, Material.wood);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
this.setBlockName("Magic Apiary");
this.blockIndexInTexture = 48;
}
@Override
@SideOnly(Side.CLIENT)
public int getBlockTexture(IBlockAccess worldAccess, int x, int y, int z, int side)
{
int texture = 48;
if (side == 0 || side == 1)
{
texture = 50;
}
return texture;
}
public int getBlockTextureFromSideAndMetadata(int side, int meta)
{
int texture = 48;
if (side == 0 || side == 1)
{
texture = 50;
}
return texture;
}
@Override
public TileEntity createNewTileEntity(World var1)
{
return new TileEntityMagicApiary();
}
}
@@ -0,0 +1,58 @@
package thaumicbees.block;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumicbees.item.types.PlankType;
import thaumicbees.main.CommonProxy;
import thaumicbees.main.ThaumicBees;
import net.minecraft.block.Block;
import net.minecraft.block.BlockWood;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
public class BlockPlanks extends Block
{
public BlockPlanks(int id)
{
super(id, Material.wood);
this.setHardness(2.5f);
this.setResistance(6.0f);
this.setBlockName("tb.planks");
this.setCreativeTab(CreativeTabs.tabBlock);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
if (ThaumicBees.getConfig().AreMagicPlanksFlammable)
{
Block.setBurnProperties(id, 5, 20);
}
}
@Override
public int getBlockTextureFromSideAndMetadata(int side, int meta)
{
int tx = 256;
if (PlankType.getType(meta) != null)
{
tx = PlankType.getType(meta).textureIdx;
}
return tx;
}
@Override
public int damageDropped(int meta)
{
return meta;
}
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(int id, CreativeTabs tab, List itemsList)
{
for (PlankType type : PlankType.values())
{
itemsList.add(new ItemStack(this, 1, type.ordinal()));
}
}
}
@@ -0,0 +1,72 @@
package thaumicbees.block;
import java.util.List;
import java.util.Random;
import thaumicbees.item.types.PlankType;
import thaumicbees.main.CommonProxy;
import thaumicbees.main.Config;
import thaumicbees.main.ThaumicBees;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.block.Block;
import net.minecraft.block.BlockHalfSlab;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
public class BlockWoodSlab extends BlockHalfSlab
{
public BlockWoodSlab(int id, boolean doubleSlab)
{
super(id, doubleSlab, Material.wood);
this.setHardness(2.5f);
this.setResistance(6.0f);
this.setBlockName("tb.slab.wood");
this.setCreativeTab(CreativeTabs.tabBlock);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
this.setLightOpacity(doubleSlab ? 255 : 0);
if (ThaumicBees.getConfig().AreMagicPlanksFlammable)
{
Block.setBurnProperties(id, 5, 20);
}
}
@Override
public int getBlockTextureFromSideAndMetadata(int side, int meta)
{
int tx = 256;
if (PlankType.getType(meta & 7) != null)
{
tx = PlankType.getType(meta & 7).textureIdx;
}
return tx;
}
public int idDropped(int id, Random rand, int par3)
{
return Config.slabWoodHalf.blockID;
}
protected ItemStack createStackedBlock(int meta)
{
return new ItemStack(Config.slabWoodHalf.blockID, 2, meta & 7);
}
@Override
public String getFullSlabName(int meta)
{
return this.getBlockName() + "." + PlankType.getType(meta).name;
}
@SideOnly(Side.CLIENT)
@Override
public void getSubBlocks(int id, CreativeTabs tab, List itemsList)
{
for (PlankType type : PlankType.values())
{
itemsList.add(new ItemStack(this, 1, type.ordinal()));
}
}
}
@@ -0,0 +1,28 @@
package thaumicbees.block;
import thaumicbees.main.utils.EffectJarHousing;
import forestry.api.apiculture.IBeeHousing;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class TileEntityEffectJar extends TileEntity
{
private String ownerName;
private EffectJarHousing housingLogic;
public TileEntityEffectJar()
{
super();
}
public void setOwner(EntityPlayer player)
{
this.ownerName = player.username;
}
public String getOwner()
{
return this.ownerName;
}
}
@@ -1,110 +0,0 @@
package thaumicbees.compat;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import thaumcraft.api.ItemApi;
import thaumicbees.main.Config;
import cpw.mods.fml.common.registry.LanguageRegistry;
public class ThaumcraftHelper
{
public static void getThaumcraftBlocks()
{
Config.tcPlant = Block.blocksList[ItemApi.getItem("blockCustomPlant", 0).itemID];
Config.tcCandle = Block.blocksList[ItemApi.getItem("blockCandle", 0).itemID];
Config.tcCrystal = Block.blocksList[ItemApi.getItem("blockCrystal", 0).itemID];
Config.tcMarker = Block.blocksList[ItemApi.getItem("blockMarker", 0).itemID];
Config.tcJar = Block.blocksList[ItemApi.getItem("blockJar", 0).itemID];
Config.tcLog = Block.blocksList[ItemApi.getItem("blockMagicalLog", 0).itemID];
Config.tcLeaf = Block.blocksList[ItemApi.getItem("blockMagicalLeaves", 0).itemID];
Config.tcWarded = Block.blocksList[ItemApi.getItem("blockWarded", 0).itemID];
}
public static void getThaumcraftItems()
{
Config.tcFilledJar = Item.itemsList[ItemApi.getItem("itemJarFilled", 0).itemID];
Config.tcMiscResource = Item.itemsList[ItemApi.getItem("itemResource", 0).itemID];
Config.tcEssentiaBottle = Item.itemsList[ItemApi.getItem("itemEssence", 0).itemID];
Config.tcShard = Item.itemsList[ItemApi.getItem("itemShard", 0).itemID];
Config.tcGolem = Item.itemsList[ItemApi.getItem("itemGolemPlacer", 0).itemID];
Config.tcWispEssence = Item.itemsList[ItemApi.getItem("itemWispEssence", 0).itemID];
Config.tcNuggets = Item.itemsList[ItemApi.getItem("itemNugget", 0).itemID];
}
public enum MiscResource
{
ALUMENTUM,
NITOR,
THAUMIUM,
QUICKSILVER,
MAGIC_TALLOW,
ZOMBIE_BRAIN,
AMBER,
ENCHANTED_FABRIC,
FLUX_FILTER,
KNOWLEDGE_FRAGMENT,
MIRRORED_GLASS,
;
}
public enum NuggetType
{
IRON,
COPPER,
TIN,
SILVER,
LEAD,
QUICKSILVER, _6,_7,_8,_9,_10,_11,_12,_13,_14,_15,
NATIVE_IRON,
NATIVE_COPPER,
NATIVE_TIN,
NATIVE_SILVER,
NATIVE_LEAD, _21,_22,_23,_24,_25,_26,_27,_28,_29,_30,
NATIVE_GOLD,
;
}
public enum ShardType
{
AIR,
FIRE,
WATER,
EARTH,
MAGIC,
DULL,
;
}
public enum Entity
{
BRAINY_ZOMBIE("entBrainyZombie", "EntityBrainyZombie"),
GIANT_BRAINY_ZOMBIE("entGiantBrainyZombie", "EntityGiantBrainyZombie"),
WISP("entWisp", "EntityWisp"),
FIREBAT("entFirebat", "EntityFireBat"),
;
private static String packageName = "thaumcraft.common.entities.monster.";
public String entityID;
private String className;
private Entity(String id, String clazz)
{
this.entityID = id;
this.className = clazz;
}
public String getClassName()
{
return packageName + this.className;
}
}
public enum BlockPlant
{
GREATWOOD_SAPLING,
SILVERWOOD_SAPLING,
SILVERLEAF,
CINDERPEARL;
}
}
@@ -26,13 +26,14 @@ public class ItemCapsule extends Item
{ {
private CapsuleType capsuleType; private CapsuleType capsuleType;
public ItemCapsule(CapsuleType type, int itemId) public ItemCapsule(CapsuleType type, int itemId, int maxStackSize)
{ {
super(itemId); super(itemId);
this.capsuleType = type; this.capsuleType = type;
this.setTextureFile(CommonProxy.TCBEES_LIQUIDS_IMAGE); this.setTextureFile(CommonProxy.TCBEES_LIQUIDS_IMAGE);
this.setCreativeTab(Tabs.tabApiculture); this.setCreativeTab(Tabs.tabApiculture);
this.setHasSubtypes(true); this.setHasSubtypes(true);
this.setMaxStackSize(maxStackSize);
} }
public CapsuleType getType() public CapsuleType getType()
@@ -9,9 +9,11 @@ import thaumcraft.api.ThaumcraftApi;
import thaumicbees.item.types.HiveFrameType; import thaumicbees.item.types.HiveFrameType;
import thaumicbees.item.types.LiquidType; import thaumicbees.item.types.LiquidType;
import thaumicbees.main.CommonProxy; import thaumicbees.main.CommonProxy;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World; import net.minecraft.world.World;
import forestry.api.apiculture.IBee; import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeGenome; import forestry.api.apiculture.IBeeGenome;
@@ -43,10 +45,7 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
@Override @Override
public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear) public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear)
{ {
this.doFluxEffect(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord()); return this.doWear(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), frame, wear);
frame = this.doWear(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), frame, wear);
return frame;
} }
private void doFluxEffect(World w, int x, int y, int z) private void doFluxEffect(World w, int x, int y, int z)
@@ -60,22 +59,57 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
private ItemStack doWear(World w, int x, int y, int z, ItemStack frame, int wear) private ItemStack doWear(World w, int x, int y, int z, ItemStack frame, int wear)
{ {
int damage = wear; int damage = wear;
int fluxMod = 1;
if (this.type.auraPerUse > 0) if (ThaumcraftHelper.isActive())
{ {
// Attempt to use aura for the frame. // This throttles back the amount of aura consumed by the frame by storing a smidge of data on the item stack.
if (!ThaumcraftApi.decreaseClosestAura(w, x, y, z, this.type.auraPerUse, true)) if (this.type.auraPerUse > 0)
{ {
// Insufficient aura, or no nearby node. NBTTagCompound tag;
damage = wear + this.type.auraPerUse; if (frame.hasTagCompound())
{
tag = frame.getTagCompound();
}
else
{
tag = new NBTTagCompound();
tag.setByte("wearTicks", (byte)0);
frame.setTagCompound(tag);
}
int wearTicks = tag.getByte("wearTicks") + 1;
if (wearTicks == this.type.wearTicksPerAura)
{
// Attempt to use aura for the frame.
if (!ThaumcraftApi.decreaseClosestAura(w, x, y, z, this.type.auraPerUse, true))
{
// Insufficient aura, or no nearby node.
damage = wear + this.type.auraPerUse * this.type.wearTicksPerAura;
fluxMod = 1 + w.rand.nextInt(this.type.wearTicksPerAura);
}
wearTicks = 0;
}
tag.setByte("wearTicks", (byte)wearTicks);
} }
} }
else
{
damage += 2;
}
frame.setItemDamage(frame.getItemDamage() + damage); frame.setItemDamage(frame.getItemDamage() + damage);
for (int i = 0; i < fluxMod; ++i)
{
this.doFluxEffect(w, x, y, z);
}
if (frame.getItemDamage() >= frame.getMaxDamage()) if (frame.getItemDamage() >= frame.getMaxDamage())
{ {
// Break! // Break the frame.
frame = null; frame = null;
} }
@@ -0,0 +1,66 @@
package thaumicbees.item;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumcraft.api.EnumTag;
import thaumicbees.item.types.NuggetType;
import thaumicbees.item.types.PollenType;
import thaumicbees.item.types.ResourceType;
import thaumicbees.main.CommonProxy;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ItemNugget extends Item
{
public ItemNugget(int itemID)
{
super(itemID);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
this.setCreativeTab(CreativeTabs.tabMaterials);
this.setHasSubtypes(true);
}
public ItemStack getStackForType(NuggetType type)
{
return new ItemStack(this, 1, type.ordinal());
}
public ItemStack getStackForType(NuggetType type, int count)
{
return new ItemStack(this, count, type.ordinal());
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(int par1, CreativeTabs tab, List list)
{
for (NuggetType type : NuggetType.values())
{
if (type.isActive())
{
list.add(new ItemStack(this.itemID, 1, type.ordinal()));
}
}
}
@Override
@SideOnly(Side.CLIENT)
public int getIconFromDamage(int meta)
{
int iconIdx = 0;
if (meta >= 0 && meta < NuggetType.values().length)
{
iconIdx = NuggetType.values()[meta].iconIdx;
}
return iconIdx;
}
@Override
public String getItemDisplayName(ItemStack stack)
{
return NuggetType.values()[stack.getItemDamage()].getName();
}
}
@@ -41,7 +41,7 @@ public class ItemSolidFlux extends Item
@Override @Override
public String getItemDisplayName(ItemStack stack) public String getItemDisplayName(ItemStack stack)
{ {
return String.format(LanguageRegistry.instance().getStringLocalization("tb.resource.crystalFlux"), EnumTag.get(stack.getItemDamage()).name); return String.format(LocalizationManager.getLocalizedString("tb.resource.crystalFlux"), EnumTag.get(stack.getItemDamage()).name);
} }
@Override @Override
@@ -0,0 +1,110 @@
package thaumicbees.item;
import thaumcraft.api.IVisRepairable;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.CommonProxy;
import thaumicbees.main.Config;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import forestry.api.arboriculture.IToolGrafter;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGrafter
{
public ItemThaumiumGrafter(int id)
{
super(id);
this.setMaxStackSize(1);
this.setMaxDamage(15);
this.setIconIndex(21);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
this.setItemName("tb.thaumiumGrafter");
this.setCreativeTab(forestry.api.core.Tabs.tabArboriculture);
}
@Override
public float getSaplingModifier(ItemStack stack, World world, int x, int y, int z)
{
return 100f;
}
@Override
public float getStrVsBlock(ItemStack itemStack, Block block)
{
return 1f;
}
@Override
public float getStrVsBlock(ItemStack itemStack, Block block, int metadata)
{
return ForgeHooks.isToolEffective(itemStack, block, metadata) ? 4.8f : getStrVsBlock(itemStack, block);
}
@Override
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, EntityLiving entityliving) {
int damage = 1;
if (id == Config.tcLeaf.blockID)
{
Block block = Block.blocksList[id];
int meta = world.getBlockMetadata(x, y, z) & 1;
block.dropBlockAsItemWithChance(world, x, y, z, meta, 0, 0);
if (meta == ThaumcraftHelper.TreeType.GREATWOOD.ordinal())
{
damage = 2;
}
else if (meta == ThaumcraftHelper.TreeType.SILVERWOOD.ordinal())
{
damage = 4;
}
}
itemstack.damageItem(damage, entityliving);
return true;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return ThaumcraftApi.toolMatThaumium.getEnchantability();
}
/**
* Return the name for this tool's material.
*/
public String getToolMaterialName()
{
return ThaumcraftApi.toolMatThaumium.toString();
}
/**
* Return whether this item is repairable in an anvil.
*/
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
{
return ThaumcraftApi.toolMatThaumium.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
}
@Override
public void doRepair(ItemStack stack, Entity e)
{
if (stack.getItemDamage() > 0)
{
if (ThaumcraftApi.decreaseClosestAura(e.worldObj, e.posX, e.posY, e.posZ, 2, true))
{
if (e instanceof EntityPlayer)
{
EntityPlayer p = (EntityPlayer)e;
p.addExhaustion(0.19f);
}
stack.damageItem(-1, (EntityLiving)e);
}
}
}
}
@@ -0,0 +1,81 @@
package thaumicbees.item;
import thaumcraft.api.IVisRepairable;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.CommonProxy;
import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
public class ItemThaumiumScoop extends Item implements IVisRepairable
{
public ItemThaumiumScoop(int itemID)
{
super(itemID);
this.setMaxStackSize(1);
this.setMaxDamage(30);
this.setIconIndex(20);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
this.setItemName("tb.thaumiumScoop");
this.setCreativeTab(forestry.api.core.Tabs.tabApiculture);
}
@Override
public float getStrVsBlock(ItemStack itemStack, Block block)
{
return 1f;
}
@Override
public float getStrVsBlock(ItemStack itemStack, Block block, int metadata)
{
return ForgeHooks.isToolEffective(itemStack, block, metadata) ? 4.8f : getStrVsBlock(itemStack, block);
}
@Override
public boolean onBlockDestroyed(ItemStack itemstack, World world, int i, int j, int k, int l, EntityLiving entityliving) {
itemstack.damageItem(1, entityliving);
return true;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return ThaumcraftApi.toolMatThaumium.getEnchantability();
}
/**
* Return the name for this tool's material.
*/
public String getToolMaterialName()
{
return ThaumcraftApi.toolMatThaumium.toString();
}
/**
* Return whether this item is repairable in an anvil.
*/
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
{
return ThaumcraftApi.toolMatThaumium.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
}
@Override
public void doRepair(ItemStack stack, Entity e)
{
if (stack.getItemDamage() > 0)
{
if (ThaumcraftApi.decreaseClosestAura(e.worldObj, e.posX, e.posY, e.posZ, 1, true))
{
stack.damageItem(-1, (EntityLiving)e);
}
}
}
}
@@ -1,10 +1,12 @@
package thaumicbees.item.types; package thaumicbees.item.types;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
public enum CapsuleType public enum CapsuleType
{ {
MAGIC("magic", 2000, 0), MAGIC("magic", 2000, 0),
VOID("void", 8000, 1),
; ;
private String name; private String name;
public int capacity; public int capacity;
@@ -19,6 +21,6 @@ public enum CapsuleType
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.capsule." + name); return LocalizationManager.getLocalizedString("tb.capsule." + name);
} }
} }
@@ -1,5 +1,6 @@
package thaumicbees.item.types; package thaumicbees.item.types;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
public enum CombType public enum CombType
@@ -15,6 +16,7 @@ public enum CombType
INFUSED("magic", 0xaa32fc, 0x7A489E, false), INFUSED("magic", 0xaa32fc, 0x7A489E, false),
INTELLECT("aware", 0x618fff, 0xb0092e9, false), INTELLECT("aware", 0x618fff, 0xb0092e9, false),
SKULKING("furtive", 0x545454, 0xcda6cd, true), SKULKING("furtive", 0x545454, 0xcda6cd, true),
SOUL("soul", 0x3C1E00, 0x8A4500, true),
; ;
private CombType(String pName, int colourA, int colourB, boolean show) private CombType(String pName, int colourA, int colourB, boolean show)
@@ -33,6 +35,6 @@ public enum CombType
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.comb." + this.name); return LocalizationManager.getLocalizedString("tb.comb." + this.name);
} }
} }
@@ -1,5 +1,6 @@
package thaumicbees.item.types; package thaumicbees.item.types;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
public enum DropType public enum DropType
@@ -20,6 +21,6 @@ public enum DropType
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.drop." + this.name); return LocalizationManager.getLocalizedString("tb.drop." + this.name);
} }
} }
@@ -3,34 +3,37 @@ package thaumicbees.item.types;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import thaumcraft.api.EnumTag; import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags; import thaumcraft.api.ObjectTags;
import thaumicbees.main.utils.LocalizationManager;
public enum HiveFrameType public enum HiveFrameType
{ {
MAGIC("magic", 32, 240, 1f, 1f, 1f, 2f, 2, MAGIC("magic", 32, 240, 1f, 1f, 1f, 2f, 2, 5,
null), null),
RESILIENT("resillient", 33, 840, 1f, 1f, 1f, 2f, 2, RESILIENT("resillient", 33, 840, 1f, 1f, 1f, 2f, 2, 5,
new ObjectTags().add(EnumTag.ARMOR, 1)), new ObjectTags().add(EnumTag.ARMOR, 1)),
GENTLE("gentle", 34, 200, 1f, 0.7f, 1.5f, 1.4f, 1, GENTLE("gentle", 34, 200, 1f, 0.7f, 1.5f, 1.4f, 1, 5,
new ObjectTags().add(EnumTag.HEAL, 1).add(EnumTag.LIFE, 1)), new ObjectTags().add(EnumTag.HEAL, 1).add(EnumTag.LIFE, 1)),
METABOLIC("metabolic", 35, 120, 1f, 1.8f, 1f, 1.2f, 5, METABOLIC("metabolic", 35, 120, 1f, 1.8f, 1f, 1.2f, 5, 5,
new ObjectTags().add(EnumTag.EXCHANGE, 1).add(EnumTag.MOTION, 1)), new ObjectTags().add(EnumTag.EXCHANGE, 1).add(EnumTag.MOTION, 1)),
NECROTIC("necrotic", 36, 290, 1f, 1f, 0.3f, 0.75f, 1, NECROTIC("necrotic", 36, 290, 1f, 1f, 0.3f, 0.75f, 1, 5,
new ObjectTags().add(EnumTag.DEATH, 3).add(EnumTag.POISON, 2)), new ObjectTags().add(EnumTag.DEATH, 3).add(EnumTag.POISON, 2)),
TEMPORAL("temporal", 37, 300, 1f, 1f, 2.5f, 1f, 1, TEMPORAL("temporal", 37, 300, 1f, 1f, 2.5f, 1f, 1, 5,
new ObjectTags().add(EnumTag.TIME, 5)), new ObjectTags().add(EnumTag.TIME, 5)),
OBLIVION("oblivion", 38, 60, 1f, 1f, 0.0001f, 0f, 15, 1,
new ObjectTags().add(EnumTag.TIME, 5).add(EnumTag.DEATH, 5)),
; ;
private HiveFrameType(String name, int icon, int damage, private HiveFrameType(String name, int icon, int damage,
float territory, float mutation, float lifespan, float production, float territory, float mutation, float lifespan, float production,
int auraUse, ObjectTags fluxTags) int auraUse, int wearTicks, ObjectTags fluxTags)
{ {
this(name, icon, damage, territory, mutation, lifespan, production, 1f, false, false, false, false, auraUse, fluxTags); this(name, icon, damage, territory, mutation, lifespan, production, 1f, false, false, false, false, auraUse, wearTicks, fluxTags);
} }
private HiveFrameType(String name, int icon, int damage, private HiveFrameType(String name, int icon, int damage,
float territory, float mutation, float lifespan, float production, float flowering, float territory, float mutation, float lifespan, float production, float flowering,
boolean sealed, boolean lit, boolean sunlit, boolean hellish, boolean sealed, boolean lit, boolean sunlit, boolean hellish,
int auraUse, ObjectTags fluxTags) int auraUse, int wearTicks, ObjectTags fluxTags)
{ {
this.frameName = name; this.frameName = name;
this.iconIdx = icon; this.iconIdx = icon;
@@ -48,6 +51,7 @@ public enum HiveFrameType
this.auraPerUse = auraUse; this.auraPerUse = auraUse;
this.flux = fluxTags; this.flux = fluxTags;
this.wearTicksPerAura = wearTicks;
} }
private String frameName; private String frameName;
@@ -66,9 +70,10 @@ public enum HiveFrameType
public ObjectTags flux; public ObjectTags flux;
public int auraPerUse; public int auraPerUse;
public int wearTicksPerAura;
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.frame." + this.frameName); return LocalizationManager.getLocalizedString("tb.frame." + this.frameName);
} }
} }
@@ -1,5 +1,6 @@
package thaumicbees.item.types; package thaumicbees.item.types;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraftforge.liquids.LiquidDictionary; import net.minecraftforge.liquids.LiquidDictionary;
@@ -51,6 +52,6 @@ public enum LiquidType
public String getDisplayName() public String getDisplayName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.liquid." + liquidID); return LocalizationManager.getLocalizedString("tb.liquid." + liquidID);
} }
} }
@@ -0,0 +1,51 @@
package thaumicbees.item.types;
import net.minecraft.item.Item;
import thaumicbees.main.utils.LocalizationManager;
public enum NuggetType
{
IRON(5),
COPPER(6),
TIN(7),
SILVER(8),
LEAD(9),
DIAMOND(10),
EMERALD(11),
;
private Item targetIngot;
public int iconIdx;
private boolean active;
private NuggetType(int idx)
{
this.iconIdx = idx;
this.active = true;
}
public void setIngotItem(Item target)
{
this.targetIngot = target;
}
public Item getIngotItem()
{
return this.targetIngot;
}
public void setActive(boolean b)
{
this.active = b;
}
public boolean isActive()
{
return this.active;
}
public String getName()
{
return LocalizationManager.getLocalizedString("tb.nugget." + this.toString().toLowerCase());
}
}
@@ -0,0 +1,45 @@
package thaumicbees.item.types;
public enum PlankType
{
GREATWOOD("greatwood", 48),
SILVERWOOD("silverwood", 49),
;
public String name;
public int textureIdx;
private static String[] nameList;
private PlankType(String n, int idx)
{
this.name = n;
this.textureIdx = idx;
}
public static PlankType getType(int meta)
{
PlankType type = null;
if (meta >= 0 && meta <= values().length)
{
type = values()[meta];
}
return type;
}
public static String[] getAllNames()
{
return (nameList == null) ? nameList = generateNames() : nameList;
}
private static String[] generateNames()
{
String[] names = new String[values().length];
for (int i = 0; i < names.length; ++i)
{
names[i] = values()[i].name;
}
return names;
}
}
@@ -1,10 +1,12 @@
package thaumicbees.item.types; package thaumicbees.item.types;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
public enum PollenType public enum PollenType
{ {
UNUSUAL("unusual", 0xA03059, 0xD8417B), UNUSUAL("unusual", 0xA03059, 0xD8417B),
PHASED("phased", 0x456BA5, 0x4974B4),
; ;
private PollenType(String pName, int colourA, int colourB) private PollenType(String pName, int colourA, int colourB)
@@ -19,6 +21,6 @@ public enum PollenType
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.pollen." + this.name); return LocalizationManager.getLocalizedString("tb.pollen." + this.name);
} }
} }
@@ -1,5 +1,6 @@
package thaumicbees.item.types; package thaumicbees.item.types;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
public enum PropolisType public enum PropolisType
@@ -23,6 +24,6 @@ public enum PropolisType
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.propolis." + this.name); return LocalizationManager.getLocalizedString("tb.propolis." + this.name);
} }
} }
@@ -1,5 +1,6 @@
package thaumicbees.item.types; package thaumicbees.item.types;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
public enum ResourceType public enum ResourceType
@@ -26,6 +27,6 @@ public enum ResourceType
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.resource." + this.name); return LocalizationManager.getLocalizedString("tb.resource." + this.name);
} }
} }
@@ -1,10 +1,12 @@
package thaumicbees.item.types; package thaumicbees.item.types;
import thaumicbees.main.utils.LocalizationManager;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
public enum WaxType public enum WaxType
{ {
MAGIC("magic", false, 0xd242df), MAGIC("magic", false, 0xd242df),
SOUL("soul", true, 0x8A4500),
; ;
private WaxType(String n, boolean sp, int c) private WaxType(String n, boolean sp, int c)
@@ -20,6 +22,6 @@ public enum WaxType
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.wax." + this.name); return LocalizationManager.getLocalizedString("tb.wax." + this.name);
} }
} }
+166 -37
View File
@@ -2,36 +2,54 @@ package thaumicbees.main;
import java.io.File; import java.io.File;
import thaumicbees.block.BlockMagicApiary; import thaumicbees.block.BlockPlanks;
import thaumicbees.compat.CompatabilityManager; import thaumicbees.block.BlockWoodSlab;
import thaumicbees.compat.ForestryHelper;
import thaumicbees.compat.ThaumcraftHelper;
import thaumicbees.item.ItemCapsule; import thaumicbees.item.ItemCapsule;
import thaumicbees.item.ItemComb; import thaumicbees.item.ItemComb;
import thaumicbees.item.ItemDrop; import thaumicbees.item.ItemDrop;
import thaumicbees.item.ItemMagicHiveFrame; import thaumicbees.item.ItemMagicHiveFrame;
import thaumicbees.item.ItemMiscResources; import thaumicbees.item.ItemMiscResources;
import thaumicbees.item.ItemNugget;
import thaumicbees.item.ItemPollen; import thaumicbees.item.ItemPollen;
import thaumicbees.item.ItemPropolis; import thaumicbees.item.ItemPropolis;
import thaumicbees.item.ItemThaumiumGrafter;
import thaumicbees.item.ItemThaumiumScoop;
import thaumicbees.item.ItemSolidFlux; import thaumicbees.item.ItemSolidFlux;
import thaumicbees.item.ItemWax; import thaumicbees.item.ItemWax;
import thaumicbees.item.types.CapsuleType; import thaumicbees.item.types.CapsuleType;
import thaumicbees.item.types.HiveFrameType; import thaumicbees.item.types.HiveFrameType;
import thaumicbees.item.types.NuggetType;
import thaumicbees.item.types.PlankType;
import thaumicbees.item.types.ResourceType;
import thaumicbees.main.utils.CompatabilityManager;
import thaumicbees.main.utils.LocalizationManager;
import thaumicbees.main.utils.compat.EquivalentExchangeHelper;
import thaumicbees.main.utils.compat.ForestryHelper;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import thaumicbees.storage.BackpackDefinition; import thaumicbees.storage.BackpackDefinition;
import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import forestry.api.apiculture.BeeManager;
import forestry.api.storage.BackpackManager; import forestry.api.storage.BackpackManager;
import forestry.api.storage.EnumBackpackType; import forestry.api.storage.EnumBackpackType;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockLog;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemFood; import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemMultiTextureTile;
import net.minecraft.item.ItemSlab;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion; import net.minecraft.potion.Potion;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.Property; import net.minecraftforge.common.Property;
import net.minecraftforge.oredict.OreDictionary; import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
/** /**
* A class to hold some data related to mod state & functions. * A class to hold some data related to mod state & functions.
@@ -42,12 +60,16 @@ public class Config
{ {
public boolean DrawParticleEffects; public boolean DrawParticleEffects;
public boolean BeeInfusionsAdded; public boolean BeeInfusionsAdded;
public boolean ExtraBeesInstalled;
public boolean AddThaumcraftItemsToBackpacks; public boolean AddThaumcraftItemsToBackpacks;
public boolean SkipUpdateCheck;
public boolean AreMagicPlanksFlammable;
public boolean UseImpregnatedStickInTools;
public String ThaumaturgeExtraItems; public String ThaumaturgeExtraItems;
public int CapsuleStackSizeMax;
public static BlockPlanks planksWood;
public static BlockMagicApiary magicApiary; public static BlockWoodSlab slabWoodHalf;
public static BlockWoodSlab slabWoodFull;
public static ItemComb combs; public static ItemComb combs;
public static ItemWax wax; public static ItemWax wax;
@@ -57,9 +79,13 @@ public class Config
public static ItemSolidFlux solidFlux; public static ItemSolidFlux solidFlux;
public static ItemMiscResources miscResources; public static ItemMiscResources miscResources;
public static ItemFood jellyBaby; public static ItemFood jellyBaby;
public static ItemThaumiumScoop thaumiumScoop;
public static ItemThaumiumGrafter thaumiumGrafter;
public static ItemNugget nuggets;
//----- Liquid Capsules -------------------- //----- Liquid Capsules --------------------
public static ItemCapsule magicCapsule; public static ItemCapsule magicCapsule;
public static ItemCapsule voidCapsule;
//----- Apiary Frames ---------------------- //----- Apiary Frames ----------------------
public static ItemMagicHiveFrame hiveFrameMagic; public static ItemMagicHiveFrame hiveFrameMagic;
@@ -68,6 +94,7 @@ public class Config
public static ItemMagicHiveFrame hiveFrameMetabolic; public static ItemMagicHiveFrame hiveFrameMetabolic;
public static ItemMagicHiveFrame hiveFrameNecrotic; public static ItemMagicHiveFrame hiveFrameNecrotic;
public static ItemMagicHiveFrame hiveFrameTemporal; public static ItemMagicHiveFrame hiveFrameTemporal;
public static ItemMagicHiveFrame hiveFrameOblivion;
//----- Backpacks ------------------------------------------ //----- Backpacks ------------------------------------------
public static Item thaumaturgeBackpackT1; public static Item thaumaturgeBackpackT1;
@@ -96,6 +123,11 @@ public class Config
public static Item tcGolem; public static Item tcGolem;
public static Item tcWispEssence; public static Item tcWispEssence;
public static Item tcNuggets; public static Item tcNuggets;
public static Item tcNuggetChicken;
public static Item tcNuggetBeef;
public static Item tcNuggetPork;
//----- Equivalent Exchange Items --------------------------
public static Item eeMinuimShard;
//----- Config State info ---------------------------------- //----- Config State info ----------------------------------
@@ -116,19 +148,55 @@ public class Config
public void setupBlocks() public void setupBlocks()
{ {
ThaumcraftHelper.getThaumcraftBlocks(); ThaumcraftHelper.getBlocks();
ForestryHelper.getForestryBlocks(); ForestryHelper.getBlocks();
EquivalentExchangeHelper.getBlocks();
int blockIdBase = 1750; int blockIdBase = 1750;
/*magicApiary = new BlockMagicApiary(tbConfig.getBlock("magicApiary", blockIdBase).getInt()); {
GameRegistry.registerBlock(magicApiary, "Magic Apiary");*/ int plankId = tbConfig.getBlock("planksTC", blockIdBase++).getInt();
int slabFullId = tbConfig.getBlock("slabFull", blockIdBase++).getInt();
int slabHalfId = tbConfig.getBlock("slabHalf", blockIdBase++).getInt();
if (ThaumcraftHelper.isActive())
{
planksWood = new BlockPlanks(plankId);
Item item = new ItemMultiTextureTile(planksWood.blockID - 256, planksWood, PlankType.getAllNames())
.setItemName(planksWood.getBlockName()).setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
Item.itemsList[planksWood.blockID] = item;
OreDictionary.registerOre("plankWood", new ItemStack(planksWood, 1, -1));
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", ThaumicBees.getConfig().planksWood.blockID + "@" + PlankType.GREATWOOD.ordinal());
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", ThaumicBees.getConfig().planksWood.blockID + "@" + PlankType.SILVERWOOD.ordinal());
slabWoodFull = new BlockWoodSlab(slabFullId, true);
slabWoodHalf = new BlockWoodSlab(slabHalfId, false);
item = new ItemSlab(slabWoodHalf.blockID - 256, slabWoodHalf, slabWoodFull, false)
.setItemName(slabWoodHalf.getBlockName()).setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
Item.itemsList[slabWoodHalf.blockID] = item;
item = new ItemSlab(slabWoodFull.blockID - 256, slabWoodHalf, slabWoodFull, true)
.setItemName(slabWoodFull.getBlockName()).setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
Item.itemsList[slabWoodFull.blockID] = item;
OreDictionary.registerOre("slabWood", new ItemStack(slabWoodHalf, 1, -1));
}
}
}
public void registerTileEntities()
{
} }
public void setupItems() public void setupItems()
{ {
ThaumcraftHelper.getThaumcraftItems(); ThaumcraftHelper.getItems();
ForestryHelper.getForestryItems(); ForestryHelper.getItems();
EquivalentExchangeHelper.getItems();
int itemIDBase = 26090; int itemIDBase = 26090;
@@ -141,35 +209,49 @@ public class Config
drops = new ItemDrop(tbConfig.getItem("drop", itemIDBase++).getInt()); drops = new ItemDrop(tbConfig.getItem("drop", itemIDBase++).getInt());
miscResources = new ItemMiscResources(tbConfig.getItem("miscResources", itemIDBase++).getInt()); miscResources = new ItemMiscResources(tbConfig.getItem("miscResources", itemIDBase++).getInt());
try
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
BeeManager.inducers.put(miscResources.getStackForType(ResourceType.AROMATIC_LUMP), 80);
{ {
// 0x8700C6 = purpleish. int tier1 = tbConfig.getItem("thaumaturgePack1", itemIDBase++).getInt();
String backpackName = LanguageRegistry.instance().getStringLocalization("tb.backpack.thaumaturge"); int tier2 = tbConfig.getItem("thaumaturgePack2", itemIDBase++).getInt();
BackpackDefinition def = new BackpackDefinition("thaumaturge", backpackName, 0x8700C6);
thaumaturgeBackpackT1 = if (ThaumcraftHelper.isActive())
BackpackManager.backpackInterface.addBackpack(tbConfig.getItem("thaumaturgePack1", itemIDBase++).getInt(),
def, EnumBackpackType.T1);
thaumaturgeBackpackT2 =
BackpackManager.backpackInterface.addBackpack(tbConfig.getItem("thaumaturgePack2", itemIDBase++).getInt(),
def, EnumBackpackType.T2);
// Add additional items from configs to backpack.
if (ThaumicBees.getConfig().ThaumaturgeExtraItems.length() > 0)
{ {
FMLLog.info("Attempting to add extra items to Thaumaturge's backpack! If you get an error, check your ThaumicBees.conf."); try
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ThaumicBees.getConfig().ThaumaturgeExtraItems); {
// 0x8700C6 = purpleish.
String backpackName = LocalizationManager.getLocalizedString("tb.backpack.thaumaturge");
BackpackDefinition def = new BackpackDefinition("thaumaturge", backpackName, 0x8700C6);
thaumaturgeBackpackT1 = BackpackManager.backpackInterface.addBackpack(tier1, def, EnumBackpackType.T1);
thaumaturgeBackpackT2 = BackpackManager.backpackInterface.addBackpack(tier2, def, EnumBackpackType.T2);
// Add additional items from configs to backpack.
if (ThaumicBees.getConfig().ThaumaturgeExtraItems.length() > 0)
{
FMLLog.info("Attempting to add extra items to Thaumaturge's backpack! If you get an error, check your ThaumicBees.conf.");
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ThaumicBees.getConfig().ThaumaturgeExtraItems);
}
}
catch (Exception e)
{
FMLLog.severe("ThaumicBees encountered a problem during loading!");
FMLLog.severe("Could not register backpacks via Forestry. Check your FML Client log and see if Forestry crashed silently.");
}
} }
} }
catch (Exception e)
{
FMLLog.severe("ThaumicBees encountered a problem during loading!");
throw new RuntimeException("Could not register backpacks via Forestry. Check your FML Client log and see if Forestry crashed silently.", e);
}
magicCapsule = new ItemCapsule(CapsuleType.MAGIC, tbConfig.getItem("magicCapsule", itemIDBase++).getInt(), this.CapsuleStackSizeMax);
magicCapsule = new ItemCapsule(CapsuleType.MAGIC, tbConfig.getItem("magicCapsule", itemIDBase++).getInt());
pollen = new ItemPollen(tbConfig.getItem("pollen", itemIDBase++).getInt()); pollen = new ItemPollen(tbConfig.getItem("pollen", itemIDBase++).getInt());
solidFlux = new ItemSolidFlux(tbConfig.getItem("fluxCrystal", itemIDBase++).getInt());
{
int crystalId = tbConfig.getItem("fluxCrystal", itemIDBase++).getInt();
if (ThaumcraftHelper.isActive())
{
solidFlux = new ItemSolidFlux(crystalId);
}
}
hiveFrameMagic = new ItemMagicHiveFrame(tbConfig.getItem("frameMagic", itemIDBase++).getInt(), HiveFrameType.MAGIC); hiveFrameMagic = new ItemMagicHiveFrame(tbConfig.getItem("frameMagic", itemIDBase++).getInt(), HiveFrameType.MAGIC);
hiveFrameResilient = new ItemMagicHiveFrame(tbConfig.getItem("frameResilient", itemIDBase++).getInt(), HiveFrameType.RESILIENT); hiveFrameResilient = new ItemMagicHiveFrame(tbConfig.getItem("frameResilient", itemIDBase++).getInt(), HiveFrameType.RESILIENT);
@@ -177,6 +259,7 @@ public class Config
hiveFrameMetabolic = new ItemMagicHiveFrame(tbConfig.getItem("frameMetabolic", itemIDBase++).getInt(), HiveFrameType.METABOLIC); hiveFrameMetabolic = new ItemMagicHiveFrame(tbConfig.getItem("frameMetabolic", itemIDBase++).getInt(), HiveFrameType.METABOLIC);
hiveFrameNecrotic = new ItemMagicHiveFrame(tbConfig.getItem("frameNecrotic", itemIDBase++).getInt(), HiveFrameType.NECROTIC); hiveFrameNecrotic = new ItemMagicHiveFrame(tbConfig.getItem("frameNecrotic", itemIDBase++).getInt(), HiveFrameType.NECROTIC);
hiveFrameTemporal = new ItemMagicHiveFrame(tbConfig.getItem("frameTemporal", itemIDBase++).getInt(), HiveFrameType.TEMPORAL); hiveFrameTemporal = new ItemMagicHiveFrame(tbConfig.getItem("frameTemporal", itemIDBase++).getInt(), HiveFrameType.TEMPORAL);
hiveFrameOblivion = new ItemMagicHiveFrame(tbConfig.getItem("frameOblivion", itemIDBase++).getInt(), HiveFrameType.OBLIVION);
// Future frames, so they all are clumped together. // Future frames, so they all are clumped together.
itemIDBase++; itemIDBase++;
itemIDBase++; itemIDBase++;
@@ -186,13 +269,42 @@ public class Config
itemIDBase++; itemIDBase++;
itemIDBase++; itemIDBase++;
itemIDBase++; itemIDBase++;
itemIDBase++;
// Jelly babies for Dr. Whoniversary. ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameOblivion), 1, 1, 18));
ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameOblivion), 1, 3, 23));
jellyBaby = new ItemFood(tbConfig.getItem("jellyBabies", itemIDBase++).getInt(), 1, false).setAlwaysEdible() jellyBaby = new ItemFood(tbConfig.getItem("jellyBabies", itemIDBase++).getInt(), 1, false).setAlwaysEdible()
.setPotionEffect(Potion.moveSpeed.id, 5, 1, 1f); .setPotionEffect(Potion.moveSpeed.id, 5, 1, 1f);
jellyBaby.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE).setIconIndex(19).setItemName("jellyBabies"); jellyBaby.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE).setIconIndex(19).setItemName("jellyBabies");
voidCapsule = new ItemCapsule(CapsuleType.VOID, tbConfig.getItem("voidCapsule", itemIDBase++).getInt(), this.CapsuleStackSizeMax);
{
int scoopID = tbConfig.getItem("thaumiumScoop", itemIDBase++).getInt();
int grafterID = tbConfig.getItem("thaumiumGrafter", itemIDBase++).getInt();
if (ThaumcraftHelper.isActive())
{
thaumiumScoop = new ItemThaumiumScoop(scoopID);
MinecraftForge.setToolClass(thaumiumScoop, "scoop", 3);
thaumiumGrafter = new ItemThaumiumGrafter(grafterID);
MinecraftForge.setToolClass(thaumiumGrafter, "grafter", 3);
}
}
// Other tools I might need in the future
itemIDBase++;
itemIDBase++;
nuggets = new ItemNugget(tbConfig.getItem("beeNuggets", itemIDBase++).getInt());
OreDictionary.registerOre("nuggetIron", nuggets.getStackForType(NuggetType.IRON));
OreDictionary.registerOre("nuggetCopper", nuggets.getStackForType(NuggetType.COPPER));
OreDictionary.registerOre("nuggetTin", nuggets.getStackForType(NuggetType.TIN));
OreDictionary.registerOre("nuggetSilver", nuggets.getStackForType(NuggetType.SILVER));
OreDictionary.registerOre("nuggetLead", nuggets.getStackForType(NuggetType.LEAD));
OreDictionary.registerOre("shardDiamond", nuggets.getStackForType(NuggetType.DIAMOND));
OreDictionary.registerOre("shardEmerald", nuggets.getStackForType(NuggetType.EMERALD));
} }
private void doMiscConfig() private void doMiscConfig()
@@ -208,6 +320,23 @@ public class Config
p.comment = "Set to true if you want ThaumicBees to add several Thaumcraft blocks & items to Forestry backpacks." + p.comment = "Set to true if you want ThaumicBees to add several Thaumcraft blocks & items to Forestry backpacks." +
"\n Set to false to disable."; "\n Set to false to disable.";
this.AddThaumcraftItemsToBackpacks = p.getBoolean(true); this.AddThaumcraftItemsToBackpacks = p.getBoolean(true);
p = tbConfig.get("general", "capsuleStackSize", 64);
p.comment = "Allows you to edit the stack size of the capsules in ThaumicBees if using GregTech, \n" +
"or the reduced capsule size in Forestry & Railcraft. Default: 64";
this.CapsuleStackSizeMax = p.getInt();
p = tbConfig.get("general", "disableVersionCheck", false);
p.comment = "Set to true to stop ThaumicBees from checking for updates.";
this.SkipUpdateCheck = p.getBoolean(false);
p = tbConfig.get("general", "areMagicPlanksFlammable", false);
p.comment = "Set to true to allow Greatwood & Silverwood planks to burn in a fire.";
this.AreMagicPlanksFlammable = p.getBoolean(false);
p = tbConfig.get("general", "useImpregnatedStickInTools", false);
p.comment = "Set to true to make Thaumium Grafter & Scoop require impregnated sticks in the recipe.";
this.UseImpregnatedStickInTools = p.getBoolean(false);
} }
} }
@@ -3,14 +3,19 @@ package thaumicbees.main;
import net.minecraftforge.common.Configuration; import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe; import net.minecraftforge.event.ForgeSubscribe;
import thaumicbees.compat.CompatabilityManager; import thaumicbees.item.types.PlankType;
import thaumicbees.main.utils.CompatabilityManager;
import thaumicbees.main.utils.CraftingManager; import thaumicbees.main.utils.CraftingManager;
import thaumicbees.main.utils.LocalizationManager; import thaumicbees.main.utils.LocalizationManager;
import thaumicbees.main.utils.VersionInfo; import thaumicbees.main.utils.VersionInfo;
import thaumicbees.main.utils.compat.EquivalentExchangeHelper;
import thaumicbees.main.utils.compat.ExtraBeesHelper;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy; import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent; 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.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import forestry.api.core.ItemInterface; import forestry.api.core.ItemInterface;
@@ -20,7 +25,7 @@ import forestry.api.core.ItemInterface;
name="Thaumic Bees", name="Thaumic Bees",
useMetadata=true, useMetadata=true,
acceptedMinecraftVersions=VersionInfo.MCVersion, acceptedMinecraftVersions=VersionInfo.MCVersion,
version=VersionInfo.Version, version=VersionInfo.Version + " - " + VersionInfo.Build,
dependencies=VersionInfo.Depends dependencies=VersionInfo.Depends
) )
public class ThaumicBees public class ThaumicBees
@@ -47,14 +52,15 @@ public class ThaumicBees
this.configsPath = event.getModConfigurationDirectory().getAbsolutePath(); this.configsPath = event.getModConfigurationDirectory().getAbsolutePath();
this.modConfig = new Config(event.getSuggestedConfigurationFile()); this.modConfig = new Config(event.getSuggestedConfigurationFile());
CompatabilityManager.registerResearch(); // Compatibility Helpers setup time.
ThaumcraftHelper.init();
ExtraBeesHelper.init();
EquivalentExchangeHelper.init();
} }
@Mod.Init @Mod.Init
public void init(FMLInitializationEvent event) public void init(FMLInitializationEvent event)
{ {
// Check on ExtraBees & enable content. =D
this.modConfig.ExtraBeesInstalled = cpw.mods.fml.common.Loader.isModLoaded("ExtraBees");
this.proxy.preloadTextures(); this.proxy.preloadTextures();
try try
@@ -70,6 +76,7 @@ public class ThaumicBees
} }
this.modConfig.setupBlocks(); this.modConfig.setupBlocks();
this.modConfig.registerTileEntities();
this.modConfig.setupItems(); this.modConfig.setupItems();
CompatabilityManager.setupBackpacks(); CompatabilityManager.setupBackpacks();
@@ -78,29 +85,24 @@ public class ThaumicBees
@Mod.PostInit @Mod.PostInit
public void postInit(FMLPostInitializationEvent event) public void postInit(FMLPostInitializationEvent event)
{ {
this.setupBees(); thaumicbees.bees.Allele.setupAdditionalAlleles();
thaumicbees.bees.BeeSpecies.setupBeeSpecies();
thaumicbees.bees.BeeMutation.setupMutations();
this.modConfig.saveConfigs(); this.modConfig.saveConfigs();
CompatabilityManager.setupItemAspects(); ThaumcraftHelper.setupItemAspects();
// Vanilla, Forestry & Thaumcraft crafting setup // Vanilla, Forestry & Thaumcraft crafting setup
CraftingManager.setupCrafting(); CraftingManager.setupCrafting();
// Forestry has init'd by this point. ThaumcraftHelper.setupResearch();
MinecraftForge.EVENT_BUS.register(this);
CompatabilityManager.setupResearch(); VersionInfo.doVersionCheck();
} }
public static Config getConfig() public static Config getConfig()
{ {
return object.modConfig; return object.modConfig;
} }
private void setupBees()
{
thaumicbees.bees.Allele.setupAdditionalAlleles();
thaumicbees.bees.BeeSpecies.setupBeeSpecies();
thaumicbees.bees.BeeMutation.setupMutations();
}
} }
@@ -0,0 +1,64 @@
package thaumicbees.main.utils;
import java.io.File;
import java.lang.reflect.Field;
import java.util.ArrayList;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ItemApi;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchList;
import thaumicbees.bees.Allele;
import thaumicbees.bees.BeeGenomeManager;
import thaumicbees.item.ItemComb;
import thaumicbees.item.ItemMiscResources;
import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType;
import thaumicbees.item.types.LiquidType;
import thaumicbees.item.types.PlankType;
import thaumicbees.item.types.PollenType;
import thaumicbees.item.types.PropolisType;
import thaumicbees.item.types.ResourceType;
import thaumicbees.item.types.WaxType;
import thaumicbees.main.CommonProxy;
import thaumicbees.main.Config;
import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.compat.ExtraBeesHelper;
import thaumicbees.main.utils.compat.ForestryHelper;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import thaumicbees.main.utils.compat.ForestryHelper.CircuitBoard;
import thaumicbees.main.utils.compat.ForestryHelper.Comb;
import thaumicbees.main.utils.compat.ForestryHelper.CraftingMaterial;
import thaumicbees.main.utils.compat.ForestryHelper.Pollen;
import thaumicbees.main.utils.compat.ForestryHelper.Propolis;
import thaumicbees.main.utils.compat.ForestryHelper.Tube;
import thaumicbees.main.utils.compat.ThaumcraftHelper.MiscResource;
import thaumicbees.storage.BackpackDefinition;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.core.BlockInterface;
import forestry.api.core.ItemInterface;
import forestry.api.storage.BackpackManager;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.Property;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.oredict.OreDictionary;
public class CompatabilityManager
{
public static void setupBackpacks()
{
}
}
@@ -1,22 +1,29 @@
package thaumicbees.main.utils; package thaumicbees.main.utils;
import java.util.ArrayList;
import thaumcraft.api.EnumTag; import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags; import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApi;
import thaumicbees.bees.Allele; import thaumicbees.bees.Allele;
import thaumicbees.bees.BeeGenomeManager; import thaumicbees.bees.BeeGenomeManager;
import thaumicbees.bees.BeeSpecies; import thaumicbees.bees.BeeSpecies;
import thaumicbees.compat.ShapelessBeeInfusionCraftingRecipe;
import thaumicbees.compat.ThaumcraftHelper;
import thaumicbees.item.ItemCapsule; import thaumicbees.item.ItemCapsule;
import thaumicbees.item.ItemWax;
import thaumicbees.item.types.CombType; import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType; import thaumicbees.item.types.DropType;
import thaumicbees.item.types.HiveFrameType; import thaumicbees.item.types.HiveFrameType;
import thaumicbees.item.types.LiquidType; import thaumicbees.item.types.LiquidType;
import thaumicbees.item.types.NuggetType;
import thaumicbees.item.types.PlankType;
import thaumicbees.item.types.PropolisType; import thaumicbees.item.types.PropolisType;
import thaumicbees.item.types.ResourceType; import thaumicbees.item.types.ResourceType;
import thaumicbees.item.types.WaxType; import thaumicbees.item.types.WaxType;
import thaumicbees.main.Config; import thaumicbees.main.Config;
import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.compat.ForestryHelper;
import thaumicbees.main.utils.compat.ShapelessBeeInfusionCraftingRecipe;
import thaumicbees.main.utils.compat.ThaumcraftHelper;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.apiculture.BeeManager; import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.apiculture.EnumBeeChromosome;
@@ -32,29 +39,37 @@ import net.minecraftforge.liquids.LiquidContainerData;
import net.minecraftforge.liquids.LiquidContainerRegistry; import net.minecraftforge.liquids.LiquidContainerRegistry;
import net.minecraftforge.liquids.LiquidDictionary; import net.minecraftforge.liquids.LiquidDictionary;
import net.minecraftforge.liquids.LiquidStack; import net.minecraftforge.liquids.LiquidStack;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
public class CraftingManager public class CraftingManager
{ {
public static void setupCrafting() public static void setupCrafting()
{ {
ItemStack inputStack; // Variable to hold forestry items // Broken up into seperate sections to make things a bit easier to find.
setupVanillaCrafting();
setupCentrifugeRecipes();
setupSqueezerRecipes();
setupCarpenterRecipes();
// Essentia bottles if (ThaumcraftHelper.isActive())
ItemStack output = new ItemStack(Config.tcEssentiaBottle); {
output.stackSize = 8; ThaumcraftHelper.setupThaumcraftCrafting();
GameRegistry.addRecipe(output, new Object[] { }
" C ", "GPG", "PGP", else
'G', Config.wax, {
'C', Item.clay, setupThaumcraftAlternativeCrafting();
'P', Block.thinGlass }
});
output = new ItemStack(Config.tcEssentiaBottle); registerLiquidContainer(Config.magicCapsule);
output.stackSize = 4; registerLiquidContainer(Config.voidCapsule);
GameRegistry.addRecipe(output, new Object[] { }
" W ", "W W", " W ",
'W', Config.wax private static void setupVanillaCrafting()
}); {
ItemStack input;
ItemStack output;
// Magic capsules // Magic capsules
output = new ItemStack(Config.magicCapsule); output.stackSize = 4; output = new ItemStack(Config.magicCapsule); output.stackSize = 4;
@@ -63,33 +78,18 @@ public class CraftingManager
'W', Config.wax.getStackForType(WaxType.MAGIC) 'W', Config.wax.getStackForType(WaxType.MAGIC)
}); });
output = new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.KNOWLEDGE_FRAGMENT.ordinal());
GameRegistry.addRecipe(output, new Object[] {
"FF", "FF",
'F', Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT)
});
// T1 Thaumaturge's backpack
GameRegistry.addRecipe(new ItemStack(Config.thaumaturgeBackpackT1), new Object[] {
"SWS", "NCN", "SWS",
'S', Item.silk,
'W', Block.cloth,
'N', new ItemStack(Config.tcMiscResource.itemID, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()),
'C', Block.chest
});
// Concentrated Fertilizer -> Forestry fertilizer // Concentrated Fertilizer -> Forestry fertilizer
inputStack = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER); input = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
output = ItemInterface.getItem("fertilizerCompound"); output = ItemInterface.getItem("fertilizerCompound");
output.stackSize = 6; output.stackSize = 6;
GameRegistry.addRecipe(output, new Object[] { GameRegistry.addRecipe(output, new Object[] {
" S ", " F ", " S ", " S ", " F ", " S ",
'F', inputStack, 'F', input,
'S', Block.sand 'S', Block.sand
}); });
GameRegistry.addRecipe(output, new Object[] { GameRegistry.addRecipe(output, new Object[] {
" ", "SFS", " ", " ", "SFS", " ",
'F', inputStack, 'F', input,
'S', Block.sand 'S', Block.sand
}); });
@@ -97,7 +97,7 @@ public class CraftingManager
output.stackSize = 12; output.stackSize = 12;
GameRegistry.addRecipe(output, new Object[] { GameRegistry.addRecipe(output, new Object[] {
"aaa", "aFa", "aaa", "aaa", "aFa", "aaa",
'F', inputStack, 'F', input,
'a', ItemInterface.getItem("ash") 'a', ItemInterface.getItem("ash")
}); });
@@ -108,20 +108,143 @@ public class CraftingManager
'B', Item.glassBottle 'B', Item.glassBottle
}); });
// "bottling" Crystal aspects. GameRegistry.addRecipe(new ItemStack(Block.slowSand, 0, 4), new Object[] {
for (EnumTag tag : EnumTag.values()) "SwS", "wDw", "SwS",
'S', Block.sand,
'D', Block.dirt,
'w', Config.wax.getStackForType(WaxType.SOUL)
});
GameRegistry.addRecipe(new ItemStack(Block.slowSand, 0, 4), new Object[] {
"wSw", "SDS", "wSw",
'S', Block.sand,
'D', Block.dirt,
'w', Config.wax.getStackForType(WaxType.SOUL)
});
if (OreDictionary.getOres("ingotCopper").size() <= 0)
{ {
if (tag != EnumTag.UNKNOWN) NuggetType.COPPER.setActive(false);
{ }
output = new ItemStack(Config.tcEssentiaBottle, 1, tag.id + 1); if (OreDictionary.getOres("ingotTin").size() <= 0)
GameRegistry.addRecipe(output, new Object[] { {
"ccc", "cxc", "ccc", NuggetType.TIN.setActive(false);
'c', new ItemStack(Config.solidFlux, 1, tag.id), }
'x', Config.tcEssentiaBottle if (OreDictionary.getOres("ingotSilver").size() <= 0)
}); {
} NuggetType.SILVER.setActive(false);
}
if (OreDictionary.getOres("ingotLead").size() <= 0)
{
NuggetType.LEAD.setActive(false);
} }
if (NuggetType.COPPER.isActive())
{
GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotCopper").get(0), new Object[] {
"xxx", "xxx", "xxx",
'x', "nuggetCopper"
}));
}
if (NuggetType.TIN.isActive())
{
GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotTin").get(0), new Object[] {
"xxx", "xxx", "xxx",
'x', "nuggetTin"
}));
}
if (NuggetType.SILVER.isActive())
{
GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotSilver").get(0), new Object[] {
"xxx", "xxx", "xxx",
'x', "nuggetSilver"
}));
}
if (NuggetType.LEAD.isActive())
{
GameRegistry.addRecipe(new ShapedOreRecipe(OreDictionary.getOres("ingotLead").get(0), new Object[] {
"xxx", "xxx", "xxx",
'x', "nuggetLead"
}));
}
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.ingotIron), new Object[] {
"xxx", "xxx", "xxx",
'x', "nuggetIron"
}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.diamond), new Object[] {
"xxx", "xxx", "xxx",
'x', "shardDiamond"
}));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.emerald), new Object[] {
"xxx", "xxx", "xxx",
'x', "shardEmerald"
}));
if (ThaumcraftHelper.isActive())
{
// Slabs
for (int i = 0; i < PlankType.values().length; ++i)
{
input = new ItemStack(Config.planksWood, 1, i);
output = new ItemStack(Config.slabWoodHalf, 6, i);
GameRegistry.addRecipe(output, new Object[] {
"PPP",
'P', input
});
}
// Essentia bottles
output = new ItemStack(Config.tcEssentiaBottle);
output.stackSize = 8;
GameRegistry.addRecipe(output, new Object[] {
" C ", "GPG", "PGP",
'G', Config.wax,
'C', Item.clay,
'P', Block.thinGlass
});
output = new ItemStack(Config.tcEssentiaBottle);
output.stackSize = 4;
GameRegistry.addRecipe(output, new Object[] {
" W ", "W W", " W ",
'W', Config.wax
});
output = new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.KNOWLEDGE_FRAGMENT.ordinal());
GameRegistry.addRecipe(output, new Object[] {
"FF", "FF",
'F', Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT)
});
// T1 Thaumaturge's backpack
GameRegistry.addRecipe(new ItemStack(Config.thaumaturgeBackpackT1), new Object[] {
"SWS", "NCN", "SWS",
'S', Item.silk,
'W', Block.cloth,
'N', new ItemStack(Config.tcMiscResource.itemID, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()),
'C', Block.chest
});
// "bottling" Crystal aspects.
for (EnumTag tag : EnumTag.values())
{
if (tag != EnumTag.UNKNOWN)
{
output = new ItemStack(Config.tcEssentiaBottle, 1, tag.id + 1);
GameRegistry.addRecipe(output, new Object[] {
"ccc", "cxc", "ccc",
'c', new ItemStack(Config.solidFlux, 1, tag.id),
'x', Config.tcEssentiaBottle
});
}
}
}
}
private static void setupCentrifugeRecipes()
{
// 20 is the 'average' time to centrifuge a comb. // 20 is the 'average' time to centrifuge a comb.
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.OCCULT), RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.OCCULT),
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") }, new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
@@ -132,68 +255,76 @@ public class CraftingManager
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.PAPERY), RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.PAPERY),
new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) }, new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
new int[] { 80, 20, 5 }); new int[] { 80, 20, 5 });
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.STARK),
new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.STARK) },
new int[] { 10, 95, 15 });
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.AIRY),
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.AIR) },
new int[] { 100, 65 });
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.FIREY),
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.FIRE) },
new int[] { 100, 65 });
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.WATERY),
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.WATER)},
new int[] { 100, 65 });
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.EARTHY),
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.EARTH) },
new int[] { 100, 65 });
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.INFUSED),
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.INFUSED) },
new int[] { 100, 50, 65 });
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.INTELLECT), RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.INTELLECT),
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeydew"), Config.drops.getStackForType(DropType.INTELLECT) }, new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeydew"), Config.drops.getStackForType(DropType.INTELLECT) },
new int[] { 90, 40, 2 }); new int[] { 90, 40, 10 });
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.SKULKING), RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.SKULKING),
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemInterface.getItem("propolis"), ItemInterface.getItem("honeydew") }, new ItemStack[] {ItemInterface.getItem("beeswax"), ItemInterface.getItem("propolis"), ItemInterface.getItem("honeydew") },
new int[] { 90, 20, 35 }); new int[] { 90, 20, 35 });
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.SOUL),
new ItemStack[] {Config.wax.getStackForType(WaxType.SOUL), ItemInterface.getItem("honeydew") },
new int[] { 95, 26 });
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.STARK), if (ThaumcraftHelper.isActive())
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.DULL.ordinal())}, {
new int[] { 13 }); RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.STARK),
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.AIR), new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.STARK) },
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal())}, new int[] { 10, 95, 15 });
new int[] { 10 }); RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.AIRY),
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.FIRE), new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.AIR) },
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal())}, new int[] { 100, 65 });
new int[] { 10 }); RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.FIREY),
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.WATER), new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.FIRE) },
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal())}, new int[] { 100, 65 });
new int[] { 10 }); RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.WATERY),
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.EARTH), new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.WATER)},
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal())}, new int[] { 100, 65 });
new int[] { 10 }); RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.EARTHY),
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.INFUSED), new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.EARTH) },
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal())}, new int[] { 100, 65 });
new int[] { 10 }); RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.INFUSED),
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.INFUSED) },
new int[] { 100, 50, 65 });
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.STARK),
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.DULL.ordinal())},
new int[] { 10 });
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.AIR),
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal())},
new int[] { 10 });
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.FIRE),
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal())},
new int[] { 10 });
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.WATER),
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal())},
new int[] { 10 });
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.EARTH),
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal())},
new int[] { 10 });
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.INFUSED),
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal())},
new int[] { 10 });
}
}
private static void setupSqueezerRecipes()
{
// Squeezer recipes // Squeezer recipes
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {Config.propolis.getStackForType(PropolisType.FIRE) }, if (ThaumcraftHelper.isActive())
new LiquidStack(Block.lavaStill, 250), {
new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()), 18); RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {Config.propolis.getStackForType(PropolisType.FIRE) },
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {Config.propolis.getStackForType(PropolisType.WATER) }, new LiquidStack(Block.lavaStill, 250),
new LiquidStack(Block.waterStill, 500), new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()), 10);
new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()), 18); RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {Config.propolis.getStackForType(PropolisType.WATER) },
new LiquidStack(Block.waterStill, 500),
new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()), 10);
}
}
// Carpenter recipes private static void setupCarpenterRecipes()
inputStack = ItemInterface.getItem("craftingMaterial"); {
inputStack.setItemDamage(3); // Set to Silk Mesh ItemStack input;
output = new ItemStack(Config.thaumaturgeBackpackT2); ItemStack output;
RecipeManagers.carpenterManager.addRecipe(200, new LiquidStack(Block.waterStill.blockID, 1000), null, output, new Object[] {
"WXW", "WTW", "WWW",
'X', Item.diamond,
'W', inputStack,
'T', new ItemStack(Config.thaumaturgeBackpackT1)
});
output = BlockInterface.getBlock("candle"); output = BlockInterface.getBlock("candle");
output.stackSize = 24; output.stackSize = 24;
@@ -205,12 +336,12 @@ public class CraftingManager
output = BlockInterface.getBlock("candle"); output = BlockInterface.getBlock("candle");
output.stackSize = 6; output.stackSize = 6;
inputStack = ItemInterface.getItem("craftingMaterial"); input = ItemInterface.getItem("craftingMaterial");
inputStack.setItemDamage(2); // Set to Silk Wisp input.setItemDamage(ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()); // Set to Silk Wisp
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] { RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
"WSW", "WSW",
'W', Config.wax, 'W', Config.wax,
'S', inputStack 'S', input
}); });
output = Config.miscResources.getStackForType(ResourceType.AROMATIC_LUMP, 2); output = Config.miscResources.getStackForType(ResourceType.AROMATIC_LUMP, 2);
@@ -227,113 +358,31 @@ public class CraftingManager
'J', ItemInterface.getItem("royalJelly"), 'J', ItemInterface.getItem("royalJelly"),
'D', Config.drops.getStackForType(DropType.ENCHANTED) 'D', Config.drops.getStackForType(DropType.ENCHANTED)
}); });
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
BeeManager.inducers.put(output, 80);
output = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER); if (ThaumcraftHelper.isActive())
ItemStack inputA = ItemInterface.getItem("apatite"); {
ObjectTags tags = (new ObjectTags()).add(EnumTag.CROP, 12); // Carpenter recipes
output.stackSize = 2; input = ItemInterface.getItem("craftingMaterial");
ThaumcraftApi.addShapelessInfusionCraftingRecipe("FERTILIZER", "FERTILIZER", 5, tags, output, new Object[] { input.setItemDamage(3); // Set to Silk Mesh
inputA output = new ItemStack(Config.thaumaturgeBackpackT2);
}); RecipeManagers.carpenterManager.addRecipe(200, new LiquidStack(Block.waterStill.blockID, 1000), null, output, new Object[] {
"WXW", "WTW", "WWW",
'X', Item.diamond,
'W', input,
'T', new ItemStack(Config.thaumaturgeBackpackT1)
});
output = new ItemStack(Config.planksWood, 4, 0);
RecipeManagers.carpenterManager.addRecipe(8, new LiquidStack(Block.waterStill, 500), null, output, new Object[] {
"B",
'B', new ItemStack(Config.tcLog, 1, 0)
});
output = new ItemStack(Config.hiveFrameMagic); output = new ItemStack(Config.planksWood, 6, 1);
inputA = ItemInterface.getItem("frameUntreated"); RecipeManagers.carpenterManager.addRecipe(8, new LiquidStack(Block.waterStill, 500), null, output, new Object[] {
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8); "B",
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAME", "FRAMEMAGIC", 50, tags, output, new Object[] { 'B', new ItemStack(Config.tcLog, 1, 1)
inputA });
}); }
output = new ItemStack(Config.hiveFrameResilient);
tags = new ObjectTags().add(EnumTag.WOOD, 12).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAME2", "FRAMERESILIENT", 50, tags, output, new Object[] {
" i ", "ifi", " i ",
'f', Config.hiveFrameMagic,
'i', Item.ingotIron
});
output = new ItemStack(Config.hiveFrameGentle);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.HEAL, 12);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMEGENTLE", "FRAMEGENTLE", 50, tags, output, new Object[] {
"www", "wFw", "www",
'F', inputA,
'w', ItemInterface.getItem("beeswax")
});
output = new ItemStack(Config.hiveFrameMetabolic);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.LIFE, 8).add(EnumTag.MOTION, 8)
.add(EnumTag.EXCHANGE, 8);
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAMEMETA", "FRAMEMETABOLIC", 50, tags, output, new Object[] {
Item.magmaCream,
inputA
});
output = new ItemStack(Config.hiveFrameNecrotic);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12).add(EnumTag.DEATH, 16)
.add(EnumTag.POISON, 4);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMENECRO", "FRAMENECROTIC", 50, tags, output, new Object[] {
" S ", "SxS", " S ",
'S', Item.rottenFlesh,
'x', inputA
});
output = new ItemStack(Config.hiveFrameTemporal);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.TIME, 2);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMETIME", "FRAMETIME", 50, tags, output, new Object[] {
"tSt", "SFS", "tSt",
't', Item.stick,
'S', Block.sand,
'F', inputA
});
ItemStack drone = BeeGenomeManager.getBeeNBTForSpecies(BeeSpecies.STARK, EnumBeeType.DRONE);
ItemStack princess = BeeGenomeManager.getBeeNBTForSpecies(BeeSpecies.STARK, EnumBeeType.PRINCESS);
String researchKey = "BEEINFUSION";
tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION1", BeeSpecies.AIR.getBeeItem(EnumBeeType.DRONE),
new ItemStack[] { drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal())},
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION2", BeeSpecies.AIR.getBeeItem(EnumBeeType.PRINCESS),
new ItemStack[] { princess , new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION3", BeeSpecies.FIRE.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION4", BeeSpecies.FIRE.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION5", BeeSpecies.WATER.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION6", BeeSpecies.WATER.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION7", BeeSpecies.EARTH.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION8", BeeSpecies.EARTH.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = new ObjectTags().add(EnumTag.MAGIC, 40).add(EnumTag.FLUX, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION9", BeeSpecies.INFUSED.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION0", BeeSpecies.INFUSED.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
registerLiquidContainer(Config.magicCapsule);
} }
private static void registerLiquidContainer(ItemCapsule baseCapsule) private static void registerLiquidContainer(ItemCapsule baseCapsule)
@@ -375,4 +424,78 @@ public class CraftingManager
// Empty will be set to unavailable. Obviously, it always is. // Empty will be set to unavailable. Obviously, it always is.
LiquidType.EMPTY.available = true; LiquidType.EMPTY.available = true;
} }
private static void setupThaumcraftAlternativeCrafting()
{
ItemStack input, output;
output = new ItemStack(Config.hiveFrameMagic);
input = ItemInterface.getItem("frameUntreated");
GameRegistry.addRecipe(output, new Object[] {
"www", "wfw", "www",
'w', Config.wax.getStackForType(WaxType.MAGIC),
'f', input
});
output = new ItemStack(Config.hiveFrameResilient);
GameRegistry.addRecipe(output, new Object[] {
"wiw", "ifi", "wiw",
'f', Config.hiveFrameMagic,
'i', Item.ingotIron,
'w', Config.wax.getStackForType(WaxType.MAGIC)
});
output = new ItemStack(Config.hiveFrameGentle);
GameRegistry.addRecipe(output, new Object[] {
"WwW", "wFw", "WwW",
'F', input,
'w', ItemInterface.getItem("beeswax"),
'W', Config.wax.getStackForType(WaxType.MAGIC)
});
output = new ItemStack(Config.hiveFrameMetabolic);
GameRegistry.addShapelessRecipe(output, new Object[] {
Item.magmaCream,
input,
Config.wax.getStackForType(WaxType.MAGIC),
Config.wax.getStackForType(WaxType.MAGIC),
Config.wax.getStackForType(WaxType.MAGIC),
Config.wax.getStackForType(WaxType.MAGIC),
});
output = new ItemStack(Config.hiveFrameNecrotic);
GameRegistry.addRecipe(output, new Object[] {
"wSw", "SFS", "wSw",
'S', Item.rottenFlesh,
'F', input,
'w', Config.wax.getStackForType(WaxType.MAGIC)
});
output = new ItemStack(Config.hiveFrameTemporal);
GameRegistry.addRecipe(output, new Object[] {
"wSt", "wFw", "tSw",
't', Item.stick,
'S', Block.sand,
'F', input,
'w', Config.wax.getStackForType(WaxType.MAGIC)
});
GameRegistry.addRecipe(output, new Object[] {
"tSw", "wFw", "wSt",
't', Item.stick,
'S', Block.sand,
'F', input,
'w', Config.wax.getStackForType(WaxType.MAGIC)
});
output = Config.voidCapsule.getCapsuleForLiquid(LiquidType.EMPTY);
output.stackSize = 4;
GameRegistry.addRecipe(output, new Object[] {
"wDw", "GPG", "TwT",
'G', Block.glass,
'D', Item.diamond,
'P', Item.eyeOfEnder,
'T', Item.ingotGold,
'w', Config.wax.getStackForType(WaxType.MAGIC)
});
}
} }
@@ -0,0 +1,174 @@
package thaumicbees.main.utils;
import thaumicbees.block.TileEntityEffectJar;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
public class EffectJarHousing implements IBeeHousing
{
TileEntityEffectJar jarEntity;
public EffectJarHousing(TileEntityEffectJar entity)
{
this.jarEntity = entity;
}
@Override
public float getTerritoryModifier(IBeeGenome genome)
{
return 1;
}
@Override
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate)
{
return 0.5f;
}
@Override
public int getXCoord()
{
return this.jarEntity.xCoord;
}
@Override
public int getYCoord()
{
return this.jarEntity.yCoord;
}
@Override
public int getZCoord()
{
return this.jarEntity.zCoord;
}
@Override
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate)
{
return 0;
}
@Override
public float getProductionModifier(IBeeGenome genome)
{
return 0;
}
@Override
public float getFloweringModifier(IBeeGenome genome)
{
return 0;
}
@Override
public boolean isSealed()
{
return false;
}
@Override
public boolean isSelfLighted()
{
return false;
}
@Override
public boolean isSunlightSimulated()
{
return false;
}
@Override
public boolean isHellish()
{
return false;
}
@Override
public void onQueenChange(ItemStack queen) { }
@Override
public void wearOutEquipment(int amount) { }
@Override
public void onQueenDeath(IBee queen) { }
@Override
public void onPostQueenDeath(IBee queen) { }
@Override
public ItemStack getQueen()
{
return null;
}
@Override
public ItemStack getDrone()
{
return null;
}
@Override
public void setQueen(ItemStack itemstack) { }
@Override
public void setDrone(ItemStack itemstack) { }
@Override
public int getBiomeId()
{
return this.jarEntity.worldObj.getBiomeGenForCoords(getXCoord(), getYCoord()).biomeID;
}
@Override
public EnumTemperature getTemperature()
{
return EnumTemperature.NORMAL;
}
@Override
public EnumHumidity getHumidity()
{
return EnumHumidity.NORMAL;
}
@Override
public World getWorld()
{
return this.jarEntity.worldObj;
}
@Override
public String getOwnerName()
{
return this.jarEntity.getOwner();
}
@Override
public void setErrorState(int state) { }
@Override
public int getErrorOrdinal()
{
return 0;
}
@Override
public boolean canBreed()
{
return false;
}
@Override
public boolean addProduct(ItemStack product, boolean all)
{
return true;
}
}
@@ -1,5 +1,6 @@
package thaumicbees.main.utils; package thaumicbees.main.utils;
import net.minecraft.util.StringTranslate;
import thaumicbees.main.CommonProxy; import thaumicbees.main.CommonProxy;
import cpw.mods.fml.common.registry.LanguageRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
@@ -25,4 +26,13 @@ public class LocalizationManager
} }
} }
public static String getLocalizedString(String key)
{
String result = LanguageRegistry.instance().getStringLocalization(key);
if (result.isEmpty())
{
result = LanguageRegistry.instance().getStringLocalization(key, "en_US");
}
return result;
}
} }
@@ -44,7 +44,7 @@ public enum MoonPhase
public String getName() public String getName()
{ {
return LanguageRegistry.instance().getStringLocalization("tb.moon." + this.phaseName); return LocalizationManager.getLocalizedString("tb.moon." + this.phaseName);
} }
public static MoonPhase getMoonPhase(World w) public static MoonPhase getMoonPhase(World w)
@@ -0,0 +1,102 @@
package thaumicbees.main.utils;
import java.util.ArrayList;
import java.util.EnumSet;
import net.minecraft.entity.player.EntityPlayer;
import cpw.mods.fml.common.IScheduledTickHandler;
import cpw.mods.fml.common.TickType;
public class TickHandlerVersion implements IScheduledTickHandler
{
public static TickHandlerVersion instance = new TickHandlerVersion();
private static ArrayList<VersionInfo> modVersionInfo = new ArrayList();
private static boolean initialized;
private static boolean sent;
private static int modIndex = 0;
public static boolean initialize()
{
if (initialized)
{
return false;
}
initialized = true;
return true;
}
public static boolean isInitialized()
{
return initialized;
}
public static boolean registerModVersionInfo(VersionInfo info)
{
if (modVersionInfo.contains(info))
{
return false;
}
modVersionInfo.add(info);
return true;
}
@Override
public void tickStart(EnumSet<TickType> type, Object... tickData)
{
if (sent)
{
return;
}
if (modIndex < modVersionInfo.size())
{
VersionInfo anInfo = modVersionInfo.get(modIndex);
if (anInfo.isNewVersionAvailable())
{
EntityPlayer player = (EntityPlayer) tickData[0];
player.sendChatToPlayer("[" + anInfo.modName + "] A new version is available: " + anInfo.getLatestVersion());
player.sendChatToPlayer(anInfo.getVersionDescription());
}
modIndex += 1;
}
else
{
sent = true;
}
}
@Override
public void tickEnd(EnumSet<TickType> type, Object... tickData)
{
}
@Override
public EnumSet<TickType> ticks()
{
if (TickHandlerVersion.sent)
{
return EnumSet.noneOf(TickType.class);
}
return EnumSet.of(TickType.PLAYER);
}
@Override
public String getLabel()
{
return "thaumicbees.version";
}
@Override
public int nextTickSpacing()
{
if (!sent)
{
return 200;
}
return 72000;
}
}
@@ -1,14 +1,254 @@
package thaumicbees.main.utils; package thaumicbees.main.utils;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.logging.Level;
import java.util.logging.Logger;
import thaumicbees.main.ThaumicBees;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.registry.TickRegistry;
import cpw.mods.fml.relauncher.Side;
/**
* Using some of the VersionInfo code from cofh. (Thanks, Lemming!)
* @author MysteriousAges
*
*/
public class VersionInfo public class VersionInfo
{ {
public static final String Version = "@MODVERSION@"; public static final String Version = "@VERSION@";
public static final String MCVersion = "@MCVERSION@";
public static final String Build = "@BUILD_NUMBER@"; public static final String Build = "@BUILD_NUMBER@";
public static final String MCVersion = "@MCVERSION@";
public static final String VersionURL = "http://bit.ly/thaumicbeeversion";
public static final String Logo = "/gfx/thaumicbees/logo.png"; public static final String Logo = "/gfx/thaumicbees/logo.png";
public static final String Depends = "required-after:Forestry;required-after:Thaumcraft@[3.0.3,);after:ExtraBees"; public static final String Depends = "required-after:Forestry;after:Thaumcraft@[3.0.3,);after:ExtraBees";
boolean criticalUpdate;
boolean newVersion;
boolean newMinecraftVersion;
boolean versionCheckComplete;
String latestModVersion;
String latestMCVersion = MCVersion;
String description = "";
String modName;
String modVersion;
String releaseURL;
Logger modLogger = FMLLog.getLogger();
public static int[] parseVersion(String rawVersion)
{
ArrayList<Integer> versionTokens = new ArrayList<Integer>();
String[] tokens = rawVersion.trim().split("\\.");
for (int i = 0; i < tokens.length; ++i)
{
tokens[i] = tokens[i].trim();
if (tokens[i].matches("[0-9]+"))
{
versionTokens.add(Integer.valueOf(tokens[i]));
}
else if (tokens[i].matches("[0-9]+[a-z]"))
{
String numberString = tokens[i].substring(0, tokens[i].length()-1);
versionTokens.add(Integer.valueOf(numberString));
versionTokens.add(Character.getNumericValue(tokens[i].charAt(tokens[i].length()-1)));
}
}
// Can't use versionTokens.toArray 'cause that returns an Integer[], not int[]
int[] value = new int[versionTokens.size()];
for (int i = 0; i < value.length; ++i)
{
value[i] = versionTokens.get(i).intValue();
}
return value;
}
/* VERSION COMPARISON */
public static boolean beforeTargetVersion(String version, String target)
{
boolean result = false;
int[] versionTokens = parseVersion(version);
int[] targetTokens = parseVersion(target);
for (int i = 0; i < versionTokens.length && i < targetTokens.length; ++i)
{
if (versionTokens[i] < targetTokens[i])
{
result = true;
break;
}
else if (versionTokens[i] > targetTokens[i])
{
result = false;
break;
}
if (i == versionTokens.length-1 && versionTokens.length < targetTokens.length)
{
// If the versions compared are the same, but target has an extra token, it's probably a "letter" build
// and is ahead of this one.
result = true;
}
}
return result;
}
public static boolean afterTargetVersion(String version, String target)
{
boolean result = false;
int[] versionTokens = parseVersion(version);
int[] targetTokens = parseVersion(target);
for (int i = 0; i < versionTokens.length && i < targetTokens.length; ++i)
{
if (versionTokens[i] > targetTokens[i])
{
result = true;
break;
}
}
return result;
}
public VersionInfo(String name, String version, String url)
{
modName = name;
modVersion = latestModVersion = version;
releaseURL = url;
}
public VersionInfo(String name, String version, String url, Logger logger)
{
modName = name;
modVersion = latestModVersion = version;
releaseURL = url;
modLogger = logger;
}
public void checkForNewVersion()
{
Thread versionCheckThread = new VersionCheckThread();
versionCheckThread.start();
}
public String getCurrentVersion()
{
return modVersion;
}
public String getLatestVersion()
{
return latestModVersion;
}
public String getLatestMCVersion()
{
return latestMCVersion;
}
public String getVersionDescription()
{
return description;
}
public boolean isCriticalUpdate()
{
return criticalUpdate;
}
public boolean isNewVersionAvailable()
{
return newVersion;
}
public boolean isMinecraftOutdated()
{
return newMinecraftVersion;
}
public boolean isVersionCheckComplete()
{
return versionCheckComplete;
}
/* VERSION CHECK THREAD CLASS */
private class VersionCheckThread extends Thread
{
@Override
public void run()
{
try
{
String location = VersionURL;
HttpURLConnection connection = null;
// Used to "dereference" any location headers we may get.
while (location != null && !location.isEmpty())
{
URL url = new URL(location);
connection = (HttpURLConnection) url.openConnection();
connection.setRequestProperty("User-Agent",
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17");
connection.connect();
location = connection.getHeaderField("Location");
}
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
latestModVersion = reader.readLine();
criticalUpdate = Boolean.parseBoolean(reader.readLine());
latestMCVersion = reader.readLine();
description = reader.readLine();
reader.close();
if (beforeTargetVersion(modVersion, latestModVersion))
{
modLogger.log(Level.INFO, "An updated version of " + modName + " is available: " + latestModVersion + ".");
newVersion = true;
if (criticalUpdate)
{
modLogger.log(Level.INFO, "This update has been marked as CRITICAL and will ignore notification suppression.");
}
if (beforeTargetVersion(MCVersion, latestMCVersion))
{
newMinecraftVersion = true;
modLogger.log(Level.INFO, "This update is for Minecraft " + latestMCVersion + ".");
}
}
}
catch (Exception e)
{
modLogger.log(Level.WARNING, "Version Check Failed: " + e.getMessage());
}
versionCheckComplete = true;
}
}
public static void doVersionCheck()
{
if (!ThaumicBees.getConfig().SkipUpdateCheck)
{
VersionInfo main = new VersionInfo("ThaumicBees", Version, VersionURL);
TickHandlerVersion.registerModVersionInfo(main);
TickHandlerVersion.initialize();
TickRegistry.registerScheduledTickHandler(TickHandlerVersion.instance, Side.CLIENT);
VersionCheckThread thread = main.new VersionCheckThread();
thread.start();
}
}
} }
@@ -0,0 +1,48 @@
package thaumicbees.main.utils.compat;
import net.minecraft.item.Item;
import thaumicbees.main.Config;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.Loader;
public class EquivalentExchangeHelper
{
private static boolean isEquivalentExchangePresent = false;
public static boolean isActive()
{
return isEquivalentExchangePresent;
}
public static void init()
{
if (Loader.isModLoaded("EE3"))
{
isEquivalentExchangePresent = true;
}
}
public static void getBlocks()
{
if (isActive())
{
}
}
public static void getItems()
{
if (isActive())
{
try
{
Class itemClass = Class.forName("com.pahimar.ee3.item.ModItems");
Config.eeMinuimShard = (Item)(itemClass.getField("miniumShard").get(null));
}
catch (Exception e)
{
FMLLog.info("Could not get Equivalent Exchange items.");
}
}
}
}
@@ -0,0 +1,125 @@
package thaumicbees.main.utils.compat;
import java.lang.reflect.Field;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class ExtraBeesHelper
{
private static boolean isEBPresent = false;
public static boolean isActive()
{
return isEBPresent;
}
public static void init()
{
if (cpw.mods.fml.common.Loader.isModLoaded("ExtraBees"))
{
isEBPresent = true;
}
}
public static ItemStack getExtraBeeItem(String field)
{
ItemStack value = null;
try
{
Class src = Class.forName("binnie.extrabees.core.ExtraBeeItem");
Field f = src.getDeclaredField(field);
Item i = (Item) f.get(null);
value = new ItemStack(i);
}
catch (Exception e) { }
return value;
}
public enum CombType
{
BARREN,
ROTTEN,
BONE,
OIL,
COAL,
FUEL,
WATER,
MILK,
FRUIT,
SEED,
ALCOHOL,
STONE,
REDSTONE,
RESIN,
IC2,
IRON,
GOLD,
COPPER,
TIN,
SILVER,
BRONZE,
URANIUM,
CLAY,
OLD,
FUNGAL,
CREOSOTE,
LATEX,
ACIDIC,
VENOMOUS,
SLIME,
BLAZE,
COFFEE,
GLACIAL,
MINT,
CITRUS,
PEAT,
SHADOW,
LEAD,
BRASS,
ELECTRUM,
ZINC,
TITANIUM,
TUNGSTEN,
STEEL,
IRIDIUM,
PLATINUM,
LAPIS,
SODALITE,
PYRITE,
BAUXITE,
CINNABAR,
SPHALERITE,
EMERALD,
RUBY,
SAPPHIRE,
OLIVINE,
DIAMOND,
RED,
YELLOW,
BLUE,
GREEN,
BLACK,
WHITE,
BROWN,
ORANGE,
CYAN,
PURPLE,
GRAY,
LIGHTBLUE,
PINK,
LIMEGREEN,
MAGENTA,
LIGHTGRAY,
NICKEL,
INVAR,
GLOWSTONE,
SALTPETER,
PULP,
MULCH,
COMPOST,
SAWDUST,
;
}
}
@@ -1,23 +1,13 @@
package thaumicbees.compat; package thaumicbees.main.utils.compat;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.ItemInterface; import forestry.api.core.ItemInterface;
import thaumicbees.main.Config; import thaumicbees.main.Config;
public class ForestryHelper public class ForestryHelper
{ {
public static void getForestryBlocks()
{
}
public static void getForestryItems()
{
Config.fBeeComb = Item.itemsList[ItemInterface.getItem("beeComb").itemID];
Config.fPollen = Item.itemsList[ItemInterface.getItem("pollen").itemID];
Config.fCraftingResource = Item.itemsList[ItemInterface.getItem("craftingMaterial").itemID];
}
public enum CraftingMaterial public enum CraftingMaterial
{ {
PULSATING_DUST, // unused PULSATING_DUST, // unused
@@ -92,4 +82,56 @@ public class ForestryHelper
LAPIS, LAPIS,
; ;
} }
public static void getBlocks()
{
}
public static void getItems()
{
Config.fBeeComb = Item.itemsList[ItemInterface.getItem("beeComb").itemID];
Config.fPollen = Item.itemsList[ItemInterface.getItem("pollen").itemID];
Config.fCraftingResource = Item.itemsList[ItemInterface.getItem("craftingMaterial").itemID];
}
public static EnumTemperature getEnumTemperatureFromValue(float rawTemp)
{
EnumTemperature value = EnumTemperature.ICY;
if (rawTemp >= 2.0f)
{
value = EnumTemperature.HOT;
}
else if (rawTemp >= 1.2f)
{
value = EnumTemperature.WARM;
}
else if (rawTemp >= 0.2f)
{
value = EnumTemperature.NORMAL;
}
else if (rawTemp >= 0.05f)
{
value = EnumTemperature.COLD;
}
return value;
}
public static EnumHumidity getEnumHumidityFromValue(float rawHumidity)
{
EnumHumidity value = EnumHumidity.ARID;
if (rawHumidity >= 0.9f)
{
value = EnumHumidity.DAMP;
}
else if (rawHumidity >= 0.3f)
{
value = EnumHumidity.NORMAL;
}
return value;
}
} }
@@ -1,4 +1,4 @@
package thaumicbees.compat; package thaumicbees.main.utils.compat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
@@ -1,19 +1,16 @@
package thaumicbees.compat; package thaumicbees.main.utils.compat;
import java.io.File;
import java.lang.reflect.Field;
import java.util.ArrayList;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import thaumcraft.api.EnumTag; import thaumcraft.api.EnumTag;
import thaumcraft.api.ItemApi; import thaumcraft.api.ItemApi;
import thaumcraft.api.ObjectTags; import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi; import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.research.ResearchItem; import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchList; import thaumcraft.api.research.ResearchList;
import thaumicbees.bees.Allele;
import thaumicbees.bees.BeeGenomeManager; import thaumicbees.bees.BeeGenomeManager;
import thaumicbees.item.ItemComb; import thaumicbees.bees.BeeSpecies;
import thaumicbees.item.ItemMiscResources;
import thaumicbees.item.types.CombType; import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType; import thaumicbees.item.types.DropType;
import thaumicbees.item.types.LiquidType; import thaumicbees.item.types.LiquidType;
@@ -24,46 +21,149 @@ import thaumicbees.item.types.WaxType;
import thaumicbees.main.CommonProxy; import thaumicbees.main.CommonProxy;
import thaumicbees.main.Config; import thaumicbees.main.Config;
import thaumicbees.main.ThaumicBees; import thaumicbees.main.ThaumicBees;
import thaumicbees.storage.BackpackDefinition;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry;
import forestry.api.apiculture.EnumBeeChromosome; import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.apiculture.EnumBeeType; import forestry.api.apiculture.EnumBeeType;
import forestry.api.core.BlockInterface; import forestry.api.core.BlockInterface;
import forestry.api.core.ItemInterface; import forestry.api.core.ItemInterface;
import forestry.api.storage.BackpackManager;
import net.minecraft.block.Block; public class ThaumcraftHelper
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraftforge.common.Property;
import net.minecraftforge.common.Configuration;
public class CompatabilityManager
{ {
public static ItemStack getExtraBeeItem(String field) public enum MiscResource
{ {
ItemStack value = null; ALUMENTUM,
try NITOR,
{ THAUMIUM,
Class src = Class.forName("binnie.extrabees.core.ExtraBeeItem"); QUICKSILVER,
Field f = src.getDeclaredField(field); MAGIC_TALLOW,
ZOMBIE_BRAIN,
Item i = (Item) f.get(null); AMBER,
value = new ItemStack(i); ENCHANTED_FABRIC,
} FLUX_FILTER,
catch (Exception e) KNOWLEDGE_FRAGMENT,
{ MIRRORED_GLASS,
FMLLog.warning("Could not get Extra Bees item: " + field + ". If you notice this, please report the issue on the Thaumic Bees thread."); ;
}
return value;
} }
public static void setupBackpacks() public enum NuggetType
{
IRON,
COPPER,
TIN,
SILVER,
LEAD,
QUICKSILVER, _6,_7,_8,_9,_10,_11,_12,_13,_14,_15,
NATIVE_IRON,
NATIVE_COPPER,
NATIVE_TIN,
NATIVE_SILVER,
NATIVE_LEAD, _21,_22,_23,_24,_25,_26,_27,_28,_29,_30,
NATIVE_GOLD,
;
}
public enum ShardType
{
AIR,
FIRE,
WATER,
EARTH,
MAGIC,
DULL,
;
}
public enum Entity
{
BRAINY_ZOMBIE("entBrainyZombie", "EntityBrainyZombie"),
GIANT_BRAINY_ZOMBIE("entGiantBrainyZombie", "EntityGiantBrainyZombie"),
WISP("entWisp", "EntityWisp"),
FIREBAT("entFirebat", "EntityFireBat"),
;
private static String packageName = "thaumcraft.common.entities.monster.";
public String entityID;
private String className;
private Entity(String id, String clazz)
{
this.entityID = id;
this.className = clazz;
}
public String getClassName()
{
return packageName + this.className;
}
}
public enum BlockPlant
{
GREATWOOD_SAPLING,
SILVERWOOD_SAPLING,
SHIMMERLEAF,
CINDERPEARL;
}
public enum TreeType
{
GREATWOOD,
SILVERWOOD,
;
}
private static boolean isThaumcraftPresent = false;
public static boolean isActive()
{
return isThaumcraftPresent;
}
public static void init()
{
if (cpw.mods.fml.common.Loader.isModLoaded("Thaumcraft"))
{
isThaumcraftPresent = true;
registerResearchXML();
}
}
public static void getBlocks()
{
if (isActive())
{
Config.tcPlant = Block.blocksList[ItemApi.getItem("blockCustomPlant", 0).itemID];
Config.tcCandle = Block.blocksList[ItemApi.getItem("blockCandle", 0).itemID];
Config.tcCrystal = Block.blocksList[ItemApi.getItem("blockCrystal", 0).itemID];
Config.tcMarker = Block.blocksList[ItemApi.getItem("blockMarker", 0).itemID];
Config.tcJar = Block.blocksList[ItemApi.getItem("blockJar", 0).itemID];
Config.tcLog = Block.blocksList[ItemApi.getItem("blockMagicalLog", 0).itemID];
Config.tcLeaf = Block.blocksList[ItemApi.getItem("blockMagicalLeaves", 0).itemID];
Config.tcWarded = Block.blocksList[ItemApi.getItem("blockWarded", 0).itemID];
}
}
public static void getItems()
{
if (isActive())
{
Config.tcFilledJar = ItemApi.getItem("itemJarFilled", 0).getItem();
Config.tcMiscResource = ItemApi.getItem("itemResource", 0).getItem();
Config.tcEssentiaBottle = ItemApi.getItem("itemEssence", 0).getItem();
Config.tcShard = ItemApi.getItem("itemShard", 0).getItem();
Config.tcGolem = ItemApi.getItem("itemGolemPlacer", 0).getItem();
Config.tcWispEssence = ItemApi.getItem("itemWispEssence", 0).getItem();
Config.tcNuggets = ItemApi.getItem("itemNugget", 0).getItem();
Config.tcNuggetChicken = ItemApi.getItem("itemNuggetChicken", 0).getItem();
Config.tcNuggetBeef = ItemApi.getItem("itemNuggetBeef", 0).getItem();
Config.tcNuggetPork = ItemApi.getItem("itemNuggetPork", 0).getItem();
}
}
public static void addItemsToBackpack()
{ {
if (ThaumicBees.getConfig().AddThaumcraftItemsToBackpacks) if (ThaumicBees.getConfig().AddThaumcraftItemsToBackpacks)
{ {
@@ -78,8 +178,7 @@ public class CompatabilityManager
+ Config.tcFilledJar.itemID + ":" + -1 + ";" + Config.tcFilledJar.itemID + ":" + -1 + ";"
+ Config.tcCrystal.blockID + ":" + -1 + ";" + Config.tcCrystal.blockID + ":" + -1 + ";"
+ Config.tcJar.blockID + ":" + -1 + ";" + Config.tcJar.blockID + ":" + -1 + ";"
+ Config.tcGolem.itemID + ":" + -1 + ";" + Config.tcGolem.itemID + ":" + -1 + ";";
+ Config.solidFlux.itemID + ":" + -1;
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ids); FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ids);
// Add some plants & saplings to Forester's // Add some plants & saplings to Forester's
@@ -103,11 +202,14 @@ public class CompatabilityManager
public static void setupItemAspects() public static void setupItemAspects()
{ {
setupItemAspectsThaumicBees(); if (isActive())
setupItemAspectsForestry();
if (ThaumicBees.getConfig().ExtraBeesInstalled)
{ {
setupItemAspectsExtraBees(); setupItemAspectsThaumicBees();
setupItemAspectsForestry();
if (ExtraBeesHelper.isActive())
{
setupItemAspectsExtraBees();
}
} }
} }
@@ -116,6 +218,9 @@ public class CompatabilityManager
ObjectTags tags; ObjectTags tags;
ItemStack itemStack; ItemStack itemStack;
tags = new ObjectTags().add(EnumTag.WOOD, 2);
ThaumcraftApi.registerObjectTag(Config.planksWood.blockID, -1, tags);
tags = new ObjectTags().add(EnumTag.MAGIC, 2); tags = new ObjectTags().add(EnumTag.MAGIC, 2);
ThaumcraftApi.registerObjectTag(Config.wax.itemID, WaxType.MAGIC.ordinal(), tags); ThaumcraftApi.registerObjectTag(Config.wax.itemID, WaxType.MAGIC.ordinal(), tags);
@@ -124,8 +229,10 @@ public class CompatabilityManager
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 1); tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 1);
ThaumcraftApi.registerObjectTag(Config.drops.itemID, DropType.INTELLECT.ordinal(), tags); ThaumcraftApi.registerObjectTag(Config.drops.itemID, DropType.INTELLECT.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.ELDRITCH, 1); tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
ThaumcraftApi.registerObjectTag(Config.pollen.itemID, PollenType.UNUSUAL.ordinal(), tags); ThaumcraftApi.registerObjectTag(Config.pollen.itemID, PollenType.UNUSUAL.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.TIME, 2);
ThaumcraftApi.registerObjectTag(Config.pollen.itemID, PollenType.PHASED.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.CONTROL, 1); tags = new ObjectTags().add(EnumTag.CONTROL, 1);
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, -1, tags); ThaumcraftApi.registerObjectTag(Config.propolis.itemID, -1, tags);
@@ -147,17 +254,20 @@ public class CompatabilityManager
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2); tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, -1, tags); ThaumcraftApi.registerObjectTag(Config.combs.itemID, -1, tags);
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2);
itemStack = Config.combs.getStackForType(CombType.OCCULT);
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2).add(EnumTag.MAGIC, 2);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OCCULT.ordinal(), tags); ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OCCULT.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OTHERWORLDLY.ordinal(), tags); ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OTHERWORLDLY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.STARK.ordinal(), tags); ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.STARK.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.AIRY.ordinal(), tags); tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 4);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.FIREY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.WATERY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.EARTHY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.INFUSED.ordinal(), tags); ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.INFUSED.ordinal(), tags);
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2).add(EnumTag.MOTION, 2);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.AIRY.ordinal(), tags);
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2).add(EnumTag.POWER, 2);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.FIREY.ordinal(), tags);
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2).add(EnumTag.COLD, 2);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.WATERY.ordinal(), tags);
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2).add(EnumTag.ROCK, 2);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.EARTHY.ordinal(), tags);
// Tagging capsules. // Tagging capsules.
tags = new ObjectTags().add(EnumTag.VOID, 2).add(EnumTag.MAGIC, 2); tags = new ObjectTags().add(EnumTag.VOID, 2).add(EnumTag.MAGIC, 2);
@@ -363,11 +473,11 @@ public class CompatabilityManager
itemStack = ItemInterface.getItem("tubes"); itemStack = ItemInterface.getItem("tubes");
tags = new ObjectTags(ItemInterface.getItem("ingotCopper").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1); tags = new ObjectTags(ItemInterface.getItem("ingotCopper").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.COPPER.ordinal(), tags); //ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.COPPER.ordinal(), tags);
tags = new ObjectTags(ItemInterface.getItem("ingotTin").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1); tags = new ObjectTags(ItemInterface.getItem("ingotTin").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.TIN.ordinal(), tags); //ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.TIN.ordinal(), tags);
tags = new ObjectTags(ItemInterface.getItem("ingotBronze").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1); tags = new ObjectTags(ItemInterface.getItem("ingotBronze").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.BRONZE.ordinal(), tags); //ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.BRONZE.ordinal(), tags);
tags = new ObjectTags(Item.ingotIron.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1); tags = new ObjectTags(Item.ingotIron.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.IRON.ordinal(), tags); ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.IRON.ordinal(), tags);
tags = new ObjectTags(Item.ingotGold.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1); tags = new ObjectTags(Item.ingotGold.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
@@ -393,76 +503,257 @@ public class CompatabilityManager
ItemStack itemStack; ItemStack itemStack;
ObjectTags tags; ObjectTags tags;
if ((itemStack = getExtraBeeItem("comb")) != null) try // One try block suffices. If we can't get one item, it's probably safe to assume we can't get any others.
{ {
itemStack = ExtraBeesHelper.getExtraBeeItem("comb");
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2); tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.POWER, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.OIL.ordinal(), tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.COAL.ordinal(), tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.FUEL.ordinal(), tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.ALCOHOL.ordinal(), tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.REDSTONE.ordinal(), tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.URANIUM.ordinal(), tags);
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.POISON, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.VENOMOUS.ordinal(), tags);
itemStack = ExtraBeesHelper.getExtraBeeItem("propolis");
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = ExtraBeesHelper.getExtraBeeItem("honeyDrop");
tags = new ObjectTags().add(EnumTag.EXCHANGE, 2).add(EnumTag.LIFE, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
} }
catch (NullPointerException e) { }
} }
public static void setupResearch() public static void setupResearch()
{ {
ObjectTags tags; if (isActive())
{
ObjectTags tags;
tags = new ObjectTags().add(EnumTag.WOOD, 10).add(EnumTag.PLANT, 10).add(EnumTag.INSECT, 10); tags = new ObjectTags().add(EnumTag.WOOD, 10).add(EnumTag.PLANT, 10).add(EnumTag.INSECT, 10);
ResearchItem startNode = new ResearchItem("TBSTARTNODE", tags, 10, 0, Config.miscResources.getStackForType(ResourceType.RESEARCH_StartNode)) ResearchItem startNode = new ResearchItem("TBSTARTNODE", tags, 10, 1, Config.miscResources.getStackForType(ResourceType.RESEARCH_StartNode))
.setParents(ResearchList.getResearch("UTFT")) .setParents(ResearchList.getResearch("UTFT"))
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.INSECT, 9).add(EnumTag.MAGIC, 4).add(EnumTag.FLUX, 4); tags = new ObjectTags().add(EnumTag.INSECT, 9).add(EnumTag.MAGIC, 4).add(EnumTag.FLUX, 4);
ResearchItem starkHint = new ResearchItem("STARKHINT", tags, 5, 2, ItemInterface.getItem("beeQueenGE")) ResearchItem starkHint = new ResearchItem("STARKHINT", tags, 5, 2, ItemInterface.getItem("beeQueenGE"))
.setParents(startNode) .setParents(startNode)
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.INSECT, 15).add(EnumTag.MAGIC, 5).add(EnumTag.WATER, 5).add(EnumTag.EARTH, 5) tags = new ObjectTags().add(EnumTag.INSECT, 15).add(EnumTag.MAGIC, 5).add(EnumTag.WATER, 5).add(EnumTag.EARTH, 5)
.add(EnumTag.WIND, 5).add(EnumTag.FIRE, 5); .add(EnumTag.WIND, 5).add(EnumTag.FIRE, 5);
ResearchItem beeInfusion = new ResearchItem("BEEINFUSION", tags, 5, 3, Config.miscResources.getStackForType(ResourceType.RESEARCH_BeeInfusion)) ResearchItem beeInfusion = new ResearchItem("BEEINFUSION", tags, 5, 3, Config.miscResources.getStackForType(ResourceType.RESEARCH_BeeInfusion))
.setParents(starkHint).setHidden() .setParents(starkHint).setHidden()
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.CROP, 20).add(EnumTag.EARTH, 20).add(EnumTag.WATER, 5); tags = new ObjectTags().add(EnumTag.CROP, 20).add(EnumTag.EARTH, 20).add(EnumTag.WATER, 5);
ResearchItem fertilizer = new ResearchItem("FERTILIZER", tags, 16, 0, ItemInterface.getItem("apatite")) ResearchItem fertilizer = new ResearchItem("FERTILIZER", tags, 16, 0, ItemInterface.getItem("apatite"))
.setParents(startNode) .setParents(startNode)
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 6).add(EnumTag.INSECT, 15).add(EnumTag.BEAST, 2) tags = new ObjectTags().add(EnumTag.TOOL, 6).add(EnumTag.INSECT, 15).add(EnumTag.BEAST, 2)
.add(EnumTag.MAGIC, 5); .add(EnumTag.MAGIC, 5);
ResearchItem magicFrame = new ResearchItem("HIVEFRAME", tags, 10, -2, Config.hiveFrameMagic) ResearchItem magicFrame = new ResearchItem("HIVEFRAME", tags, 10, -2, Config.hiveFrameMagic)
.setParents(startNode) .setParents(startNode)
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6) tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.MAGIC, 8); .add(EnumTag.MAGIC, 8);
ResearchItem magicFrame2 = new ResearchItem("HIVEFRAME2", tags, 8, -2, Config.hiveFrameResilient) ResearchItem magicFrame2 = new ResearchItem("HIVEFRAME2", tags, 8, -2, Config.hiveFrameResilient)
.setParents(magicFrame).setHidden() .setParents(magicFrame).setHidden()
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 5).add(EnumTag.EXCHANGE, 6) tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 5).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.HEAL, 2).add(EnumTag.FLOWER, 6); .add(EnumTag.HEAL, 2).add(EnumTag.FLOWER, 6);
ResearchItem gentleFrame = new ResearchItem("HIVEFRAMEGENTLE", tags, 12, -2, Config.hiveFrameGentle) ResearchItem gentleFrame = new ResearchItem("HIVEFRAMEGENTLE", tags, 12, -2, Config.hiveFrameGentle)
.setParents(magicFrame).setHidden() .setParents(magicFrame).setHidden()
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 6).add(EnumTag.EXCHANGE, 8) tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 6).add(EnumTag.EXCHANGE, 8)
.add(EnumTag.MAGIC, 8).add(EnumTag.MOTION, 4).add(EnumTag.FLESH, 4); .add(EnumTag.MAGIC, 8).add(EnumTag.MOTION, 4).add(EnumTag.FLESH, 4);
ResearchItem metabolicFrame = new ResearchItem("HIVEFRAMEMETA", tags, 9, -3, Config.hiveFrameMetabolic) ResearchItem metabolicFrame = new ResearchItem("HIVEFRAMEMETA", tags, 9, -3, Config.hiveFrameMetabolic)
.setParents(magicFrame).setHidden() .setParents(magicFrame).setHidden()
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.DEATH, 15).add(EnumTag.EXCHANGE, 6) tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.DEATH, 15).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.MAGIC, 8).add(EnumTag.POISON, 6); .add(EnumTag.MAGIC, 8).add(EnumTag.POISON, 6);
ResearchItem necroticFrame = new ResearchItem("HIVEFRAMENECRO", tags, 11, -3, Config.hiveFrameNecrotic) ResearchItem necroticFrame = new ResearchItem("HIVEFRAMENECRO", tags, 11, -3, Config.hiveFrameNecrotic)
.setParents(magicFrame).setHidden() .setParents(magicFrame).setHidden()
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.TIME, 4); tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.TIME, 4);
ResearchItem temporalFrame = new ResearchItem("HIVEFRAMETIME", tags, 9, -5, Config.hiveFrameTemporal) ResearchItem temporalFrame = new ResearchItem("HIVEFRAMETIME", tags, 9, -5, Config.hiveFrameTemporal)
.setParents(magicFrame).setHidden() .setParents(magicFrame).setHidden()
.registerResearchItem(); .registerResearchItem();
tags = new ObjectTags().add(EnumTag.VOID, 15).add(EnumTag.CRYSTAL, 8).add(EnumTag.ELDRITCH, 8).add(EnumTag.EXCHANGE, 15);
ResearchItem voidCapsule = new ResearchItem("VOIDCAPSULE", tags, 10, 9, Config.voidCapsule)
.setParents(startNode, ResearchList.getResearch("PORTABLEHOLE")).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.WOOD, 8).add(EnumTag.INSECT, 10).add(EnumTag.TOOL, 6).add(EnumTag.MAGIC, 6);
ResearchItem scoop = new ResearchItem("THAUMIUMSCOOP", tags, 0, -3, Config.thaumiumScoop)
.setParents(ResearchList.getResearch("THAUMIUM"))
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.WOOD, 16).add(EnumTag.PLANT, 20).add(EnumTag.TOOL, 6).add(EnumTag.MAGIC, 6);
ResearchItem grafter = new ResearchItem("THAUMIUMGRAFTER", tags, 0, -4, Config.thaumiumGrafter)
.setParents(scoop)
.registerResearchItem();
}
} }
public static void registerResearch() private static void registerResearchXML()
{ {
ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "research.xml"); if (isActive())
{
ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "research.xml");
}
}
public static void setupThaumcraftCrafting()
{
ItemStack input;
ItemStack output;
if (ThaumicBees.getConfig().UseImpregnatedStickInTools)
{
input = ItemInterface.getItem("stickImpregnated");
}
else
{
input = new ItemStack(Item.stick);
}
ThaumcraftApi.addArcaneCraftingRecipe("THAUMIUMSCOOP", "THAUMIUMSCOOP", 45, new ItemStack(Config.thaumiumScoop), new Object[] {
"sWs", "sTs", " T ",
's', input,
'W', Block.cloth,
'T', new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.THAUMIUM.ordinal())
});
ThaumcraftApi.addArcaneCraftingRecipe("THAUMIUMGRAFTER", "THAUMIUMGRAFTER", 160, new ItemStack(Config.thaumiumGrafter), new Object[] {
" T", " T ", "s ",
's', input,
'T', new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.THAUMIUM.ordinal())
});
output = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
input = ItemInterface.getItem("apatite");
ObjectTags tags = (new ObjectTags()).add(EnumTag.CROP, 12);
output.stackSize = 2;
ThaumcraftApi.addShapelessInfusionCraftingRecipe("FERTILIZER", "FERTILIZER", 5, tags, output, new Object[] {
input
});
output = new ItemStack(Config.hiveFrameMagic);
input = ItemInterface.getItem("frameUntreated");
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8);
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAME", "FRAMEMAGIC", 50, tags, output, new Object[] {
input
});
output = new ItemStack(Config.hiveFrameResilient);
tags = new ObjectTags().add(EnumTag.WOOD, 12).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAME2", "FRAMERESILIENT", 50, tags, output, new Object[] {
" i ", "ifi", " i ",
'f', Config.hiveFrameMagic,
'i', Item.ingotIron
});
output = new ItemStack(Config.hiveFrameGentle);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.HEAL, 12);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMEGENTLE", "FRAMEGENTLE", 50, tags, output, new Object[] {
"www", "wFw", "www",
'F', input,
'w', ItemInterface.getItem("beeswax")
});
output = new ItemStack(Config.hiveFrameMetabolic);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.LIFE, 8).add(EnumTag.MOTION, 8)
.add(EnumTag.EXCHANGE, 8);
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAMEMETA", "FRAMEMETABOLIC", 50, tags, output, new Object[] {
Item.magmaCream,
input
});
output = new ItemStack(Config.hiveFrameNecrotic);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12).add(EnumTag.DEATH, 16)
.add(EnumTag.POISON, 1);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMENECRO", "FRAMENECROTIC", 50, tags, output, new Object[] {
" S ", "SxS", " S ",
'S', Item.rottenFlesh,
'x', input
});
output = new ItemStack(Config.hiveFrameTemporal);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.TIME, 2);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMETIME", "FRAMETIME", 50, tags, output, new Object[] {
"tSt", "SFS", "tSt",
't', Item.stick,
'S', Block.sand,
'F', input
});
output = Config.voidCapsule.getCapsuleForLiquid(LiquidType.EMPTY);
output.stackSize = 4;
tags = new ObjectTags().add(EnumTag.VOID, 16).add(EnumTag.ELDRITCH, 4).add(EnumTag.EXCHANGE, 8);
ThaumcraftApi.addInfusionCraftingRecipe("VOIDCAPSULE", "VOIDCAPSULE", 10, tags, output, new Object[] {
" G ", "GPG", "TGT",
'G', Block.thinGlass,
'P', Item.enderPearl,
'T', Item.ingotIron
});
ItemStack drone = BeeGenomeManager.getBeeNBTForSpecies(BeeSpecies.STARK, EnumBeeType.DRONE);
ItemStack princess = BeeGenomeManager.getBeeNBTForSpecies(BeeSpecies.STARK, EnumBeeType.PRINCESS);
String researchKey = "BEEINFUSION";
tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION1", BeeSpecies.AIR.getBeeItem(EnumBeeType.DRONE),
new ItemStack[] { drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal())},
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION2", BeeSpecies.AIR.getBeeItem(EnumBeeType.PRINCESS),
new ItemStack[] { princess , new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION3", BeeSpecies.FIRE.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION4", BeeSpecies.FIRE.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION5", BeeSpecies.WATER.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION6", BeeSpecies.WATER.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION7", BeeSpecies.EARTH.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION8", BeeSpecies.EARTH.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = new ObjectTags().add(EnumTag.MAGIC, 40).add(EnumTag.FLUX, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION9", BeeSpecies.INFUSED.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION0", BeeSpecies.INFUSED.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
} }
} }
@@ -1,280 +0,0 @@
package thaumicbees.tile;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class TileEntityMagicApiary extends TileEntity implements IInventory, IBeeHousing
{
@Override
public int getSizeInventory()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public ItemStack getStackInSlot(int var1)
{
// TODO Auto-generated method stub
return null;
}
@Override
public ItemStack decrStackSize(int var1, int var2)
{
// TODO Auto-generated method stub
return null;
}
@Override
public ItemStack getStackInSlotOnClosing(int var1)
{
// TODO Auto-generated method stub
return null;
}
@Override
public void setInventorySlotContents(int var1, ItemStack var2)
{
// TODO Auto-generated method stub
}
@Override
public String getInvName()
{
return "thaumicbees.magicApiary";
}
@Override
public int getInventoryStackLimit()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean isUseableByPlayer(EntityPlayer var1)
{
return true;
}
@Override
public void openChest() { }
@Override
public void closeChest() { }
@Override
public float getTerritoryModifier(IBeeGenome genome)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public float getProductionModifier(IBeeGenome genome)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public float getFloweringModifier(IBeeGenome genome)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean isSealed()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isSelfLighted()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isSunlightSimulated()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isHellish()
{
// TODO Auto-generated method stub
return false;
}
@Override
public void onQueenChange(ItemStack queen)
{
// TODO Auto-generated method stub
}
@Override
public void wearOutEquipment(int amount)
{
// TODO Auto-generated method stub
}
@Override
public void onQueenDeath(IBee queen)
{
// TODO Auto-generated method stub
}
@Override
public void onPostQueenDeath(IBee queen)
{
// TODO Auto-generated method stub
}
@Override
public int getXCoord()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public int getYCoord()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public int getZCoord()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public ItemStack getQueen()
{
// TODO Auto-generated method stub
return null;
}
@Override
public ItemStack getDrone()
{
// TODO Auto-generated method stub
return null;
}
@Override
public void setQueen(ItemStack itemstack)
{
// TODO Auto-generated method stub
}
@Override
public void setDrone(ItemStack itemstack)
{
// TODO Auto-generated method stub
}
@Override
public int getBiomeId()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public EnumTemperature getTemperature()
{
// TODO Auto-generated method stub
return null;
}
@Override
public EnumHumidity getHumidity()
{
// TODO Auto-generated method stub
return null;
}
@Override
public World getWorld()
{
// TODO Auto-generated method stub
return null;
}
@Override
public String getOwnerName()
{
// TODO Auto-generated method stub
return null;
}
@Override
public void setErrorState(int state)
{
// TODO Auto-generated method stub
}
@Override
public int getErrorOrdinal()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean canBreed()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean addProduct(ItemStack product, boolean all)
{
// TODO Auto-generated method stub
return false;
}
}