mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf57ac3491 | ||
|
|
e8421f40fe | ||
|
|
b8d12b1f9a | ||
|
|
1476470054 | ||
|
|
89fb41b814 | ||
|
|
f44591b47d | ||
|
|
fd82a0ef72 | ||
|
|
cbbf2558fd | ||
|
|
76f541bc3f | ||
|
|
7f95da0f6c | ||
|
|
3798f1f771 | ||
|
|
721a60c994 | ||
|
|
4a03a5f48c | ||
|
|
c6720b7417 | ||
|
|
575c799587 | ||
|
|
2c324174e4 | ||
|
|
28f5a15f0a | ||
|
|
9bed2d3749 | ||
|
|
1a394ce858 | ||
|
|
5d3bd8bde2 | ||
|
|
5279a6e64a | ||
|
|
2c2306b223 | ||
|
|
8aaa24c3c1 | ||
|
|
e32c05ab3e | ||
|
|
f21bd467c2 | ||
|
|
d3e93188c0 | ||
|
|
e92d9c131e | ||
|
|
1bee56adf3 | ||
|
|
85a2723ef8 | ||
|
|
29069e7e9f | ||
|
|
c8be483bf0 | ||
|
|
92ace4e9a3 | ||
|
|
aed979a19f | ||
|
|
0fa9a6ed23 | ||
|
|
b3660ecf58 | ||
|
|
5eb787352b | ||
|
|
a7774e1fca | ||
|
|
596ae798ec | ||
|
|
902812e015 | ||
|
|
0b510e8426 | ||
|
|
d4c5d1e356 | ||
|
|
5a2f360e50 | ||
|
|
84ad8b0d7b | ||
|
|
6a26bec4e1 | ||
|
|
827199b518 | ||
|
|
ead879a913 | ||
|
|
47a2962bd6 | ||
|
|
105a8d47a0 | ||
|
|
ad16a3b999 |
No files matched your search
@@ -1,3 +0,0 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Mon Jan 28 02:03:40 PST 2013
|
||||
build.number=101
|
||||
+18
-13
@@ -17,7 +17,7 @@
|
||||
|
||||
<property name="mc.version" value="1.4.7"/>
|
||||
<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 -->
|
||||
<property name="deploy.type" value="previews" />
|
||||
@@ -74,13 +74,14 @@
|
||||
<include name="thaumcraft/**" />
|
||||
</fileset>
|
||||
<fileset dir="${src.dir}/thaumicbees_src">
|
||||
<include name="**/net/mysteriousages/**" />
|
||||
<include name="**/thaumicbees/**" />
|
||||
<include name="**/forestry/**" />
|
||||
</fileset>
|
||||
</copy>
|
||||
|
||||
<copy todir="${clientsrc.dir}" overwrite="true" failonerror="true">
|
||||
<fileset dir="${src.dir}/thaumicbees_src">
|
||||
<fileset dir="${src.dir}/thaumicbees_src">
|
||||
<include name="**/VersionInfo.java" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
@@ -88,7 +89,6 @@
|
||||
<filter token="VERSION" value="${thaumicbees.version}" />
|
||||
<filter token="BUILD_NUMBER" value="${build.number}" />
|
||||
<filter token="FINGERPRINT" value="${key.fingerprint}" />
|
||||
<filter token="MODVERSION" value="${thaumicbees.version} - ${build.number}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
|
||||
@@ -118,12 +118,14 @@
|
||||
<!-- Copy classes -->
|
||||
<copy todir="${classes.dir}/client">
|
||||
<fileset dir="${mcp.dir}/reobf/minecraft">
|
||||
<include name="**/thaumicbees/**" />
|
||||
<include name="**/forestry/plugins/**" />
|
||||
|
||||
<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>
|
||||
</copy>
|
||||
|
||||
@@ -134,12 +136,15 @@
|
||||
<exclude name="build.number"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<!-- Copy localizations (We have none yet.) -->
|
||||
<!--<copy todir="${classes.dir}/client">
|
||||
<fileset dir="${lang.dir}">
|
||||
<exclude name="README.md"/>
|
||||
</fileset>
|
||||
</copy>-->
|
||||
|
||||
<copy todir="${classes.dir}/client" overwrite="true" failonerror="true">
|
||||
<fileset dir="${src.dir}/thaumicbees_res">
|
||||
<include name="**/mcmod.info" />
|
||||
</fileset>
|
||||
<filterset>
|
||||
<filter token="MODVERSION" value="${thaumicbees.version} - ${build.number}" />
|
||||
</filterset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- Package the jars -->
|
||||
|
||||
@@ -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
|
||||
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.
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 7.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 |
@@ -1 +0,0 @@
|
||||
storage.backpack.Thaumaturge=Thaumaturge's Backpack
|
||||
@@ -0,0 +1,242 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||
<properties version="1.0">
|
||||
<!-- Item names -->
|
||||
<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 -->
|
||||
<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 -->
|
||||
<entry key="tb.comb.occult">Occult Comb</entry>
|
||||
<entry key="tb.comb.otherworldly">Otherworldy Comb</entry>
|
||||
<entry key="tb.comb.paper">Papery Comb</entry>
|
||||
<entry key="tb.comb.stark">Stark Comb</entry>
|
||||
<entry key="tb.comb.air">Airy Comb</entry>
|
||||
<entry key="tb.comb.fire">Firey Comb</entry>
|
||||
<entry key="tb.comb.water">Watery Comb</entry>
|
||||
<entry key="tb.comb.earth">Earthy Comb</entry>
|
||||
<entry key="tb.comb.magic">Infused Comb</entry>
|
||||
<entry key="tb.comb.aware">Memory Comb</entry>
|
||||
<entry key="tb.comb.furtive">Furtive Comb</entry>
|
||||
<entry key="tb.comb.soul">Soul Comb</entry>
|
||||
|
||||
<!-- Wax names -->
|
||||
<entry key="tb.wax.magic">Magic Wax</entry>
|
||||
<entry key="tb.wax.soul">Soulful Wax</entry>
|
||||
|
||||
<!-- Drop names -->
|
||||
<entry key="tb.drop.enchanting">Enchanting Drop</entry>
|
||||
<entry key="tb.drop.intellect">Intellect Drop</entry>
|
||||
|
||||
<!-- Pollen names -->
|
||||
<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 -->
|
||||
<entry key="tb.propolis.dull">Dull Propolis</entry>
|
||||
<entry key="tb.propolis.air">Breezey Propolis</entry>
|
||||
<entry key="tb.propolis.fire">Burning Propolis</entry>
|
||||
<entry key="tb.propolis.water">Flowing Propolis</entry>
|
||||
<entry key="tb.propolis.earth">Stony Propolis</entry>
|
||||
<entry key="tb.propolis.magic">Infused Propolis</entry>
|
||||
|
||||
<!-- Misc Resources -->
|
||||
<entry key="tb.resource.fragment">Lore Fragment</entry>
|
||||
<entry key="tb.resource.lump">Aromatic Lump</entry>
|
||||
<entry key="tb.resource.fertilizer">Concentrated Compound</entry>
|
||||
<entry key="tb.resource.crystalFlux">Crystalized %s Aspect</entry>
|
||||
|
||||
<!-- Frames -->
|
||||
<entry key="tb.frame.magic">Magic Frame</entry>
|
||||
<entry key="tb.frame.resillient">Resilient Frame</entry>
|
||||
<entry key="tb.frame.gentle">Gentle Frame</entry>
|
||||
<entry key="tb.frame.metabolic">Metabolic Frame</entry>
|
||||
<entry key="tb.frame.necrotic">Necrotic Frame</entry>
|
||||
<entry key="tb.frame.temporal">Temporal Frame</entry>
|
||||
<entry key="tb.frame.oblivion">Oblivion Frame</entry>
|
||||
|
||||
<!-- Capsule names -->
|
||||
<entry key="tb.capsule.magic">Magic Capsule</entry>
|
||||
<entry key="tb.capsule.void">Void Capsule</entry>
|
||||
|
||||
<!-- Liquids -->
|
||||
<entry key="tb.liquid.">Empty</entry>
|
||||
<entry key="tb.liquid.water">Water</entry>
|
||||
<entry key="tb.liquid.lava">Lava</entry>
|
||||
<entry key="tb.liquid.biomass">Biomass</entry>
|
||||
<entry key="tb.liquid.biofuel">Empty</entry>
|
||||
<entry key="tb.liquid.Oil">Oil</entry>
|
||||
<entry key="tb.liquid.Fuel">Fuel</entry>
|
||||
<entry key="tb.liquid.seedoil">Seed Oil</entry>
|
||||
<entry key="tb.liquid.honey">Honey</entry>
|
||||
<entry key="tb.liquid.juice">Juice</entry>
|
||||
<entry key="tb.liquid.ice">Ice</entry>
|
||||
<entry key="tb.liquid.milk">Milk</entry>
|
||||
<entry key="tb.liquid.acid">Acid</entry>
|
||||
<entry key="tb.liquid.poison">Poison</entry>
|
||||
<entry key="tb.liquid.liquidNitrogen">Liquid Nitrogen</entry>
|
||||
<entry key="tb.liquid.liquidDNA">Liquid DNA</entry>
|
||||
<entry key="tb.liquid.Creosote Oil">Creosote Oil</entry>
|
||||
<entry key="tb.liquid.Steam">Steam</entry>
|
||||
|
||||
<!-- Moon Phases -->
|
||||
<entry key="tb.moon.full">Full Moon</entry>
|
||||
<entry key="tb.moon.gibbousWaning">Waning Gibbous</entry>
|
||||
<entry key="tb.moon.gibousWaxing">Waxing Gibbous</entry>
|
||||
<entry key="tb.moon.halfWaning">Waning Half</entry>
|
||||
<entry key="tb.moon.halfWaxing">Waxing Half</entry>
|
||||
<entry key="tb.moon.crescentWaning">Waning Crescent</entry>
|
||||
<entry key="tb.moon.crescentWaxing">Waxing Crescent</entry>
|
||||
<entry key="tb.moon.new">New Moon</entry>
|
||||
|
||||
<!-- Miscellaneous names -->
|
||||
<entry key="tb.backpack.thaumaturge">Thaumaturge's Backpack</entry>
|
||||
|
||||
<!-- Species names -->
|
||||
<entry key="thaumicbees.speciesEsoteric">Esoteric</entry>
|
||||
<entry key="thaumicbees.speciesEsoteric.description">An unusual crossbreed which seems to have magical properties.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesMysterious">Mysterious</entry>
|
||||
<entry key="thaumicbees.speciesMysterious.description">These bees have been to the end of the world and back, and their power has grown.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesArcane">Arcane</entry>
|
||||
<entry key="thaumicbees.speciesArcane.description">"Their produce is charged with magic."|Azanor, Master Thaumaturge</entry>
|
||||
<entry key="thaumicbees.speciesCharmed">Charmed</entry>
|
||||
<entry key="thaumicbees.speciesCharmed.description">Your first experiments in Thaumaturgical Apiculture have yielded fruit. Buzzing fruit.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesEnchanted">Enchanted</entry>
|
||||
<entry key="thaumicbees.speciesEnchanted.description">Successive generations of Charmed bees have reinforced their connection to the unknown.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesSupernatural">Supernatural</entry>
|
||||
<entry key="thaumicbees.speciesSupernatural.description">These bees walk the line between this world and the unseen.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesPupil">Pupil</entry>
|
||||
<entry key="thaumicbees.speciesPupil.description">"What does that bee want with my paper?!|Yorae, Librarian</entry>
|
||||
<entry key="thaumicbees.speciesScholarly">Scholarly</entry>
|
||||
<entry key="thaumicbees.speciesScholarly.description">"I can't be sure, but I think they might be smarter than me..."|Yorae, Librarian</entry>
|
||||
<entry key="thaumicbees.speciesSavant">Savant</entry>
|
||||
<entry key="thaumicbees.speciesSavant.description">lim(x^(i / pi)/ log(e * 7 - ln(32/x^-pi))). Solve for honey.|Note found on Yorae's desk</entry>
|
||||
<entry key="thaumicbees.speciesStark">Stark</entry>
|
||||
<entry key="thaumicbees.speciesStark.description">"These are unusually attracted to shards. This warrents further investigation."|Azanor, Master Thaumaturge</entry>
|
||||
<entry key="thaumicbees.speciesAura">Aura</entry>
|
||||
<entry key="thaumicbees.speciesAura.description">"They work so fast it's breathtaking."|Sengir, Mad Apiarist</entry>
|
||||
<entry key="thaumicbees.speciesIgnis">Ignis</entry>
|
||||
<entry key="thaumicbees.speciesIgnis.description">Caution: Contents of hive extremely hot.|Warning label on Azanor's apiary</entry>
|
||||
<entry key="thaumicbees.speciesAqua">Aqua</entry>
|
||||
<entry key="thaumicbees.speciesAqua.description">"I tried to breed them once, but that was a wash."|MysteriousAges, Apprentice Thaumaturge</entry>
|
||||
<entry key="thaumicbees.speciesSolum">Solum</entry>
|
||||
<entry key="thaumicbees.speciesSolum.description">"You're really gonna dig these bees, but watch out - they bore quite easily."|MysteriousAges, Apprentice Comedian</entry>
|
||||
<entry key="thaumicbees.speciesPraecantatio">Praecantatio</entry>
|
||||
<entry key="thaumicbees.speciesPraecantatio.description">Beekeeping is magic!|Apinomicon, Preface</entry>
|
||||
<entry key="thaumicbees.speciesAware">Aware</entry>
|
||||
<entry key="thaumicbees.speciesAware.description">"They can see into your soul!"|Florastar, Expert Beekeeper</entry>
|
||||
<entry key="thaumicbees.speciesVis">Vis</entry>
|
||||
<entry key="thaumicbees.speciesVis.description">"They can feel changes in the aura, but are not yet able to affect it."|Azanor, research notes</entry>
|
||||
<entry key="thaumicbees.speciesPure">Pure</entry>
|
||||
<entry key="thaumicbees.speciesPure.description">"It's like a bee janitor!"|MysteriousAges, Thaumaturge</entry>
|
||||
<entry key="thaumicbees.speciesFlux">Flux</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.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.description">These bees have become xenophobic and bad-tempered. Use caution.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesBrainy">Brainy</entry>
|
||||
<entry key="thaumicbees.speciesBrainy.description">Their combs may be fetid and foul-smelling, but their intelligence is well-developed.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesGossamer">Gossamer</entry>
|
||||
<entry key="thaumicbees.speciesGossamer.description">As they work, they seem to fade out from light for brief moments.|Apinomicon</entry>
|
||||
<entry key="thaumicbees.speciesWispy">Wispy</entry>
|
||||
<entry key="thaumicbees.speciesWispy.description">Their language is garbled and unintelligible. It is probable they are speaking to unnatural beings.|Apinomicon</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.speciesGhastly">Ghastly</entry>
|
||||
<entry key="thaumicbees.speciesGhastly.description">"*sigh*... Really, Myst?"|Taveria, irritated Apiarist</entry>
|
||||
<entry key="thaumicbees.speciesTimely">Timely</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.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.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 -->
|
||||
<entry key="thaumicbees.effectCurative">Cleansing</entry>
|
||||
<entry key="thaumicbees.effecteffectDigSpeed">Mining</entry>
|
||||
<entry key="thaumicbees.effecteffectMoveSpeed">Swiftness</entry>
|
||||
<entry key="thaumicbees.effecteffectSlowSpeed">Time Warp</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.effectBatty">Batty</entry>
|
||||
<entry key="thaumicbees.effectWispy">Wispy</entry>
|
||||
<entry key="thaumicbees.Ghast">Ghastly</entry>
|
||||
<entry key="tb.bees.flower.book">Books</entry>
|
||||
<entry key="tb.bees.flower.magic">Magic Flowers</entry>
|
||||
<entry key="tb.bees.flower.node">Node</entry>
|
||||
|
||||
<!-- Classifications -->
|
||||
<entry key="classification.arcane">Arcane</entry>
|
||||
<entry key="classification.arcane.description"></entry>
|
||||
<entry key="classification.supernatural">Supernatural</entry>
|
||||
<entry key="classification.supernatural.description"></entry>
|
||||
<entry key="classification.scholarly">Scholarly</entry>
|
||||
<entry key="classification.scholarly.description"></entry>
|
||||
<entry key="classification.thaumic">Thaumic</entry>
|
||||
<entry key="classification.thaumic.description"></entry>
|
||||
<entry key="classification.skulking">Skulking</entry>
|
||||
<entry key="classification.skulking.description"></entry>
|
||||
<entry key="classification.vis">Aware</entry>
|
||||
<entry key="classification.vis.description"></entry>
|
||||
<entry key="classification.time">Time</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>
|
||||
@@ -1,11 +1,12 @@
|
||||
[
|
||||
{
|
||||
"modid": "ThaumicBees",
|
||||
"version": "@MODVERSION@",
|
||||
"name": "ThaumicBees",
|
||||
"url": "http://www.minecraftforum.net/topic/1623692-thaumicbees-beekeeping-is-magic/",
|
||||
"url": "http://bit.ly/XFDvLY",
|
||||
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
|
||||
"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"
|
||||
}
|
||||
]
|
||||
@@ -14,7 +14,7 @@ The potential exists for further study. All that is required is some creative th
|
||||
<longText>The cursory investigation you have completed in the direction of Beekeeping has yielded fruit. Perhaps under the right conditions, you can find a bee mutation that will enable you to infuse them with magic.</longText>
|
||||
<page type="text">Even bees are susceptible to the influence of magic, some more than others.
|
||||
|
||||
Perhaps it would be possible to breed a bee from two species which are affected by Arcane or Supernatural powers. If such a species truly does exist, it could be possible that they could reveal additional secrets.</page>
|
||||
Perhaps it would be possible to breed a bee from two species which are affected by Arcane or Supernatural powers. If such a species truly does exist, it could be possible that they could reveal additional secrets. Further research may be needed, in addition to a specimen.</page>
|
||||
</project>
|
||||
|
||||
<project id="BEEINFUSION">
|
||||
@@ -93,4 +93,44 @@ Like the Magic Frame, this frame consumes aura to maintain its enchantments. Thi
|
||||
<page type="infusioncrafting">FRAMENECROTIC</page>
|
||||
</project>
|
||||
|
||||
<project id="HIVEFRAMETIME">
|
||||
<name>Temporal Frame</name>
|
||||
<popupText>Why isn't it blue and boxy?</popupText>
|
||||
<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.
|
||||
|
||||
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>
|
||||
</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>
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import net.minecraft.potion.Potion;
|
||||
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.apiculture.IAlleleFlowers;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
public class Allele implements IAllele
|
||||
{
|
||||
public static AlleleInteger fertilityHighDominant;
|
||||
|
||||
public static IAlleleFlowers flowerBookshelf;
|
||||
public static IAlleleFlowers flowerThaumcraft;
|
||||
public static IAlleleFlowers flowerAuraNode;
|
||||
@Deprecated
|
||||
public static IAlleleFlowers flowerNodePurify;
|
||||
@Deprecated
|
||||
public static IAlleleFlowers flowerNodeFluxify;
|
||||
|
||||
public static AlleleEffectCure cleansingEffect;
|
||||
public static AlleleEffectPotion digSpeed;
|
||||
public static AlleleEffectPotion moveSpeed;
|
||||
public static AlleleEffectPotion slowSpeed;
|
||||
public static AlleleEffectSpawnMob spawnBrainyZombie;
|
||||
public static AlleleEffectSpawnMob spawnWisp;
|
||||
public static AlleleEffectSpawnMob spawnBats;
|
||||
public static AlleleEffectSpawnMob spawnGhast;
|
||||
public static AlleleEffectAuraNodeAttract effectNodeAttract;
|
||||
public static AlleleEffectAuraNodePurify effectNodePurify;
|
||||
public static AlleleEffectAuraNodeFlux effectNodeFlux;
|
||||
public static AlleleEffectAuraNodeCharge effectNodeCharge;
|
||||
|
||||
public static void setupAdditionalAlleles()
|
||||
{
|
||||
Allele.fertilityHighDominant = new AlleleInteger("fertilityHighDominant", 3, true);
|
||||
|
||||
Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true);
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), 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.digSpeed = new AlleleEffectPotion("effectDigSpeed", Potion.digSpeed, 15, false);
|
||||
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", Potion.moveSpeed, 10, false);
|
||||
Allele.slowSpeed = new AlleleEffectPotion("effectSlowSpeed", Potion.moveSlowdown, 3, false);
|
||||
|
||||
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID);
|
||||
Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
|
||||
|
||||
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, ThaumcraftHelper.Entity.FIREBAT.entityID);
|
||||
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||
|
||||
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, ThaumcraftHelper.Entity.WISP.entityID, "thaumcraft.wisplive");
|
||||
Allele.spawnWisp.setThrottle(1800).setChanceToSpawn(79);
|
||||
|
||||
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghast", "mob.ghast.moan");
|
||||
Allele.spawnGhast.setThrottle(2060).setChanceToSpawn(10).setMaxMobsInSpawnZone(1);
|
||||
}
|
||||
|
||||
private String uid;
|
||||
private boolean dominant;
|
||||
|
||||
public static IAlleleBeeSpecies getBaseSpecies(String name)
|
||||
{
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
|
||||
}
|
||||
|
||||
public static IAlleleBeeSpecies getExtraSpecies(String name)
|
||||
{
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("extrabees.species.").append(name).toString());
|
||||
}
|
||||
|
||||
public static IAllele getBaseAllele(String name)
|
||||
{
|
||||
return AlleleManager.alleleRegistry.getAllele("forestry." + name);
|
||||
}
|
||||
|
||||
public Allele(String id, boolean isDominant)
|
||||
{
|
||||
this.uid = "thaumicbees." + id;
|
||||
this.dominant = isDominant;
|
||||
AlleleManager.alleleRegistry.registerAllele(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUID()
|
||||
{
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDominant()
|
||||
{
|
||||
return this.dominant;
|
||||
}
|
||||
|
||||
}
|
||||
+6
-5
@@ -1,12 +1,15 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
@@ -14,12 +17,10 @@ import forestry.api.genetics.IEffectData;
|
||||
|
||||
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||
{
|
||||
protected String readableName;
|
||||
|
||||
public AlleleEffect(String id, boolean isDominant, String identifier)
|
||||
public AlleleEffect(String id, boolean isDominant)
|
||||
{
|
||||
super(id, isDominant);
|
||||
this.readableName = identifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -34,7 +35,7 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||
@Override
|
||||
public String getIdentifier()
|
||||
{
|
||||
return this.readableName;
|
||||
return LocalizationManager.getLocalizedString(getUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -0,0 +1,80 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumNodeType;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodeAttract extends AlleleEffect
|
||||
{
|
||||
|
||||
private int throttle;
|
||||
|
||||
public AlleleEffectAuraNodeAttract(String id, boolean isDominant, int timeout)
|
||||
{
|
||||
super(id, isDominant);
|
||||
this.throttle = 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 value = storedData.getInteger(0);
|
||||
if (value >= throttle)
|
||||
{
|
||||
World w = housing.getWorld();
|
||||
if (w.rand.nextInt(10) < 1)
|
||||
{
|
||||
float x = housing.getXCoord();
|
||||
float y = housing.getYCoord();
|
||||
float z = housing.getZCoord();
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, 1800);
|
||||
if (nodeId != -1)
|
||||
{
|
||||
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||
if (node.level >= node.baseLevel * 4 / 5)
|
||||
{
|
||||
x = (float)(x - node.xPos);
|
||||
y = (float)(y - node.yPos);
|
||||
z = (float)(z - node.zPos);
|
||||
|
||||
float distance = (float)Math.sqrt(x * x + y * y + z * z);
|
||||
x = x / distance;
|
||||
y = y / distance;
|
||||
z = z / distance;
|
||||
|
||||
x *= 0.05f;
|
||||
y *= 0.05f;
|
||||
z *= 0.05f;
|
||||
|
||||
ThaumcraftApi.queueNodeChanges(nodeId, node.baseLevel * -1 / 13, w.rand.nextInt(2), false, null, x, y, z);
|
||||
}
|
||||
}
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, value + 1);
|
||||
}
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,7 +21,7 @@ public class AlleleEffectCure extends AlleleEffect
|
||||
|
||||
public AlleleEffectCure(String id, boolean isDominant)
|
||||
{
|
||||
super(id, isDominant, "Cleansing");
|
||||
super(id, isDominant);
|
||||
}
|
||||
|
||||
@Override
|
||||
+3
-3
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -18,9 +18,9 @@ public class AlleleEffectPotion extends AlleleEffect
|
||||
private int potionId;
|
||||
private int duration;
|
||||
|
||||
public AlleleEffectPotion(String name, String readableName, Potion potionApplied, int effectDuration, boolean isDominant)
|
||||
public AlleleEffectPotion(String name, Potion potionApplied, int effectDuration, boolean isDominant)
|
||||
{
|
||||
super("effect" + name, isDominant, readableName);
|
||||
super("effect" + name, isDominant);
|
||||
this.potionId = potionApplied.id;
|
||||
this.duration = 20 * effectDuration;
|
||||
}
|
||||
+22
-5
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -21,18 +21,25 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
||||
protected boolean spawnsWhilePlayerNear;
|
||||
protected String alternateMob;
|
||||
protected String mobName;
|
||||
protected String mobSound;
|
||||
protected int throttle;
|
||||
protected int chanceToSpawn;
|
||||
protected int maxMobsInArea;
|
||||
|
||||
public AlleleEffectSpawnMob(String id, boolean isDominant, String identifier, String mobToSpawn)
|
||||
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn)
|
||||
{
|
||||
super(id, isDominant, identifier);
|
||||
this(id, isDominant, mobToSpawn, null);
|
||||
}
|
||||
|
||||
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn, String mobSoundFx)
|
||||
{
|
||||
super(id, isDominant);
|
||||
this.aggosOnPlayer = false;
|
||||
this.mobName = mobToSpawn;
|
||||
this.throttle = 200;
|
||||
this.chanceToSpawn = 100;
|
||||
this.maxMobsInArea = 6;
|
||||
this.mobSound = mobSoundFx;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -109,6 +116,17 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
||||
}
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -139,8 +157,7 @@ public class AlleleEffectSpawnMob extends AlleleEffect
|
||||
AxisAlignedBB.getBoundingBox((int)pos[0], (int)pos[1], (int)pos[2], (int)pos[0] + 1, (int)pos[1] + 1, (int)pos[2] + 1)
|
||||
.expand(8.0D, 4.0D, 8.0D)).size();
|
||||
|
||||
mob.setPosition(pos[0], pos[1], pos[2]);
|
||||
mob.setAngles(world.rand.nextFloat() * 360f, 0f);
|
||||
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||
|
||||
if (entitiesCount < this.maxMobsInArea && mob.getCanSpawnHere())
|
||||
{
|
||||
+7
-15
@@ -1,15 +1,12 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
import thaumicbees.item.ItemArmorApiarist;
|
||||
import thaumicbees.thaumcraft.TCEntity;
|
||||
|
||||
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
|
||||
import net.minecraft.entity.EntityList;
|
||||
import net.minecraft.entity.EntityLiving;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -21,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 };
|
||||
|
||||
public AlleleEffectSpawnWisp(String id, boolean isDominant, String identifier, String mobToSpawn)
|
||||
public AlleleEffectSpawnWisp(String id, boolean isDominant, String mobToSpawn, String soundToPlay)
|
||||
{
|
||||
super(id, isDominant, identifier, mobToSpawn);
|
||||
super(id, isDominant, mobToSpawn, soundToPlay);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -49,23 +46,18 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
|
||||
AxisAlignedBB.getBoundingBox((int)pos[0], (int)pos[1], (int)pos[2], (int)pos[0] + 1, (int)pos[1] + 1, (int)pos[2] + 1)
|
||||
.expand(8.0D, 4.0D, 8.0D)).size();
|
||||
|
||||
mob.setPosition(pos[0], pos[1], pos[2]);
|
||||
mob.setAngles(world.rand.nextFloat() * 360f, 0f);
|
||||
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||
|
||||
if (entitiesCount < this.maxMobsInArea && mob.getCanSpawnHere())
|
||||
{
|
||||
// Try some Reflection on TC code. This could be dangerous.
|
||||
try
|
||||
{
|
||||
Class wispEntity = Class.forName(TCEntity.WISP.getClassName());
|
||||
Class wispEntity = Class.forName(ThaumcraftHelper.Entity.WISP.getClassName());
|
||||
Field type = wispEntity.getDeclaredField("type");
|
||||
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.info("ThaumicBees is using an invalid classname: " + TCEntity.WISP.getClassName()
|
||||
+ " Please report this error in the thread if you see it.", (Object[])null);
|
||||
}
|
||||
catch (Exception e) { /*Last time I had a request to post error messages, I regretted it.*/ }
|
||||
|
||||
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||
if (this.aggosOnPlayer && player != null)
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import forestry.api.apiculture.IAlleleFlowers;
|
||||
import forestry.api.apiculture.IFlowerProvider;
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import forestry.api.genetics.IAlleleInteger;
|
||||
|
||||
@@ -0,0 +1,114 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAlleleSpecies;
|
||||
import forestry.api.genetics.IClassification;
|
||||
|
||||
public enum BeeClassification implements IClassification
|
||||
{
|
||||
ARCANE("Arcane", "Arcanus"),
|
||||
SUPERNATURAL("Supernatural", "Occultus"),
|
||||
SCHOLARLY("Scholarly", "Docto"),
|
||||
THAUMIC("Thaumic", "Thaumis"),
|
||||
SKULKING("Skulking", "Malevolens"),
|
||||
VIS("Vis", "Vis"),
|
||||
TIME("Time", "Tempestivus"),
|
||||
SOUL("Soul", "Animus"),
|
||||
ALCHEMICAL("Alchemical", "Alchimia"),
|
||||
METALLIC("Metallic", "Metallicis"),
|
||||
GEM("Gem", "Lapidi"),
|
||||
FLESHY("Fleshy", "Carnosa"),
|
||||
;
|
||||
|
||||
private String uID;
|
||||
private String latin;
|
||||
private ArrayList<IAlleleSpecies> species;
|
||||
private IClassification parent;
|
||||
private EnumClassLevel level;
|
||||
|
||||
private BeeClassification(String name, String scientific)
|
||||
{
|
||||
this.uID = "classification." + name.toLowerCase();
|
||||
this.latin = scientific;
|
||||
this.level = EnumClassLevel.GENUS;
|
||||
this.species = new ArrayList();
|
||||
this.parent = AlleleManager.alleleRegistry.getClassification("family.apidae");
|
||||
AlleleManager.alleleRegistry.registerClassification(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumClassLevel getLevel()
|
||||
{
|
||||
return this.level;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUID()
|
||||
{
|
||||
return this.uID;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString(getUID());
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getScientific()
|
||||
{
|
||||
return this.latin;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString(getUID() + ".description");
|
||||
}
|
||||
|
||||
@Override
|
||||
public IClassification[] getMemberGroups()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMemberGroup(IClassification group)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAlleleSpecies[] getMemberSpecies()
|
||||
{
|
||||
return this.species.toArray(new IAlleleSpecies[this.species.size()]);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addMemberSpecies(IAlleleSpecies species)
|
||||
{
|
||||
if (!this.species.contains(species))
|
||||
{
|
||||
this.species.add(species);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IClassification getParent()
|
||||
{
|
||||
return this.parent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setParent(IClassification parent)
|
||||
{
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
}
|
||||
+257
-32
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
@@ -22,7 +22,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = new IAllele[EnumBeeChromosome.values().length];
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Esoteric;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ESOTERIC;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlowest");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanShorter");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||
@@ -56,7 +56,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseArcane();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Esoteric;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ESOTERIC;
|
||||
|
||||
return genome;
|
||||
}
|
||||
@@ -65,7 +65,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseArcane();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Mysterious;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.MYSTERIOUS;
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
|
||||
return genome;
|
||||
@@ -75,7 +75,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseArcane();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Arcane;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ARCANE;
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringAverage");
|
||||
@@ -98,7 +98,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseSupernatural();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Charmed;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.CHARMED;
|
||||
|
||||
return genome;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseSupernatural();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Enchanted;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ENCHANTED;
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||
|
||||
return genome;
|
||||
@@ -117,7 +117,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseSupernatural();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Supernatural;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SUPERNATURAL;
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||
|
||||
@@ -130,7 +130,7 @@ public class BeeGenomeManager
|
||||
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanElongated");
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp1");
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp2");
|
||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerBookshelf;
|
||||
@@ -142,7 +142,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseScholarly();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Pupil;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.PUPIL;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlower");
|
||||
|
||||
return genome;
|
||||
@@ -152,7 +152,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseScholarly();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Scholarly;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SCHOLARLY;
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||
|
||||
return genome;
|
||||
@@ -162,7 +162,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseScholarly();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Savant;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SAVANT;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||
|
||||
@@ -183,7 +183,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseElemental();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Stark;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.STARK;
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||
|
||||
return genome;
|
||||
@@ -193,7 +193,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseElemental();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Air;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.AIR;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFastest");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanShortened");
|
||||
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLargest");
|
||||
@@ -208,7 +208,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseElemental();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Fire;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.FIRE;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFaster");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown3");
|
||||
@@ -223,7 +223,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseElemental();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Water;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.WATER;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLong");
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown2");
|
||||
@@ -238,7 +238,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseElemental();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Earth;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.EARTH;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown1");
|
||||
@@ -254,7 +254,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseElemental();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Infused;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.INFUSED;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
|
||||
|
||||
@@ -276,7 +276,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseVis();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Aware;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.AWARE;
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||
|
||||
return genome;
|
||||
@@ -286,7 +286,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseVis();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Vis;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.VIS;
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlower");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
|
||||
@@ -298,11 +298,12 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseVis();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Pure;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.PURE;
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||
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;
|
||||
}
|
||||
@@ -311,10 +312,11 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseVis();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Flux;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.FLUX;
|
||||
genome[EnumBeeChromosome.HUMIDITY_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;
|
||||
}
|
||||
@@ -323,10 +325,22 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseVis();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Node;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.NODE;
|
||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
|
||||
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;
|
||||
}
|
||||
@@ -347,7 +361,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseMalevolent();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Skulking;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SKULKING;
|
||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||
|
||||
@@ -358,7 +372,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseMalevolent();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Brainy;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BRAINY;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnBrainyZombie;
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||
|
||||
@@ -369,7 +383,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseMalevolent();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Gossamer;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.GOSSAMER;
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||
|
||||
@@ -380,7 +394,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseMalevolent();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Wispy;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.WISPY;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnWisp;
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||
@@ -393,7 +407,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseMalevolent();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Batty;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BATTY;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnBats;
|
||||
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
|
||||
|
||||
@@ -404,7 +418,7 @@ public class BeeGenomeManager
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseMalevolent();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Ghastly;
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.GHASTLY;
|
||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
@@ -414,6 +428,217 @@ public class BeeGenomeManager
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
private static IAllele[] getTemplateBaseTemporal()
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseThaumic();
|
||||
|
||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateTimely()
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseTemporal();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.TIMELY;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.slowSpeed;
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanElongated");
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateLordly()
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseTemporal();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.LORDLY;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.slowSpeed;
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLong");
|
||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectDrunkard");
|
||||
|
||||
return genome;
|
||||
}
|
||||
|
||||
public static IAllele[] getTemplateDoctoral()
|
||||
{
|
||||
IAllele[] genome = getTemplateBaseTemporal();
|
||||
|
||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.DOCTORAL;
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.slowSpeed;
|
||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth3");
|
||||
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
|
||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLongest");
|
||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectHeroic");
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -0,0 +1,388 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import forestry.api.apiculture.*;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumNodeType;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
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
|
||||
{
|
||||
private static BeeMutation Esoteric;
|
||||
private static BeeMutation Esoteric1;
|
||||
private static BeeMutation Mysterious;
|
||||
private static BeeMutation Mysterious1;
|
||||
private static BeeMutation Arcane;
|
||||
private static BeeMutation Charmed;
|
||||
private static BeeMutation Enchanted;
|
||||
private static BeeMutation Supernatural;
|
||||
private static BeeMutation Stark;
|
||||
private static BeeMutation Fire;
|
||||
private static BeeMutation Water;
|
||||
private static BeeMutation Pupil;
|
||||
private static BeeMutation Scholarly;
|
||||
private static BeeMutation Savant;
|
||||
private static BeeMutation Aware;
|
||||
private static BeeMutation Vis;
|
||||
private static BeeMutation Vis1;
|
||||
private static BeeMutation Pure;
|
||||
private static BeeMutation Flux;
|
||||
private static BeeMutation Node;
|
||||
private static BeeMutation Node1;
|
||||
private static BeeMutation Skulking;
|
||||
private static BeeMutation Brainy;
|
||||
private static BeeMutation Gossamer;
|
||||
private static BeeMutation Wispy;
|
||||
private static BeeMutation Batty;
|
||||
private static BeeMutation Ghastly;
|
||||
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()
|
||||
{
|
||||
IAlleleBeeSpecies baseA, baseB;
|
||||
|
||||
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.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)
|
||||
.setMoonPhaseBonus(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT, 1.5f);
|
||||
BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Diligent"), Allele.getBaseSpecies("Valiant"), BeeSpecies.CHARMED, 20);
|
||||
BeeMutation.Enchanted = new BeeMutation(BeeSpecies.CHARMED, Allele.getBaseSpecies("Valiant"), BeeSpecies.ENCHANTED, 8);
|
||||
BeeMutation.Supernatural = new BeeMutation(BeeSpecies.CHARMED, BeeSpecies.ENCHANTED, BeeSpecies.SUPERNATURAL, 10)
|
||||
.setMoonPhaseBonus(MoonPhase.WAXING_GIBBOUS, MoonPhase.WANING_GIBBOUS, 1.5f);
|
||||
BeeMutation.Pupil = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.ENCHANTED, BeeSpecies.PUPIL, 10);
|
||||
BeeMutation.Stark = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.SUPERNATURAL, BeeSpecies.STARK, 8);
|
||||
|
||||
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.Doctoral = new BeeMutation(BeeSpecies.TIMELY, BeeSpecies.LORDLY, BeeSpecies.DOCTORAL, 7);
|
||||
|
||||
BeeMutation.Minium = new BeeMutation(Allele.getBaseSpecies("Sinister"), BeeSpecies.MYSTERIOUS, BeeSpecies.MINIUM, 11);
|
||||
|
||||
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.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("creeper"), BeeSpecies.GHASTLY, 13);
|
||||
}
|
||||
else
|
||||
{
|
||||
BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getBaseSpecies("Modest"), BeeSpecies.SKULKING, 10);
|
||||
BeeMutation.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Austere"), BeeSpecies.GHASTLY, 13);
|
||||
}
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
BeeMutation.Scholarly = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.ARCANE, BeeSpecies.SCHOLARLY, 8);
|
||||
BeeMutation.Savant = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.SCHOLARLY, BeeSpecies.SAVANT, 6);
|
||||
|
||||
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.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 parent2;
|
||||
private IAllele mutationTemplate[];
|
||||
private int baseChance;
|
||||
private boolean isSecret;
|
||||
private boolean isMoonRestricted;
|
||||
private MoonPhase moonPhaseStart;
|
||||
private MoonPhase moonPhaseEnd;
|
||||
private float moonPhaseMutationBonus;
|
||||
private boolean nodeRequired;
|
||||
private EnumNodeType nodeType;
|
||||
private double nodeRange;
|
||||
|
||||
public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, BeeSpecies resultSpecies, int percentChance)
|
||||
{
|
||||
this.parent1 = species0;
|
||||
this.parent2 = species1;
|
||||
this.mutationTemplate = resultSpecies.getGenome();
|
||||
this.baseChance = percentChance;
|
||||
this.isSecret = false;
|
||||
this.isMoonRestricted = false;
|
||||
this.moonPhaseMutationBonus = -1f;
|
||||
this.nodeType = null;
|
||||
|
||||
BeeManager.breedingManager.registerBeeMutation(this);
|
||||
}
|
||||
|
||||
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
||||
{
|
||||
int finalChance = 0;
|
||||
float chance = this.baseChance * 1f;
|
||||
|
||||
if (this.arePartners(allele0, allele1))
|
||||
{
|
||||
// This mutation applies. Continue calculation.
|
||||
if (this.moonPhaseStart != null && this.moonPhaseEnd != null)
|
||||
{
|
||||
// Only occurs during the phases.
|
||||
if (this.isMoonRestricted && !MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd))
|
||||
{
|
||||
chance = 0;
|
||||
}
|
||||
else if (this.moonPhaseMutationBonus != -1f)
|
||||
{
|
||||
// There is a bonus to this mutation during moon phases...
|
||||
if (MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd))
|
||||
{
|
||||
chance = (int)(chance * this.moonPhaseMutationBonus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.nodeRequired)
|
||||
{
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(housing.getWorld(),
|
||||
housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), this.nodeRange);
|
||||
if (nodeId >= 0)
|
||||
{
|
||||
if (this.nodeType != null)
|
||||
{
|
||||
// Needs a _specific_ variety of node
|
||||
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||
if (node.type != this.nodeType)
|
||||
{
|
||||
chance = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chance = 0;
|
||||
}
|
||||
}
|
||||
|
||||
finalChance = Math.round(chance
|
||||
* housing.getMutationModifier((IBeeGenome) genome0,
|
||||
(IBeeGenome) genome1)
|
||||
* BeeManager.breedingManager.getBeekeepingMode(housing.getWorld())
|
||||
.getMutationModifier((IBeeGenome) genome0,
|
||||
(IBeeGenome) genome1));
|
||||
}
|
||||
|
||||
return finalChance;
|
||||
}
|
||||
|
||||
public IAllele getAllele0()
|
||||
{
|
||||
return parent1;
|
||||
}
|
||||
|
||||
public IAllele getAllele1()
|
||||
{
|
||||
return parent2;
|
||||
}
|
||||
|
||||
public IAllele[] getTemplate()
|
||||
{
|
||||
return mutationTemplate;
|
||||
}
|
||||
|
||||
public int getBaseChance()
|
||||
{
|
||||
return baseChance;
|
||||
}
|
||||
|
||||
public boolean isPartner(IAllele allele)
|
||||
{
|
||||
return parent1.getUID().equals(allele.getUID()) || parent2.getUID().equals(allele.getUID());
|
||||
}
|
||||
|
||||
public IAllele getPartner(IAllele allele)
|
||||
{
|
||||
IAllele val = parent1;
|
||||
if (val.getUID().equals(allele.getUID()))
|
||||
val = parent2;
|
||||
return val;
|
||||
}
|
||||
|
||||
public boolean arePartners(IAllele alleleA, IAllele alleleB)
|
||||
{
|
||||
return (this.parent1.getUID().equals(alleleA.getUID())) && this.parent2.getUID().equals(alleleB.getUID()) ||
|
||||
this.parent1.getUID().equals(alleleB.getUID()) && this.parent2.getUID().equals(alleleA.getUID());
|
||||
}
|
||||
|
||||
public BeeMutation setSecret()
|
||||
{
|
||||
this.isSecret = true;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSecret()
|
||||
{
|
||||
return isSecret;
|
||||
}
|
||||
|
||||
public BeeMutation setMoonPhaseRestricted(MoonPhase begin, MoonPhase end)
|
||||
{
|
||||
this.isMoonRestricted = true;
|
||||
this.moonPhaseStart = begin;
|
||||
this.moonPhaseEnd = end;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setMoonPhaseBonus(MoonPhase begin, MoonPhase end, float mutationBonus)
|
||||
{
|
||||
this.moonPhaseMutationBonus = mutationBonus;
|
||||
this.moonPhaseStart = begin;
|
||||
this.moonPhaseEnd = end;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setAuraNodeRequired(double range)
|
||||
{
|
||||
this.nodeRequired = true;
|
||||
this.nodeRange = range;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setAuraNodeTypeRequired(double range, EnumNodeType type)
|
||||
{
|
||||
this.nodeType = type;
|
||||
|
||||
return this.setAuraNodeRequired(range);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,544 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import forestry.api.apiculture.*;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.genetics.*;
|
||||
import forestry.api.genetics.IClassification.EnumClassLevel;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
import thaumicbees.item.types.CombType;
|
||||
import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.NuggetType;
|
||||
import thaumicbees.item.types.PollenType;
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
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.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public enum BeeSpecies implements IAlleleBeeSpecies
|
||||
{
|
||||
ESOTERIC("Esoteric", "secretiore",
|
||||
BeeClassification.ARCANE, 0x001099, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
MYSTERIOUS("Mysterious", "mysticus",
|
||||
BeeClassification.ARCANE, 0x762bc2, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
ARCANE("Arcane", "arcanus",
|
||||
BeeClassification.ARCANE, 0xd242df, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||
CHARMED("Charmed", "larvatus",
|
||||
BeeClassification.SUPERNATURAL, 0x48EEEC, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
ENCHANTED("Enchanted", "cantatus",
|
||||
BeeClassification.SUPERNATURAL, 0x18e726, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
SUPERNATURAL("Supernatural", "coeleste",
|
||||
BeeClassification.SUPERNATURAL, 0x005614, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||
PUPIL("Pupil", "disciplina",
|
||||
BeeClassification.SCHOLARLY, 0xFFFF00, EnumTemperature.NORMAL, EnumHumidity.ARID, false, true),
|
||||
SCHOLARLY("Scholarly", "studiosis",
|
||||
BeeClassification.SCHOLARLY, 0x6E0000, EnumTemperature.NORMAL, EnumHumidity.ARID, false, false),
|
||||
SAVANT("Savant", "philologus",
|
||||
BeeClassification.SCHOLARLY, 0x6E1C6D, EnumTemperature.NORMAL, EnumHumidity.ARID, true, false),
|
||||
STARK("Stark", "torridae",
|
||||
BeeClassification.THAUMIC, 0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||
AIR("Aura", "ventosa",
|
||||
BeeClassification.THAUMIC, 0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||
FIRE("Ignis", "praefervidus",
|
||||
BeeClassification.THAUMIC, 0xE50B0B, 0x95132F, EnumTemperature.HOT, EnumHumidity.ARID, true, true),
|
||||
WATER("Aqua", "umidus",
|
||||
BeeClassification.THAUMIC, 0x36CFD9, 0x1054A1, EnumTemperature.NORMAL, EnumHumidity.DAMP, true, true),
|
||||
EARTH("Solum", "sordida",
|
||||
BeeClassification.THAUMIC, 0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||
INFUSED("Praecantatio", "azanorius",
|
||||
BeeClassification.THAUMIC, 0xaa32fc, 0x7A489E, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||
AWARE("Aware", "sensibilis",
|
||||
BeeClassification.VIS, 0xb0092e9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||
VIS("Vis", "arcanus saecula",
|
||||
BeeClassification.VIS, 0x004c99, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||
PURE("Pure", "arcanus puritatem",
|
||||
BeeClassification.VIS, 0xb0092e9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||
FLUX("Flux", "arcanus labe",
|
||||
BeeClassification.VIS, 0x004c99, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||
NODE("Node", "conficiens",
|
||||
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",
|
||||
BeeClassification.SKULKING, 0x524827, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
BRAINY("Brainy", "cerebrum",
|
||||
BeeClassification.SKULKING, 0x83FF70, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
GOSSAMER("Gossamer", "perlucidus",
|
||||
BeeClassification.SKULKING, 0x183f66, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
WISPY("Wispy", "umbrabilis",
|
||||
BeeClassification.SKULKING, 0x9cb8d5, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||
BATTY("Batty", "chiroptera",
|
||||
BeeClassification.SKULKING, 0x27350d, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
GHASTLY("Ghastly", "pallens",
|
||||
BeeClassification.SKULKING, 0xccccee, 0xbf877c, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||
TIMELY("Timely", "gallifreis",
|
||||
BeeClassification.TIME, 0xC6AF86, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||
LORDLY("Lordly", "rassilonis",
|
||||
BeeClassification.TIME, 0xC6AF86, 0x8E0213, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||
DOCTORAL("Doctoral", "medicus qui",
|
||||
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()
|
||||
{
|
||||
// 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)
|
||||
.setGenome(BeeGenomeManager.getTemplateEsoteric())
|
||||
.register();
|
||||
MYSTERIOUS.addProduct(Config.combs.getStackForType(CombType.OCCULT), 25)
|
||||
.setGenome(BeeGenomeManager.getTemplateMysterious())
|
||||
.register();
|
||||
ARCANE.addProduct(Config.combs.getStackForType(CombType.OCCULT), 30)
|
||||
.addSpecialty(Config.drops.getStackForType(DropType.ENCHANTED, 1), 9)
|
||||
.setGenome(BeeGenomeManager.getTemplateArcane())
|
||||
.register();
|
||||
CHARMED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 20)
|
||||
.setGenome(BeeGenomeManager.getTemplateCharmed())
|
||||
.register();
|
||||
ENCHANTED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 30)
|
||||
.setGenome(BeeGenomeManager.getTemplateEnchanted())
|
||||
.register();
|
||||
SUPERNATURAL.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 40)
|
||||
.addSpecialty(Config.pollen.getStackForType(PollenType.UNUSUAL), 8)
|
||||
.setGenome(BeeGenomeManager.getTemplateSupernatural())
|
||||
.register();
|
||||
PUPIL.addProduct(Config.combs.getStackForType(CombType.PAPERY), 20)
|
||||
.setGenome(BeeGenomeManager.getTemplatePupil())
|
||||
.register();
|
||||
SCHOLARLY.addProduct(Config.combs.getStackForType(CombType.PAPERY), 25)
|
||||
.addSpecialty(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 2)
|
||||
.setGenome(BeeGenomeManager.getTemplateScholarly())
|
||||
.register();
|
||||
SAVANT.addProduct(Config.combs.getStackForType(CombType.PAPERY), 40)
|
||||
.addSpecialty(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 5)
|
||||
.setGenome(BeeGenomeManager.getTemplateSavant())
|
||||
.register();
|
||||
STARK.addProduct(Config.combs.getStackForType(CombType.STARK), 10)
|
||||
.setGenome(BeeGenomeManager.getTemplateStark())
|
||||
.register();
|
||||
AIR.addProduct(Config.combs.getStackForType(CombType.AIRY), 9)
|
||||
.setGenome(BeeGenomeManager.getTemplateAir())
|
||||
.register();
|
||||
FIRE.addProduct(Config.combs.getStackForType(CombType.FIREY), 15)
|
||||
.addSpecialty(new ItemStack(Item.blazePowder), 4).setGenome(BeeGenomeManager.getTemplateFire())
|
||||
.register();
|
||||
WATER.addProduct(Config.combs.getStackForType(CombType.WATERY), 20)
|
||||
.addSpecialty(new ItemStack(Block.ice), 1)
|
||||
.addSpecialty(new ItemStack(Config.fPollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), 5)
|
||||
.setGenome(BeeGenomeManager.getTemplateWater())
|
||||
.register();
|
||||
EARTH.addProduct(Config.combs.getStackForType(CombType.EARTHY), 30)
|
||||
.setGenome(BeeGenomeManager.getTemplateEarth())
|
||||
.register();
|
||||
INFUSED.addProduct(Config.combs.getStackForType(CombType.INFUSED), 20)
|
||||
.setGenome(BeeGenomeManager.getTemplateInfused())
|
||||
.register();
|
||||
AWARE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 18)
|
||||
.setGenome(BeeGenomeManager.getTemplateAware())
|
||||
.register();
|
||||
VIS.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 25)
|
||||
.setGenome(BeeGenomeManager.getTemplateVis())
|
||||
.register();
|
||||
PURE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
|
||||
.setGenome(BeeGenomeManager.getTemplatePure())
|
||||
.register();
|
||||
FLUX.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
|
||||
.setGenome(BeeGenomeManager.getTemplateFlux())
|
||||
.register();
|
||||
NODE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
|
||||
.setGenome(BeeGenomeManager.getTemplateNode())
|
||||
.register();
|
||||
REJUVENATING.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
|
||||
.setGenome(BeeGenomeManager.getTemplateRejuvinating())
|
||||
.register();
|
||||
SKULKING.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
|
||||
.setGenome(BeeGenomeManager.getTemplateSkulking())
|
||||
.register();
|
||||
BRAINY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
|
||||
.addProduct(new ItemStack(Item.rottenFlesh), 6)
|
||||
.setGenome(BeeGenomeManager.getTemplateBrainy())
|
||||
.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)
|
||||
.setGenome(BeeGenomeManager.getTemplateGossamer())
|
||||
.register();
|
||||
WISPY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 22)
|
||||
.addSpecialty(new ItemStack(Config.fCraftingResource, 1, ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()), 4)
|
||||
.setGenome(BeeGenomeManager.getTemplateWispy())
|
||||
.register();
|
||||
GHASTLY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 8)
|
||||
.addSpecialty(new ItemStack(Item.ghastTear), 2)
|
||||
.setGenome(BeeGenomeManager.getTemplateGhastly())
|
||||
.register();
|
||||
TIMELY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25)
|
||||
.addProduct(Config.pollen.getStackForType(PollenType.PHASED), 10)
|
||||
.setGenome(BeeGenomeManager.getTemplateTimely())
|
||||
.register();
|
||||
LORDLY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 5)
|
||||
.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25)
|
||||
.addProduct(Config.pollen.getStackForType(PollenType.PHASED), 15)
|
||||
.setGenome(BeeGenomeManager.getTemplateLordly())
|
||||
.register();
|
||||
DOCTORAL.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 10)
|
||||
.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25)
|
||||
.addProduct(Config.pollen.getStackForType(PollenType.PHASED), 19)
|
||||
.addSpecialty(new ItemStack(Config.jellyBaby), 7)
|
||||
.setGenome(BeeGenomeManager.getTemplateDoctoral())
|
||||
.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 authority;
|
||||
private int bodyType;
|
||||
private int primaryColour;
|
||||
private int secondaryColour;
|
||||
private EnumTemperature temperature;
|
||||
private EnumHumidity humidity;
|
||||
private boolean hasEffect;
|
||||
private boolean isSecret;
|
||||
private boolean isCounted;
|
||||
private boolean isActive;
|
||||
private IClassification branch;
|
||||
private HashMap products;
|
||||
private HashMap specialty;
|
||||
private IAllele genomeTemplate[];
|
||||
private String uid;
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
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)
|
||||
{
|
||||
this.uid = "thaumicbees.species" + speciesName;
|
||||
this.dominant = isSpeciesDominant;
|
||||
AlleleManager.alleleRegistry.registerAllele(this);
|
||||
binomial = genusName;
|
||||
authority = "MysteriousAges";
|
||||
bodyType = body;
|
||||
primaryColour = firstColour;
|
||||
secondaryColour = secondColour;
|
||||
temperature = preferredTemp;
|
||||
humidity = preferredHumidity;
|
||||
hasEffect = hasGlowEffect;
|
||||
isSecret = isSpeciesSecret;
|
||||
isCounted = isSpeciesCounted;
|
||||
products = new HashMap();
|
||||
specialty = new HashMap();
|
||||
this.branch = classification;
|
||||
this.branch.addMemberSpecies(this);
|
||||
this.isActive = true;
|
||||
}
|
||||
|
||||
public BeeSpecies setGenome(IAllele genome[])
|
||||
{
|
||||
genomeTemplate = genome;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAllele[] getGenome()
|
||||
{
|
||||
return genomeTemplate;
|
||||
}
|
||||
|
||||
public BeeSpecies addProduct(ItemStack produce, int percentChance)
|
||||
{
|
||||
products.put(produce, Integer.valueOf(percentChance));
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeSpecies addSpecialty(ItemStack produce, int percentChance)
|
||||
{
|
||||
specialty.put(produce, Integer.valueOf(percentChance));
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemStack getBeeItem(EnumBeeType beeType)
|
||||
{
|
||||
return BeeManager.beeInterface.getBeeStack(BeeManager.beeInterface.getBee(null, BeeManager.beeInterface.templateAsGenome(genomeTemplate)), beeType);
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString(getUID());
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString(getUID() + ".description");
|
||||
}
|
||||
|
||||
public int getBodyType()
|
||||
{
|
||||
return bodyType;
|
||||
}
|
||||
|
||||
public int getPrimaryColor()
|
||||
{
|
||||
return primaryColour;
|
||||
}
|
||||
|
||||
public int getSecondaryColor()
|
||||
{
|
||||
return secondaryColour;
|
||||
}
|
||||
|
||||
public EnumTemperature getTemperature()
|
||||
{
|
||||
return temperature;
|
||||
}
|
||||
|
||||
public EnumHumidity getHumidity()
|
||||
{
|
||||
return humidity;
|
||||
}
|
||||
|
||||
public boolean hasEffect()
|
||||
{
|
||||
return hasEffect;
|
||||
}
|
||||
|
||||
public BeeSpecies setInactive()
|
||||
{
|
||||
this.isActive = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isActive()
|
||||
{
|
||||
return this.isActive;
|
||||
}
|
||||
|
||||
public boolean isSecret()
|
||||
{
|
||||
return isSecret;
|
||||
}
|
||||
|
||||
public boolean isCounted()
|
||||
{
|
||||
return isCounted;
|
||||
}
|
||||
|
||||
public String getBinomial()
|
||||
{
|
||||
return binomial;
|
||||
}
|
||||
|
||||
public String getAuthority()
|
||||
{
|
||||
return authority;
|
||||
}
|
||||
|
||||
public IClassification getBranch()
|
||||
{
|
||||
return this.branch;
|
||||
}
|
||||
|
||||
public HashMap getProducts()
|
||||
{
|
||||
return products;
|
||||
}
|
||||
|
||||
public HashMap getSpecialty()
|
||||
{
|
||||
return specialty;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUID()
|
||||
{
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDominant()
|
||||
{
|
||||
return this.dominant;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isJubilant(World world, int biomeid, int x, int y, int z)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private BeeSpecies register()
|
||||
{
|
||||
BeeManager.breedingManager.registerBeeTemplate(this.getGenome());
|
||||
if (!this.isActive)
|
||||
{
|
||||
AlleleManager.alleleRegistry.blacklistAllele(this.getUID());
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Method getAchievement is deprecated
|
||||
*/
|
||||
|
||||
public Achievement getAchievement()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
package thaumicbees.bees;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
@@ -1,8 +1,10 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.block.BlockManager;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -34,7 +36,7 @@ public class FlowerProviderAuraNode implements IFlowerProvider
|
||||
if (world.isAirBlock(x, y, z) && (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID))
|
||||
{
|
||||
int rand = world.rand.nextInt(10);
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, BlockManager.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
||||
flag = true;
|
||||
}
|
||||
@@ -44,7 +46,7 @@ public class FlowerProviderAuraNode implements IFlowerProvider
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return "Node";
|
||||
return LocalizationManager.getLocalizedString("tb.bees.flower.node");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
@@ -13,19 +15,22 @@ public class FlowerProviderAuraNodeFlux extends FlowerProviderAuraNode
|
||||
{
|
||||
@Override
|
||||
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
|
||||
{
|
||||
EnumTag tag;
|
||||
do
|
||||
{
|
||||
if (world.rand.nextInt(20) < 1)
|
||||
{
|
||||
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
|
||||
}
|
||||
while (tag == EnumTag.UNKNOWN);
|
||||
|
||||
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);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
return products;
|
||||
@@ -34,6 +39,6 @@ public class FlowerProviderAuraNodeFlux extends FlowerProviderAuraNode
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return "Node Flux";
|
||||
return LocalizationManager.getLocalizedString("tb.bees.flower.nodeFlux");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -7,8 +8,8 @@ import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.block.BlockManager;
|
||||
import thaumicbees.item.ItemManager;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
|
||||
public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode
|
||||
@@ -22,24 +23,27 @@ public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return "Node Purify";
|
||||
return LocalizationManager.getLocalizedString("tb.bees.flower.nodePure");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
|
||||
{
|
||||
AuraNode node = this.getNodeWithinRange(world, x, y, z);
|
||||
if (node != null)
|
||||
if (world.rand.nextInt(25) < 1)
|
||||
{
|
||||
int aspectCount = node.flux.tags.size();
|
||||
if (aspectCount > 0)
|
||||
AuraNode node = this.getNodeWithinRange(world, x, y, z);
|
||||
if (node != null && (1.0 * node.level) / node.baseLevel > 0.75)
|
||||
{
|
||||
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
|
||||
if (selectedTag != null)
|
||||
int aspectCount = node.flux.tags.size();
|
||||
if (aspectCount > 0)
|
||||
{
|
||||
node.flux.remove(selectedTag, 1);
|
||||
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().add(selectedTag, -1), 0, 0, 0);
|
||||
products = addItemToProducts(products, new ItemStack(ItemManager.solidFlux, 1, selectedTag.id));
|
||||
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
|
||||
if (selectedTag != null)
|
||||
{
|
||||
node.flux.remove(selectedTag, 1);
|
||||
ThaumcraftApi.queueNodeChanges(node.key, node.baseLevel / -16, 0, false, new ObjectTags().add(selectedTag, -1), 0, 0, 0);
|
||||
products = addItemToProducts(products, new ItemStack(Config.solidFlux, 1, selectedTag.id));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -46,6 +48,6 @@ public class FlowerProviderBookshelf implements IFlowerProvider
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return "Books";
|
||||
return LocalizationManager.getLocalizedString("tb.bees.flower.book");
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import thaumicbees.block.BlockManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumicbees.main.Config;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
@@ -10,13 +13,13 @@ import forestry.api.genetics.IPollinatable;
|
||||
|
||||
public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||
{
|
||||
private ItemStack[] flowers = {new ItemStack(BlockManager.tcPlant, 1, 2), new ItemStack(BlockManager.tcPlant, 1, 3) };
|
||||
private ItemStack[] flowers = {new ItemStack(Config.tcPlant, 1, 2), new ItemStack(Config.tcPlant, 1, 3) };
|
||||
|
||||
@Override
|
||||
public boolean isAcceptedFlower(World world, IBeeGenome genome, int x, int y, int z)
|
||||
{
|
||||
boolean flag = false;
|
||||
if (world.getBlockId(x, y, z) == BlockManager.tcPlant.blockID)
|
||||
if (world.getBlockId(x, y, z) == Config.tcPlant.blockID)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 2 || meta == 3)
|
||||
@@ -32,12 +35,18 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||
{
|
||||
boolean flag = false;
|
||||
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);
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, BlockManager.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
||||
flag = true;
|
||||
if (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@@ -45,7 +54,7 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||
@Override
|
||||
public String getDescription()
|
||||
{
|
||||
return "Magic Flowers";
|
||||
return LocalizationManager.getLocalizedString("tb.bees.flower.magic");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,423 +0,0 @@
|
||||
package thaumicbees.bees;
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import forestry.api.apiculture.*;
|
||||
import forestry.api.core.*;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IClassification;
|
||||
import forestry.api.genetics.IClassification.EnumClassLevel;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.Random;
|
||||
|
||||
import thaumcraft.api.EnumNodeType;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.bees.genetics.Allele;
|
||||
import thaumicbees.bees.genetics.AlleleEffectAuraNodeGrow;
|
||||
import thaumicbees.bees.genetics.AlleleEffectCure;
|
||||
import thaumicbees.bees.genetics.AlleleEffectPotion;
|
||||
import thaumicbees.bees.genetics.AlleleEffectSpawnMob;
|
||||
import thaumicbees.bees.genetics.AlleleEffectSpawnWisp;
|
||||
import thaumicbees.bees.genetics.AlleleFlower;
|
||||
import thaumicbees.bees.genetics.AlleleInteger;
|
||||
import thaumicbees.bees.genetics.BeeGenomeManager;
|
||||
import thaumicbees.bees.genetics.BeeMutation;
|
||||
import thaumicbees.bees.genetics.BeeSpecies;
|
||||
import thaumicbees.item.ItemComb;
|
||||
import thaumicbees.item.ItemManager;
|
||||
import thaumicbees.item.types.CombType;
|
||||
import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.PollenType;
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.thaumcraft.TCEntity;
|
||||
import thaumicbees.thaumcraft.TCMiscResource;
|
||||
import thaumicbees.thaumcraft.TCShardType;
|
||||
import thaumicbees.thaumcraft.ThaumcraftCompat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.command.ICommand;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class TBBeeManager
|
||||
{
|
||||
private static int defaultBodyColour = 0xFF6E0D;
|
||||
private static int malevolentBodyColour = 0xe15236;
|
||||
private static boolean hideSpecies = true;
|
||||
|
||||
public void doInit()
|
||||
{
|
||||
try
|
||||
{
|
||||
Field f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
|
||||
ThaumicBees.getInstanceConfig().DrawParticleEffects = f.getBoolean(null);
|
||||
|
||||
f = Class.forName("forestry.core.config.Defaults").getField("TEXTURE_PARTICLES_BEE");
|
||||
thaumicbees.main.CommonProxy.FORESTRY_GFX_BEEEFFECTS = (String)f.get(null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
// Could not get Forestry config value.
|
||||
}
|
||||
}
|
||||
|
||||
public void postInit()
|
||||
{
|
||||
setupAdditionalAlleles();
|
||||
setupBeeSpecies();
|
||||
setupBeeMutations();
|
||||
}
|
||||
|
||||
private void setupAdditionalAlleles()
|
||||
{
|
||||
Allele.fertilityHighDominant = new AlleleInteger("fertilityHighDominant", 3, true);
|
||||
|
||||
Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true);
|
||||
Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), false);
|
||||
Allele.flowerAuraNode = new AlleleFlower("flowerAuraNode", new FlowerProviderAuraNode(), true);
|
||||
Allele.flowerNodePurify = new AlleleFlower("flowerAuraNodePurify", new FlowerProviderAuraNodePurify(), false);
|
||||
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", new FlowerProviderAuraNodeFlux(), false);
|
||||
|
||||
Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false);
|
||||
Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", "Mining", Potion.digSpeed, 7, false);
|
||||
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", "Swiftness", Potion.moveSpeed, 5, false);
|
||||
|
||||
Allele.nodeGen = new AlleleEffectAuraNodeGrow("effectNodeGeneration", "Nodeify", false, 800);
|
||||
|
||||
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, "Brainy", TCEntity.BRAINY_ZOMBIE.entityID);
|
||||
Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
|
||||
|
||||
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, "Batty", TCEntity.FIREBAT.entityID);
|
||||
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||
|
||||
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, "Wispy", TCEntity.WISP.entityID);
|
||||
Allele.spawnWisp.setThrottle(1800);
|
||||
|
||||
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghastly", "Ghast");
|
||||
Allele.spawnGhast.setThrottle(2000).setChanceToSpawn(20).setMaxMobsInSpawnZone(1);
|
||||
}
|
||||
|
||||
private void setupBeeSpecies()
|
||||
{
|
||||
IBreedingManager breedingMgr = BeeManager.breedingManager;
|
||||
ItemStack forestryItem;
|
||||
|
||||
IClassification familyBee = AlleleManager.alleleRegistry.getClassification("family.apidae");
|
||||
IClassification occult = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "occult", "Arcanus");
|
||||
occult.setParent(familyBee);
|
||||
|
||||
Allele.Esoteric = new BeeSpecies("Esoteric", "An unusual crossbreed which seems to have magical properties.|Apinomicon",
|
||||
"secretiore", occult, 0,
|
||||
0x001099, 0xcc763c, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Esoteric.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 20);
|
||||
Allele.Esoteric.setGenome(BeeGenomeManager.getTemplateEsoteric());
|
||||
occult.addMemberSpecies(Allele.Esoteric);
|
||||
breedingMgr.registerBeeTemplate(Allele.Esoteric.getGenome());
|
||||
|
||||
Allele.Mysterious = new BeeSpecies("Mysterious", "These bees have been to the end of the world and back, and their power has grown.|Apinomicon",
|
||||
"mysticus", occult, 0,
|
||||
0x762bc2, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Mysterious.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 25);
|
||||
Allele.Mysterious.setGenome(BeeGenomeManager.getTemplateMysterious());
|
||||
occult.addMemberSpecies(Allele.Mysterious);
|
||||
breedingMgr.registerBeeTemplate(Allele.Mysterious.getGenome());
|
||||
|
||||
Allele.Arcane = new BeeSpecies("Arcane", "\"Their produce is charged with magic.\"|Azanor, Master Thaumaturge",
|
||||
"arcanus", occult, 0,
|
||||
0xd242df, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Arcane.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 30);
|
||||
Allele.Arcane.addSpecialty(ItemManager.drops.getStackForType(DropType.ENCHANTED, 1), 9);
|
||||
Allele.Arcane.setGenome(BeeGenomeManager.getTemplateArcane());
|
||||
occult.addMemberSpecies(Allele.Arcane);
|
||||
breedingMgr.registerBeeTemplate(Allele.Arcane.getGenome());
|
||||
|
||||
IClassification otherworldly = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "coeleste", "Coeleste");
|
||||
otherworldly.setParent(familyBee);
|
||||
|
||||
Allele.Charmed = new BeeSpecies("Charmed", "Your first experiments in Thaumaturgical Apiculture have yielded fruit. Buzzing fruit.|Apinomicon",
|
||||
"larvatus", otherworldly, 0,
|
||||
0x48EEEC, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Charmed.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 20);
|
||||
Allele.Charmed.setGenome(BeeGenomeManager.getTemplateCharmed());
|
||||
otherworldly.addMemberSpecies(Allele.Charmed);
|
||||
breedingMgr.registerBeeTemplate(Allele.Charmed.getGenome());
|
||||
|
||||
Allele.Enchanted = new BeeSpecies("Enchanted", "Successive generations of Charmed bees have reinforced their connection to the unknown.|Apinomicon",
|
||||
"cantatus", otherworldly, 0,
|
||||
0x18e726, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Enchanted.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 30);
|
||||
Allele.Enchanted.setGenome(BeeGenomeManager.getTemplateEnchanted());
|
||||
otherworldly.addMemberSpecies(Allele.Enchanted);
|
||||
breedingMgr.registerBeeTemplate(Allele.Enchanted.getGenome());
|
||||
|
||||
Allele.Supernatural = new BeeSpecies("Supernatural", "These bees walk the line between this world and the unseen.|Apinomicon",
|
||||
"coeleste", otherworldly, 0,
|
||||
0x005614, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Supernatural.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 40);
|
||||
Allele.Supernatural.addSpecialty(ItemManager.pollen.getStackForType(PollenType.UNUSUAL), 8);
|
||||
Allele.Supernatural.setGenome(BeeGenomeManager.getTemplateSupernatural());
|
||||
otherworldly.addMemberSpecies(Allele.Supernatural);
|
||||
breedingMgr.registerBeeTemplate(Allele.Supernatural.getGenome());
|
||||
|
||||
IClassification learned = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "docto", "Docto");
|
||||
learned.setParent(familyBee);
|
||||
|
||||
Allele.Pupil = new BeeSpecies("Pupil", "\"What does that bee want with my paper?!|Yorae, Librarian",
|
||||
"disciplina", learned, 0,
|
||||
0xFFFF00, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Pupil.addProduct(ItemManager.combs.getStackForType(CombType.PAPERY), 20);
|
||||
Allele.Pupil.setGenome(BeeGenomeManager.getTemplatePupil());
|
||||
learned.addMemberSpecies(Allele.Pupil);
|
||||
breedingMgr.registerBeeTemplate(Allele.Pupil.getGenome());
|
||||
|
||||
Allele.Scholarly = new BeeSpecies("Scholarly", "\"I can't be sure, but I think they might be smarter than me...\"|Yorae, Librarian",
|
||||
"studiosis", learned, 0,
|
||||
0x6E0000, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||
false, hideSpecies, true, false);
|
||||
Allele.Scholarly.addProduct(ItemManager.combs.getStackForType(CombType.PAPERY), 25);
|
||||
Allele.Scholarly.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 2);
|
||||
Allele.Scholarly.setGenome(BeeGenomeManager.getTemplateScholarly());
|
||||
learned.addMemberSpecies(Allele.Scholarly);
|
||||
breedingMgr.registerBeeTemplate(Allele.Scholarly.getGenome());
|
||||
|
||||
Allele.Savant = new BeeSpecies("Savant", "lim(x^(i / pi)/ log(e * 7 - ln(32/x^-pi))). Solve for honey.|Note found on Yorae's desk",
|
||||
"philologus", learned, 0,
|
||||
0x6E1C6D, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||
true, hideSpecies, true, false);
|
||||
Allele.Savant.addProduct(ItemManager.combs.getStackForType(CombType.PAPERY), 40);
|
||||
Allele.Savant.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 5);
|
||||
Allele.Savant.setGenome(BeeGenomeManager.getTemplateSavant());
|
||||
learned.addMemberSpecies(Allele.Savant);
|
||||
breedingMgr.registerBeeTemplate(Allele.Savant.getGenome());
|
||||
|
||||
IClassification stark = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "torridus", "Torridus");
|
||||
stark.setParent(familyBee);
|
||||
|
||||
Allele.Stark = new BeeSpecies("Stark", "\"These are unusually attracted to shards. This warrents further investigation.\"|Azanor, Master Thaumaturge",
|
||||
"torridae", stark, 0,
|
||||
0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, false);
|
||||
Allele.Stark.addProduct(ItemManager.combs.getStackForType(CombType.STARK), 10);
|
||||
Allele.Stark.setGenome(BeeGenomeManager.getTemplateStark());
|
||||
breedingMgr.registerBeeTemplate(Allele.Stark.getGenome());
|
||||
|
||||
IClassification magical = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "thaumis", "Thaumis");
|
||||
magical.setParent(familyBee);
|
||||
|
||||
Allele.Air = new BeeSpecies("Aura", "\"They work so fast it's breathtaking.\"|Sengir, Mad Apiarist",
|
||||
"ventosa", magical, 0,
|
||||
0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Air.addProduct(ItemManager.combs.getStackForType(CombType.AIRY), 9);
|
||||
Allele.Air.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.QUICKSILVER.ordinal()), 2);
|
||||
Allele.Air.setGenome(BeeGenomeManager.getTemplateAir());
|
||||
breedingMgr.registerBeeTemplate(Allele.Air.getGenome());
|
||||
|
||||
Allele.Fire = new BeeSpecies("Ignis", "Caution: Contents of hive extremely hot.|Warning label on Azanor's apiary",
|
||||
"praefervidus", magical, 0,
|
||||
0xE50B0B, 0x95132F, EnumTemperature.HOT, EnumHumidity.ARID,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Fire.addProduct(ItemManager.combs.getStackForType(CombType.FIREY), 15);
|
||||
Allele.Fire.addSpecialty(new ItemStack(Item.blazePowder), 8);
|
||||
Allele.Fire.setGenome(BeeGenomeManager.getTemplateFire());
|
||||
breedingMgr.registerBeeTemplate(Allele.Fire.getGenome());
|
||||
|
||||
// Grab the Crystalline Pollen
|
||||
(forestryItem = ItemInterface.getItem("pollen")).setItemDamage(1);
|
||||
|
||||
Allele.Water = new BeeSpecies("Aqua", "\"I tried to breed them once, but that was a wash.\"|MysteriousAges, Apprentice Thaumaturge",
|
||||
"umidus", magical, 0,
|
||||
0x36CFD9, 0x1054A1, EnumTemperature.NORMAL, EnumHumidity.DAMP,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Water.addProduct(ItemManager.combs.getStackForType(CombType.WATERY), 20);
|
||||
Allele.Water.addSpecialty(new ItemStack(Block.ice), 1).addSpecialty(forestryItem, 5);
|
||||
Allele.Water.setGenome(BeeGenomeManager.getTemplateWater());
|
||||
breedingMgr.registerBeeTemplate(Allele.Water.getGenome());
|
||||
|
||||
Allele.Earth = new BeeSpecies("Solum", "\"You're really gonna dig these bees, but watch out - they bore quite easily.\"|MysteriousAges, Apprentice Comedian",
|
||||
"sordida", magical, 0,
|
||||
0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Earth.addProduct(ItemManager.combs.getStackForType(CombType.EARTHY), 30);
|
||||
Allele.Earth.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.AMBER.ordinal()), 6);
|
||||
Allele.Earth.setGenome(BeeGenomeManager.getTemplateEarth());
|
||||
breedingMgr.registerBeeTemplate(Allele.Earth.getGenome());
|
||||
|
||||
Allele.Infused = new BeeSpecies("Praecantatio", "Beekeeping is magic!|Apinomicon, Preface",
|
||||
"azanorius", magical, 0,
|
||||
0xaa32fc, 0x7A489E, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Infused.addProduct(ItemManager.combs.getStackForType(CombType.INFUSED), 20);
|
||||
Allele.Infused.setGenome(BeeGenomeManager.getTemplateInfused());
|
||||
breedingMgr.registerBeeTemplate(Allele.Infused.getGenome());
|
||||
|
||||
IClassification aware = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "patibilis", "Patibilis");
|
||||
aware.setParent(familyBee);
|
||||
|
||||
Allele.Aware = new BeeSpecies("Aware", "\"They can see into your soul!\"|Florastar, Expert Beekeeper",
|
||||
"sensibilis", aware, 0,
|
||||
0xb0092e9, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, false);
|
||||
Allele.Aware.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 18);
|
||||
Allele.Aware.setGenome(BeeGenomeManager.getTemplateAware());
|
||||
breedingMgr.registerBeeTemplate(Allele.Aware.getGenome());
|
||||
|
||||
Allele.Vis = new BeeSpecies("Vis", "\"They can feel changes in the aura, but are not yet able to affect it.\"|Azanor, research notes",
|
||||
"arcanus saecula", aware, 0,
|
||||
0x004c99, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, false);
|
||||
Allele.Vis.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 25);
|
||||
Allele.Vis.setGenome(BeeGenomeManager.getTemplateVis());
|
||||
breedingMgr.registerBeeTemplate(Allele.Vis.getGenome());
|
||||
|
||||
Allele.Pure = new BeeSpecies("Pure", "\"It's like a bee janitor!\"|MysteriousAges, Thaumaturge",
|
||||
"arcanus puritatem", aware, 0,
|
||||
0xb0092e9, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, false);
|
||||
Allele.Pure.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 20);
|
||||
Allele.Pure.setGenome(BeeGenomeManager.getTemplatePure());
|
||||
breedingMgr.registerBeeTemplate(Allele.Pure.getGenome());
|
||||
|
||||
Allele.Flux = new BeeSpecies("Flux", "\"I thought they would help clean up, but it only makes things worse!\"|Kreicus, Apprentice Thaumaturge",
|
||||
"arcanus labe", aware, 0,
|
||||
0x004c99, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, false);
|
||||
Allele.Flux.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 20);
|
||||
Allele.Flux.setGenome(BeeGenomeManager.getTemplateFlux());
|
||||
breedingMgr.registerBeeTemplate(Allele.Flux.getGenome());
|
||||
|
||||
Allele.Node = new BeeSpecies("Node", "Having undergone a freak mutation, these bees now attract magic to them.|Apinomicon",
|
||||
"conficiens", aware, 0,
|
||||
0xFFF266, 0xFF8CE9, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, false);
|
||||
Allele.Node.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 20);
|
||||
Allele.Node.setGenome(BeeGenomeManager.getTemplateNode());
|
||||
breedingMgr.registerBeeTemplate(Allele.Node.getGenome());
|
||||
|
||||
IClassification malevolent = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "malevolens", "Malevolens");
|
||||
malevolent.setParent(familyBee);
|
||||
|
||||
Allele.Skulking = new BeeSpecies("Skulking", "These bees have become xenophobic and bad-tempered. Use caution.|Apinomicon",
|
||||
"malevolens", malevolent, 0,
|
||||
0x524827, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Skulking.addProduct(ItemManager.combs.getStackForType(CombType.SKULKING), 10);
|
||||
Allele.Skulking.setGenome(BeeGenomeManager.getTemplateSkulking());
|
||||
breedingMgr.registerBeeTemplate(Allele.Skulking.getGenome());
|
||||
|
||||
Allele.Brainy = new BeeSpecies("Brainy", "Their combs may be fetid and foul-smelling, but their intelligence is well-developed.|Apinomicon",
|
||||
"cerebrum", malevolent, 0,
|
||||
0x83FF70, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Brainy.addProduct(ItemManager.combs.getStackForType(CombType.SKULKING), 10).addProduct(new ItemStack(Item.rottenFlesh), 6);
|
||||
Allele.Brainy.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.ZOMBIE_BRAIN.ordinal()), 2);
|
||||
Allele.Brainy.setGenome(BeeGenomeManager.getTemplateBrainy());
|
||||
breedingMgr.registerBeeTemplate(Allele.Brainy.getGenome());
|
||||
|
||||
// Grab the Silky Comb.
|
||||
(forestryItem = ItemInterface.getItem("beeComb")).setItemDamage(6);
|
||||
|
||||
Allele.Gossamer = new BeeSpecies("Gossamer", "As they work, they seem to fade out from light for brief moments.|Apinomicon",
|
||||
"perlucidus", malevolent, 0,
|
||||
0x183f66, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Gossamer.addProduct(forestryItem, 15);
|
||||
Allele.Gossamer.setGenome(BeeGenomeManager.getTemplateGossamer());
|
||||
breedingMgr.registerBeeTemplate(Allele.Gossamer.getGenome());
|
||||
|
||||
Allele.Wispy = new BeeSpecies("Wispy", "Their language is garbled and unintelligible. It is probable they are speaking to unnatural beings.|Apinomicon",
|
||||
"umbrabilis", malevolent, 0,
|
||||
0x9cb8d5, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, false);
|
||||
Allele.Wispy.addProduct(forestryItem, 22);
|
||||
// Get silk wisp
|
||||
(forestryItem = ItemInterface.getItem("craftingMaterial")).setItemDamage(2);
|
||||
Allele.Wispy.addSpecialty(forestryItem, 4);
|
||||
Allele.Wispy.setGenome(BeeGenomeManager.getTemplateWispy());
|
||||
breedingMgr.registerBeeTemplate(Allele.Wispy.getGenome());
|
||||
|
||||
Allele.Batty = new BeeSpecies("Batty", "They tend to attract bats to their hives through means unknown.|Apinomicon",
|
||||
"chiroptera", malevolent, 0,
|
||||
0x27350d, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, true);
|
||||
Allele.Batty.addProduct(ItemManager.combs.getStackForType(CombType.SKULKING), 10);
|
||||
Allele.Batty.addSpecialty(new ItemStack(Item.gunpowder), 4);
|
||||
Allele.Batty.setGenome(BeeGenomeManager.getTemplateBatty());
|
||||
breedingMgr.registerBeeTemplate(Allele.Batty.getGenome());
|
||||
|
||||
Allele.Ghastly = new BeeSpecies("Ghastly", "\"*sigh*... Really, Myst?\"|Taveria",
|
||||
"pallens", malevolent, 0,
|
||||
0xccccee, 0xbf877c, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
false, hideSpecies, true, false);
|
||||
Allele.Ghastly.addProduct(ItemManager.combs.getStackForType(CombType.SKULKING), 8);
|
||||
Allele.Ghastly.addSpecialty(new ItemStack(Item.ghastTear), 2);
|
||||
Allele.Ghastly.setGenome(BeeGenomeManager.getTemplateGhastly());
|
||||
breedingMgr.registerBeeTemplate(Allele.Ghastly.getGenome());
|
||||
}
|
||||
|
||||
private void setupBeeMutations()
|
||||
{
|
||||
// Mutations are registered with the BreedingManager in their constructor.
|
||||
|
||||
BeeMutation.Esoteric = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric, 10);
|
||||
BeeMutation.Esoteric1 = new BeeMutation(Allele.getBaseSpecies("Heroic"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric, 25);
|
||||
BeeMutation.Mysterious = new BeeMutation(Allele.Esoteric, Allele.getBaseSpecies("Ended"), Allele.Mysterious, 10);
|
||||
BeeMutation.Arcane = new BeeMutation(Allele.Esoteric, Allele.Mysterious, Allele.Arcane, 8)
|
||||
.setMoonPhaseBonus(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT, 1.5f);
|
||||
BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Diligent"), Allele.getBaseSpecies("Valiant"), Allele.Charmed, 20);
|
||||
BeeMutation.Enchanted = new BeeMutation(Allele.Charmed, Allele.getBaseSpecies("Valiant"), Allele.Enchanted, 8);
|
||||
BeeMutation.Supernatural = new BeeMutation(Allele.Charmed, Allele.Enchanted, Allele.Supernatural, 10)
|
||||
.setMoonPhaseBonus(MoonPhase.WAXING_GIBBOUS, MoonPhase.WANING_GIBBOUS, 1.5f);
|
||||
BeeMutation.Pupil = new BeeMutation(Allele.Arcane, Allele.Enchanted, Allele.Pupil, 10);
|
||||
BeeMutation.Scholarly = new BeeMutation(Allele.Pupil, Allele.Arcane, Allele.Scholarly, 8);
|
||||
BeeMutation.Savant = new BeeMutation(Allele.Pupil, Allele.Scholarly, Allele.Savant, 6);
|
||||
BeeMutation.Stark = new BeeMutation(Allele.Arcane, Allele.Supernatural, Allele.Stark, 8);
|
||||
|
||||
BeeMutation.Aware = new BeeMutation(Allele.getBaseSpecies("Demonic"), Allele.getBaseSpecies("Edenic"), Allele.Aware, 9);
|
||||
BeeMutation.Vis = new BeeMutation(Allele.Aware, Allele.Arcane, Allele.Vis, 7)
|
||||
.setAuraNodeRequired(15);
|
||||
|
||||
BeeMutation.Pure = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Pure, 5)
|
||||
.setAuraNodeTypeRequired(5, EnumNodeType.PURE).setMoonPhaseBonus(MoonPhase.NEW, MoonPhase.NEW, 1.6f);
|
||||
BeeMutation.Flux = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Flux, 5)
|
||||
.setAuraNodeTypeRequired(30, EnumNodeType.UNSTABLE).setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 1.6f);
|
||||
|
||||
BeeMutation.Node = new BeeMutation(Allele.Vis, Allele.Vis, Allele.Node, 2)
|
||||
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WANING_HALF, MoonPhase.WANING_HALF);
|
||||
BeeMutation.Node1 = new BeeMutation(Allele.Vis, Allele.Vis, Allele.Node, 2)
|
||||
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WAXING_HALF);
|
||||
|
||||
// Now we get into a little bit of branching...
|
||||
if (ThaumicBees.getInstanceConfig().ExtraBeesInstalled)
|
||||
{
|
||||
BeeMutation.Skulking = new BeeMutation(Allele.Mysterious, Allele.getExtraSpecies("desolate"), Allele.Skulking, 10);
|
||||
BeeMutation.Brainy = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("rotten"), Allele.Brainy, 12);
|
||||
BeeMutation.Gossamer = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("ancient"), Allele.Gossamer, 10);
|
||||
BeeMutation.Batty = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("rock"), Allele.Batty, 14);
|
||||
BeeMutation.Ghastly = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("creeper"), Allele.Ghastly, 13);
|
||||
}
|
||||
else
|
||||
{
|
||||
BeeMutation.Skulking = new BeeMutation(Allele.Mysterious, Allele.getBaseSpecies("Modest"), Allele.Skulking, 10);
|
||||
BeeMutation.Brainy = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Sinister"), Allele.Brainy, 10);
|
||||
BeeMutation.Gossamer = new BeeMutation(Allele.Skulking, Allele.Supernatural, Allele.Gossamer, 10);
|
||||
BeeMutation.Batty = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Frugal"), Allele.Batty, 11);
|
||||
BeeMutation.Ghastly = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Austere"), Allele.Ghastly, 13);
|
||||
}
|
||||
BeeMutation.Gossamer.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.WANING_CRESCENT);
|
||||
BeeMutation.Wispy = new BeeMutation(Allele.Gossamer, Allele.getBaseSpecies("Cultivated"), Allele.Wispy, 8);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
|
||||
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IAllele;
|
||||
|
||||
public class Allele implements IAllele
|
||||
{
|
||||
public static BeeSpecies Esoteric;
|
||||
public static BeeSpecies Mysterious;
|
||||
public static BeeSpecies Arcane;
|
||||
|
||||
public static BeeSpecies Charmed;
|
||||
public static BeeSpecies Enchanted;
|
||||
public static BeeSpecies Supernatural;
|
||||
|
||||
public static BeeSpecies Pupil;
|
||||
public static BeeSpecies Scholarly;
|
||||
public static BeeSpecies Savant;
|
||||
|
||||
public static BeeSpecies Stark;
|
||||
public static BeeSpecies Air;
|
||||
public static BeeSpecies Water;
|
||||
public static BeeSpecies Earth;
|
||||
public static BeeSpecies Fire;
|
||||
public static BeeSpecies Infused;
|
||||
|
||||
public static BeeSpecies Aware;
|
||||
public static BeeSpecies Vis;
|
||||
public static BeeSpecies Pure;
|
||||
public static BeeSpecies Flux;
|
||||
public static BeeSpecies Node;
|
||||
|
||||
public static BeeSpecies Skulking;
|
||||
public static BeeSpecies Brainy;
|
||||
public static BeeSpecies Gossamer;
|
||||
public static BeeSpecies Wispy;
|
||||
public static BeeSpecies Batty;
|
||||
public static BeeSpecies Ghastly;
|
||||
|
||||
public static AlleleInteger fertilityHighDominant;
|
||||
|
||||
public static AlleleFlower flowerBookshelf;
|
||||
public static AlleleFlower flowerThaumcraft;
|
||||
public static AlleleFlower flowerAuraNode;
|
||||
public static AlleleFlower flowerNodePurify;
|
||||
public static AlleleFlower flowerNodeFluxify;
|
||||
|
||||
public static AlleleEffectCure cleansingEffect;
|
||||
public static AlleleEffectPotion digSpeed;
|
||||
public static AlleleEffectPotion moveSpeed;
|
||||
public static AlleleEffectSpawnMob spawnBrainyZombie;
|
||||
public static AlleleEffectSpawnMob spawnWisp;
|
||||
public static AlleleEffectSpawnMob spawnBats;
|
||||
public static AlleleEffectSpawnMob spawnGhast;
|
||||
public static AlleleEffectAuraNodeGrow nodeGen;
|
||||
|
||||
private String uid;
|
||||
private boolean dominant;
|
||||
|
||||
public static IAlleleBeeSpecies getBaseSpecies(String name)
|
||||
{
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
|
||||
}
|
||||
|
||||
public static IAlleleBeeSpecies getExtraSpecies(String name)
|
||||
{
|
||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("extrabees.species.").append(name).toString());
|
||||
}
|
||||
|
||||
public static IAllele getBaseAllele(String name)
|
||||
{
|
||||
return AlleleManager.getAllele(name);
|
||||
}
|
||||
|
||||
public Allele(String id, boolean isDominant)
|
||||
{
|
||||
this.uid = "thaumicbees." + id;
|
||||
this.dominant = isDominant;
|
||||
AlleleManager.alleleRegistry.registerAllele(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUID()
|
||||
{
|
||||
return this.uid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDominant()
|
||||
{
|
||||
return this.dominant;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,74 +0,0 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumNodeType;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
|
||||
public class AlleleEffectAuraNodeGrow extends AlleleEffect
|
||||
{
|
||||
|
||||
private int throttle;
|
||||
|
||||
public AlleleEffectAuraNodeGrow(String id, String identifier, boolean isDominant, int timeout)
|
||||
{
|
||||
super(id, isDominant, identifier);
|
||||
this.throttle = 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 value = storedData.getInteger(0);
|
||||
if (value >= throttle)
|
||||
{
|
||||
World w = housing.getWorld();
|
||||
float x = housing.getXCoord();
|
||||
float y = housing.getYCoord();
|
||||
float z = housing.getZCoord();
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, 1800);
|
||||
if (nodeId != -1)
|
||||
{
|
||||
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||
x = (float)(x - node.xPos);
|
||||
y = (float)(y - node.yPos);
|
||||
z = (float)(z - node.zPos);
|
||||
|
||||
float distance = (float)Math.sqrt(x * x + y * y + z * z);
|
||||
x = x / distance;
|
||||
y = y / distance;
|
||||
z = z / distance;
|
||||
|
||||
x *= 0.02f;
|
||||
y *= 0.02f;
|
||||
z *= 0.02f;
|
||||
|
||||
ThaumcraftApi.queueNodeChanges(nodeId, 0, w.rand.nextInt(1), false, null, x, y, z);
|
||||
}
|
||||
storedData.setInteger(0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
storedData.setInteger(0, value + 1);
|
||||
}
|
||||
|
||||
return storedData;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,206 +0,0 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
|
||||
import forestry.api.apiculture.*;
|
||||
import forestry.api.genetics.IAllele;
|
||||
import forestry.api.genetics.IGenome;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import thaumcraft.api.AuraNode;
|
||||
import thaumcraft.api.EnumNodeType;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.bees.MoonPhase;
|
||||
|
||||
public class BeeMutation implements IBeeMutation
|
||||
{
|
||||
|
||||
public static BeeMutation Esoteric;
|
||||
public static BeeMutation Esoteric1;
|
||||
public static BeeMutation Mysterious;
|
||||
public static BeeMutation Mysterious1;
|
||||
public static BeeMutation Arcane;
|
||||
public static BeeMutation Charmed;
|
||||
public static BeeMutation Enchanted;
|
||||
public static BeeMutation Supernatural;
|
||||
public static BeeMutation Stark;
|
||||
public static BeeMutation Pupil;
|
||||
public static BeeMutation Scholarly;
|
||||
public static BeeMutation Savant;
|
||||
public static BeeMutation Aware;
|
||||
public static BeeMutation Vis;
|
||||
public static BeeMutation Pure;
|
||||
public static BeeMutation Flux;
|
||||
public static BeeMutation Node;
|
||||
public static BeeMutation Node1;
|
||||
public static BeeMutation Skulking;
|
||||
public static BeeMutation Brainy;
|
||||
public static BeeMutation Gossamer;
|
||||
public static BeeMutation Wispy;
|
||||
public static BeeMutation Batty;
|
||||
public static BeeMutation Ghastly;
|
||||
|
||||
private IAllele parent1;
|
||||
private IAllele parent2;
|
||||
private IAllele mutationTemplate[];
|
||||
private int baseChance;
|
||||
private boolean isSecret;
|
||||
|
||||
private boolean isMoonRestricted;
|
||||
private MoonPhase moonPhaseStart;
|
||||
private MoonPhase moonPhaseEnd;
|
||||
private float moonPhaseMutationBonus;
|
||||
private boolean nodeRequired;
|
||||
private EnumNodeType nodeType;
|
||||
private double nodeRange;
|
||||
|
||||
public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, BeeSpecies resultSpecies, int percentChance)
|
||||
{
|
||||
this.parent1 = species0;
|
||||
this.parent2 = species1;
|
||||
this.mutationTemplate = resultSpecies.getGenome();
|
||||
this.baseChance = percentChance;
|
||||
this.isSecret = false;
|
||||
this.isMoonRestricted = false;
|
||||
this.moonPhaseMutationBonus = -1f;
|
||||
this.nodeType = null;
|
||||
|
||||
BeeManager.breedingManager.registerBeeMutation(this);
|
||||
}
|
||||
|
||||
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
||||
{
|
||||
int finalChance = 0;
|
||||
float chance = this.baseChance * 1f;
|
||||
|
||||
if (this.arePartners(allele0, allele1))
|
||||
{
|
||||
// This mutation applies. Continue calculation.
|
||||
if (this.moonPhaseStart != null && this.moonPhaseEnd != null)
|
||||
{
|
||||
// Only occurs during the phases.
|
||||
if (this.isMoonRestricted && !MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd))
|
||||
{
|
||||
chance = 0;
|
||||
}
|
||||
else if (this.moonPhaseMutationBonus != -1f)
|
||||
{
|
||||
// There is a bonus to this mutation during moon phases...
|
||||
if (MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd))
|
||||
{
|
||||
chance = (int)(chance * this.moonPhaseMutationBonus);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.nodeRequired)
|
||||
{
|
||||
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(housing.getWorld(),
|
||||
housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), this.nodeRange);
|
||||
if (nodeId >= 0 && this.nodeType != null)
|
||||
{
|
||||
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||
if (node.type != this.nodeType)
|
||||
{
|
||||
chance = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
chance = 0;
|
||||
}
|
||||
}
|
||||
|
||||
finalChance = Math.round(chance
|
||||
* housing.getMutationModifier((IBeeGenome) genome0,
|
||||
(IBeeGenome) genome1)
|
||||
* BeeManager.breedingManager.getBeekeepingMode(housing.getWorld())
|
||||
.getMutationModifier((IBeeGenome) genome0,
|
||||
(IBeeGenome) genome1));
|
||||
}
|
||||
|
||||
return finalChance;
|
||||
}
|
||||
|
||||
public IAllele getAllele0()
|
||||
{
|
||||
return parent1;
|
||||
}
|
||||
|
||||
public IAllele getAllele1()
|
||||
{
|
||||
return parent2;
|
||||
}
|
||||
|
||||
public IAllele[] getTemplate()
|
||||
{
|
||||
return mutationTemplate;
|
||||
}
|
||||
|
||||
public int getBaseChance()
|
||||
{
|
||||
return baseChance;
|
||||
}
|
||||
|
||||
public boolean isPartner(IAllele allele)
|
||||
{
|
||||
return parent1.getUID().equals(allele.getUID()) || parent2.getUID().equals(allele.getUID());
|
||||
}
|
||||
|
||||
public IAllele getPartner(IAllele allele)
|
||||
{
|
||||
IAllele val = parent1;
|
||||
if (val.getUID().equals(allele.getUID()))
|
||||
val = parent2;
|
||||
return val;
|
||||
}
|
||||
|
||||
public boolean arePartners(IAllele alleleA, IAllele alleleB)
|
||||
{
|
||||
return (this.parent1.getUID().equals(alleleA.getUID())) && this.parent2.getUID().equals(alleleB.getUID()) ||
|
||||
this.parent1.getUID().equals(alleleB.getUID()) && this.parent2.getUID().equals(alleleA.getUID());
|
||||
}
|
||||
|
||||
public BeeMutation setSecret()
|
||||
{
|
||||
this.isSecret = true;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public boolean isSecret()
|
||||
{
|
||||
return isSecret;
|
||||
}
|
||||
|
||||
public BeeMutation setMoonPhaseRestricted(MoonPhase begin, MoonPhase end)
|
||||
{
|
||||
this.isMoonRestricted = true;
|
||||
this.moonPhaseStart = begin;
|
||||
this.moonPhaseEnd = end;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setMoonPhaseBonus(MoonPhase begin, MoonPhase end, float mutationBonus)
|
||||
{
|
||||
this.moonPhaseMutationBonus = mutationBonus;
|
||||
this.moonPhaseStart = begin;
|
||||
this.moonPhaseEnd = end;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setAuraNodeRequired(double range)
|
||||
{
|
||||
this.nodeRequired = true;
|
||||
this.nodeRange = range;
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeMutation setAuraNodeTypeRequired(double range, EnumNodeType type)
|
||||
{
|
||||
this.nodeType = type;
|
||||
|
||||
return this.setAuraNodeRequired(range);
|
||||
}
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
package thaumicbees.bees.genetics;
|
||||
|
||||
import forestry.api.apiculture.*;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.*;
|
||||
import java.util.HashMap;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.stats.Achievement;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class BeeSpecies extends Allele implements IAlleleBeeSpecies
|
||||
{
|
||||
private String name;
|
||||
private String descripton;
|
||||
private String binomial;
|
||||
private String authority;
|
||||
private int bodyType;
|
||||
private int primaryColour;
|
||||
private int secondaryColour;
|
||||
private EnumTemperature temperature;
|
||||
private EnumHumidity humidity;
|
||||
private boolean hasEffect;
|
||||
private boolean isSecret;
|
||||
private boolean isCounted;
|
||||
private IClassification branch;
|
||||
private HashMap products;
|
||||
private HashMap specialty;
|
||||
private IAllele genomeTemplate[];
|
||||
|
||||
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IClassification classification, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
|
||||
{
|
||||
this(speciesName, speciesDescription, genusName, classification, 0, firstColour, secondColour, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant);
|
||||
}
|
||||
|
||||
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IClassification classification, int body, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesSecret, boolean isSpeciesCounted, boolean isSpeciesDominant)
|
||||
{
|
||||
super("species" + speciesName, isSpeciesDominant);
|
||||
name = speciesName;
|
||||
descripton = speciesDescription;
|
||||
binomial = genusName;
|
||||
authority = "MysteriousAges";
|
||||
bodyType = body;
|
||||
primaryColour = firstColour;
|
||||
secondaryColour = secondColour;
|
||||
temperature = preferredTemp;
|
||||
humidity = preferredHumidity;
|
||||
hasEffect = hasGlowEffect;
|
||||
isSecret = isSpeciesSecret;
|
||||
isCounted = isSpeciesCounted;
|
||||
products = new HashMap();
|
||||
specialty = new HashMap();
|
||||
this.branch = classification;
|
||||
this.genomeTemplate = new IAllele[EnumBeeChromosome.values().length];
|
||||
}
|
||||
|
||||
public BeeSpecies setGene(EnumBeeChromosome chromosome, IAllele allele)
|
||||
{
|
||||
genomeTemplate[chromosome.ordinal()] = allele;
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeSpecies setGenome(IAllele genome[])
|
||||
{
|
||||
genomeTemplate = genome;
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAllele[] getGenome()
|
||||
{
|
||||
return genomeTemplate;
|
||||
}
|
||||
|
||||
public BeeSpecies addProduct(ItemStack produce, int percentChance)
|
||||
{
|
||||
products.put(produce, Integer.valueOf(percentChance));
|
||||
return this;
|
||||
}
|
||||
|
||||
public BeeSpecies addSpecialty(ItemStack produce, int percentChance)
|
||||
{
|
||||
specialty.put(produce, Integer.valueOf(percentChance));
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemStack getBeeItem(World world, EnumBeeType beeType)
|
||||
{
|
||||
return BeeManager.beeInterface.getBeeStack(BeeManager.beeInterface.getBee(world, BeeManager.beeInterface.templateAsGenome(genomeTemplate)), beeType);
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getDescription()
|
||||
{
|
||||
return descripton;
|
||||
}
|
||||
|
||||
public int getBodyType()
|
||||
{
|
||||
return bodyType;
|
||||
}
|
||||
|
||||
public int getPrimaryColor()
|
||||
{
|
||||
return primaryColour;
|
||||
}
|
||||
|
||||
public int getSecondaryColor()
|
||||
{
|
||||
return secondaryColour;
|
||||
}
|
||||
|
||||
public EnumTemperature getTemperature()
|
||||
{
|
||||
return temperature;
|
||||
}
|
||||
|
||||
public EnumHumidity getHumidity()
|
||||
{
|
||||
return humidity;
|
||||
}
|
||||
|
||||
public boolean hasEffect()
|
||||
{
|
||||
return hasEffect;
|
||||
}
|
||||
|
||||
public boolean isSecret()
|
||||
{
|
||||
return isSecret;
|
||||
}
|
||||
|
||||
public boolean isCounted()
|
||||
{
|
||||
return isCounted;
|
||||
}
|
||||
|
||||
public String getBinomial()
|
||||
{
|
||||
return binomial;
|
||||
}
|
||||
|
||||
public String getAuthority()
|
||||
{
|
||||
return authority;
|
||||
}
|
||||
|
||||
public IClassification getBranch()
|
||||
{
|
||||
return this.branch;
|
||||
}
|
||||
|
||||
public HashMap getProducts()
|
||||
{
|
||||
return products;
|
||||
}
|
||||
|
||||
public HashMap getSpecialty()
|
||||
{
|
||||
return specialty;
|
||||
}
|
||||
|
||||
public boolean isJubilant(World world, int biomeid, int x, int i, int j)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated Method getAchievement is deprecated
|
||||
*/
|
||||
|
||||
public Achievement getAchievement()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -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,24 +0,0 @@
|
||||
package thaumicbees.block;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
||||
public class BlockManager
|
||||
{
|
||||
public static Block tcPlant;
|
||||
public static Block tcCandle;
|
||||
public static Block tcCrystal;
|
||||
public static Block tcMarker;
|
||||
public static Block tcJar;
|
||||
public static Block tcLog;
|
||||
public static Block tcLeaf;
|
||||
public static Block tcWarded;
|
||||
|
||||
public BlockManager() { }
|
||||
|
||||
public static void setupBlocks(Configuration config)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -26,13 +26,14 @@ public class ItemCapsule extends Item
|
||||
{
|
||||
private CapsuleType capsuleType;
|
||||
|
||||
public ItemCapsule(CapsuleType type, int itemId)
|
||||
public ItemCapsule(CapsuleType type, int itemId, int maxStackSize)
|
||||
{
|
||||
super(itemId);
|
||||
this.capsuleType = type;
|
||||
this.setTextureFile(CommonProxy.TCBEES_LIQUIDS_IMAGE);
|
||||
this.setCreativeTab(Tabs.tabApiculture);
|
||||
this.setHasSubtypes(true);
|
||||
this.setMaxStackSize(maxStackSize);
|
||||
}
|
||||
|
||||
public CapsuleType getType()
|
||||
@@ -43,7 +44,7 @@ public class ItemCapsule extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack itemStack)
|
||||
{
|
||||
return LiquidType.values()[itemStack.getItemDamage()].displayName + " " + this.capsuleType.name;
|
||||
return LiquidType.values()[itemStack.getItemDamage()].getDisplayName() + " " + this.capsuleType.getName();
|
||||
}
|
||||
|
||||
public ItemStack getCapsuleForLiquid(LiquidType l)
|
||||
|
||||
@@ -89,13 +89,7 @@ public class ItemComb extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
String result = "";
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta >= 0 && meta < CombType.values().length)
|
||||
{
|
||||
result = CombType.values()[meta].name;
|
||||
}
|
||||
return result;
|
||||
return CombType.values()[stack.getItemDamage()].getName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -3,8 +3,10 @@ package thaumicbees.item;
|
||||
import java.util.List;
|
||||
|
||||
import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.PropolisType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
@@ -85,13 +87,7 @@ public class ItemDrop extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
String result = "";
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta >= 0 && meta < DropType.values().length)
|
||||
{
|
||||
result = DropType.values()[meta].name;
|
||||
}
|
||||
return result;
|
||||
return DropType.values()[stack.getItemDamage()].getName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,9 +9,11 @@ import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.item.types.HiveFrameType;
|
||||
import thaumicbees.item.types.LiquidType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
@@ -35,7 +37,7 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack itemStack)
|
||||
{
|
||||
return this.type.frameName;
|
||||
return this.type.getName();
|
||||
}
|
||||
|
||||
// --------- IHiveFrame functions -----------------------------------------
|
||||
@@ -43,10 +45,7 @@ public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
||||
@Override
|
||||
public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear)
|
||||
{
|
||||
this.doFluxEffect(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord());
|
||||
frame = this.doWear(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), frame, wear);
|
||||
|
||||
return frame;
|
||||
return this.doWear(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), frame, wear);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
int damage = wear;
|
||||
int fluxMod = 1;
|
||||
|
||||
if (this.type.auraPerUse > 0)
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
// Attempt to use aura for the frame.
|
||||
if (!ThaumcraftApi.decreaseClosestAura(w, x, y, z, this.type.auraPerUse, true))
|
||||
// This throttles back the amount of aura consumed by the frame by storing a smidge of data on the item stack.
|
||||
if (this.type.auraPerUse > 0)
|
||||
{
|
||||
// Insufficient aura, or no nearby node.
|
||||
damage = wear + this.type.auraPerUse;
|
||||
NBTTagCompound tag;
|
||||
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);
|
||||
|
||||
for (int i = 0; i < fluxMod; ++i)
|
||||
{
|
||||
this.doFluxEffect(w, x, y, z);
|
||||
}
|
||||
|
||||
if (frame.getItemDamage() >= frame.getMaxDamage())
|
||||
{
|
||||
// Break!
|
||||
// Break the frame.
|
||||
frame = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,377 +0,0 @@
|
||||
package thaumicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumicbees.item.types.CapsuleType;
|
||||
import thaumicbees.item.types.CombType;
|
||||
import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.HiveFrameType;
|
||||
import thaumicbees.item.types.LiquidType;
|
||||
import thaumicbees.item.types.PropolisType;
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
import thaumicbees.item.types.WaxType;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.storage.BackpackDefinition;
|
||||
import thaumicbees.thaumcraft.TCMiscResource;
|
||||
import thaumicbees.thaumcraft.TCShardType;
|
||||
import thaumicbees.thaumcraft.ThaumcraftCompat;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.liquids.LiquidContainerData;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.recipes.*;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
import forestry.api.storage.EnumBackpackType;
|
||||
|
||||
public class ItemManager
|
||||
{
|
||||
public static ItemComb combs;
|
||||
public static ItemWax wax;
|
||||
public static ItemPropolis propolis;
|
||||
public static ItemDrop drops;
|
||||
public static ItemPollen pollen;
|
||||
public static ItemSolidFlux solidFlux;
|
||||
public static ItemMiscResources miscResources;
|
||||
|
||||
//----- Liquid Capsules --------------------
|
||||
public static ItemCapsule magicCapsule;
|
||||
|
||||
//----- Apiary Frames ----------------------
|
||||
public static ItemMagicHiveFrame hiveFrameMagic;
|
||||
public static ItemMagicHiveFrame hiveFrameResilient;
|
||||
public static ItemMagicHiveFrame hiveFrameGentle;
|
||||
public static ItemMagicHiveFrame hiveFrameMetabolic;
|
||||
public static ItemMagicHiveFrame hiveFrameNecrotic;
|
||||
|
||||
//----- Thaumcraft Items -------------------
|
||||
public static Item tcFilledJar;
|
||||
public static Item tcMiscResource;
|
||||
public static Item tcEssentiaBottle;
|
||||
public static Item tcShard;
|
||||
public static Item tcGolem;
|
||||
public static Item tcWispEssence;
|
||||
|
||||
//----- Backpacks --------------------------
|
||||
public static Item thaumaturgeBackpackT1;
|
||||
public static Item thaumaturgeBackpackT2;
|
||||
|
||||
public static BackpackDefinition thaumaturgeBackpackDef;
|
||||
|
||||
public ItemManager() { }
|
||||
|
||||
public static void setupItems(Configuration configFile)
|
||||
{
|
||||
int itemIDBase = 26090;
|
||||
|
||||
Property p = configFile.getItem("combs", itemIDBase++);
|
||||
ItemManager.combs= new ItemComb(p.getInt());
|
||||
ItemManager.wax = new ItemWax(configFile.getItem("wax", itemIDBase++).getInt());
|
||||
ItemManager.propolis = new ItemPropolis(configFile.getItem("propolis", itemIDBase++).getInt());
|
||||
ItemManager.drops = new ItemDrop(configFile.getItem("drop", itemIDBase++).getInt());
|
||||
ItemManager.miscResources = new ItemMiscResources(configFile.getItem("miscResources", itemIDBase++).getInt());
|
||||
|
||||
try
|
||||
{
|
||||
// 0x8700C6 = purpleish.
|
||||
BackpackDefinition def = new BackpackDefinition("thaumaturge", "Thaumaturge's Backpack", 0x8700C6);
|
||||
ItemManager.thaumaturgeBackpackT1 =
|
||||
BackpackManager.backpackInterface.addBackpack(configFile.getItem("thaumaturgePack1", itemIDBase++).getInt(),
|
||||
def, EnumBackpackType.T1);
|
||||
ItemManager.thaumaturgeBackpackT2 =
|
||||
BackpackManager.backpackInterface.addBackpack(configFile.getItem("thaumaturgePack2", itemIDBase++).getInt(),
|
||||
def, EnumBackpackType.T2);
|
||||
// Add additional items from configs to backpack.
|
||||
if (ThaumicBees.getInstanceConfig().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.getInstanceConfig().ThaumaturgeExtraItems);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.severe("ThaumicBees encountered a problem during loading!");
|
||||
throw new RuntimeException("Could not register backpacks via Forestry. Did it fail to load?", e);
|
||||
}
|
||||
|
||||
|
||||
ItemManager.magicCapsule = new ItemCapsule(CapsuleType.MAGIC, configFile.getItem("magicCapsule", itemIDBase++).getInt());
|
||||
|
||||
ItemManager.pollen = new ItemPollen(configFile.getItem("pollen", itemIDBase++).getInt());
|
||||
ItemManager.solidFlux = new ItemSolidFlux(configFile.getItem("fluxCrystal", itemIDBase++).getInt());
|
||||
|
||||
ItemManager.hiveFrameMagic = new ItemMagicHiveFrame(configFile.getItem("frameMagic", itemIDBase++).getInt(), HiveFrameType.MAGIC);
|
||||
ItemManager.hiveFrameResilient = new ItemMagicHiveFrame(configFile.getItem("frameResilient", itemIDBase++).getInt(), HiveFrameType.RESILIENT);
|
||||
ItemManager.hiveFrameGentle = new ItemMagicHiveFrame(configFile.getItem("frameGentle", itemIDBase++).getInt(), HiveFrameType.GENTLE);
|
||||
ItemManager.hiveFrameMetabolic = new ItemMagicHiveFrame(configFile.getItem("frameMetabolic", itemIDBase++).getInt(), HiveFrameType.METABOLIC);
|
||||
ItemManager.hiveFrameNecrotic = new ItemMagicHiveFrame(configFile.getItem("frameNecrotic", itemIDBase++).getInt(), HiveFrameType.NECROTIC);
|
||||
// Future frames, so they all are clumped together.
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
|
||||
// New items here.
|
||||
|
||||
}
|
||||
|
||||
public static void setupCrafting()
|
||||
{
|
||||
ItemStack inputStack; // Variable to hold forestry items
|
||||
|
||||
// Essentia bottles
|
||||
ItemStack output = new ItemStack(tcEssentiaBottle);
|
||||
output.stackSize = 8;
|
||||
GameRegistry.addRecipe(output, new Object[]
|
||||
{
|
||||
" C ", "GPG", "PGP",
|
||||
'G', ItemManager.wax,
|
||||
'C', Item.clay,
|
||||
'P', Block.thinGlass
|
||||
});
|
||||
|
||||
output = new ItemStack(tcEssentiaBottle);
|
||||
output.stackSize = 4;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
" W ", "W W", " W ",
|
||||
'W', ItemManager.wax
|
||||
});
|
||||
|
||||
// Magic capsules
|
||||
output = new ItemStack(magicCapsule); output.stackSize = 4;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"WWW",
|
||||
'W', ItemManager.wax.getStackForType(WaxType.MAGIC)
|
||||
});
|
||||
|
||||
output = new ItemStack(tcMiscResource, 1, TCMiscResource.KNOWLEDGE_FRAGMENT.ordinal());
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"FF", "FF",
|
||||
'F', ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT)
|
||||
});
|
||||
|
||||
// T1 Thaumaturge's backpack
|
||||
GameRegistry.addRecipe(new ItemStack(ItemManager.thaumaturgeBackpackT1), new Object[] {
|
||||
"SWS", "NCN", "SWS",
|
||||
'S', Item.silk,
|
||||
'W', Block.cloth,
|
||||
'N', Item.goldNugget,
|
||||
'C', Block.chest
|
||||
});
|
||||
|
||||
// Concentrated Fertilizer -> Forestry fertilizer
|
||||
inputStack = ItemManager.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
|
||||
output = ItemInterface.getItem("fertilizerCompound");
|
||||
output.stackSize = 6;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
" S ", " F ", " S ",
|
||||
'F', inputStack,
|
||||
'S', Block.sand
|
||||
});
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
" ", "SFS", " ",
|
||||
'F', inputStack,
|
||||
'S', Block.sand
|
||||
});
|
||||
|
||||
output = output.copy();
|
||||
output.stackSize = 12;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"aaa", "aFa", "aaa",
|
||||
'F', inputStack,
|
||||
'a', ItemInterface.getItem("ash")
|
||||
});
|
||||
|
||||
// "bottling" Intellect drops
|
||||
GameRegistry.addRecipe(new ItemStack(Item.expBottle), new Object[] {
|
||||
"DDD", "DBD", "DDD",
|
||||
'D', ItemManager.drops.getStackForType(DropType.INTELLECT),
|
||||
'B', Item.glassBottle
|
||||
});
|
||||
|
||||
// "bottling" Crystal aspects.
|
||||
for (EnumTag tag : EnumTag.values())
|
||||
{
|
||||
if (tag != EnumTag.UNKNOWN)
|
||||
{
|
||||
output = new ItemStack(ItemManager.tcEssentiaBottle, 1, tag.id + 1);
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"ccc", "cxc", "ccc",
|
||||
'c', new ItemStack(ItemManager.solidFlux, 1, tag.id),
|
||||
'x', ItemManager.tcEssentiaBottle
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// 20 is the 'average' time to centrifuge a comb.
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OCCULT),
|
||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||
new int[] { 100, 60 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OTHERWORLDLY),
|
||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||
new int[] { 50, 20, 100 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.PAPERY),
|
||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
|
||||
new int[] { 80, 20, 5 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.STARK),
|
||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.STARK) },
|
||||
new int[] { 10, 95, 15 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.AIRY),
|
||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.AIR) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.FIREY),
|
||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.WATERY),
|
||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.WATER)},
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.EARTHY),
|
||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.EARTH) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.INFUSED),
|
||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.INFUSED) },
|
||||
new int[] { 100, 50, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.INTELLECT),
|
||||
new ItemStack[] { ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeydew"), ItemManager.drops.getStackForType(DropType.INTELLECT) },
|
||||
new int[] { 90, 40, 2 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.SKULKING),
|
||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemInterface.getItem("propolis"), ItemInterface.getItem("honeydew") },
|
||||
new int[] { 90, 20, 35 });
|
||||
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.STARK),
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.DULL.ordinal())},
|
||||
new int[] { 13 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.AIR),
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.AIR.ordinal())},
|
||||
new int[] { 10 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.FIRE),
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.FIRE.ordinal())},
|
||||
new int[] { 10 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.WATER),
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.WATER.ordinal())},
|
||||
new int[] { 10 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.EARTH),
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.EARTH.ordinal())},
|
||||
new int[] { 10 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.INFUSED),
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.MAGIC.ordinal())},
|
||||
new int[] { 10 });
|
||||
|
||||
// Squeezer recipes
|
||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
||||
new LiquidStack(Block.lavaStill, 250),
|
||||
new ItemStack(tcShard, 1, TCShardType.FIRE.ordinal()), 18);
|
||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.WATER) },
|
||||
new LiquidStack(Block.waterStill, 500),
|
||||
new ItemStack(tcShard, 1, TCShardType.WATER.ordinal()), 18);
|
||||
|
||||
// Carpenter recipes
|
||||
inputStack = ItemInterface.getItem("craftingMaterial");
|
||||
inputStack.setItemDamage(3); // Set to Silk Mesh
|
||||
output = new ItemStack(thaumaturgeBackpackT2);
|
||||
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(ItemManager.thaumaturgeBackpackT1)
|
||||
});
|
||||
|
||||
output = BlockInterface.getBlock("candle");
|
||||
output.stackSize = 24;
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||
" S ", "WWW", "WWW",
|
||||
'W', ItemManager.wax,
|
||||
'S', Item.silk
|
||||
});
|
||||
|
||||
output = BlockInterface.getBlock("candle");
|
||||
output.stackSize = 6;
|
||||
inputStack = ItemInterface.getItem("craftingMaterial");
|
||||
inputStack.setItemDamage(2); // Set to Silk Wisp
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||
"WSW",
|
||||
'W', ItemManager.wax,
|
||||
'S', inputStack
|
||||
});
|
||||
|
||||
output = ItemManager.miscResources.getStackForType(ResourceType.AROMATIC_LUMP, 2);
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||
" P ", "JDJ", " P ",
|
||||
'P', ItemInterface.getItem("pollen"),
|
||||
'J', ItemInterface.getItem("royalJelly"),
|
||||
'D', ItemManager.drops.getStackForType(DropType.ENCHANTED)
|
||||
});
|
||||
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||
" J ", "PDP", " J ",
|
||||
'P', ItemInterface.getItem("pollen"),
|
||||
'J', ItemInterface.getItem("royalJelly"),
|
||||
'D', ItemManager.drops.getStackForType(DropType.ENCHANTED)
|
||||
});
|
||||
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
|
||||
BeeManager.inducers.put(output, 80);
|
||||
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
registerLiquidContainer(ItemManager.magicCapsule);
|
||||
}
|
||||
|
||||
private static void registerLiquidContainer(ItemCapsule baseCapsule)
|
||||
{
|
||||
// Forestry liquids aren't registered until PostInit, that's why we wait until now to register them.
|
||||
ItemStack empty = new ItemStack(baseCapsule, 1, 0);
|
||||
ItemStack filled;
|
||||
LiquidStack liquid = null;
|
||||
|
||||
for (LiquidType l : LiquidType.values())
|
||||
{
|
||||
switch (l)
|
||||
{
|
||||
case EMPTY:
|
||||
liquid = null;
|
||||
break;
|
||||
case WATER:
|
||||
liquid = new LiquidStack(Block.waterStill, baseCapsule.getType().capacity);
|
||||
break;
|
||||
case LAVA:
|
||||
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
|
||||
break;
|
||||
default:
|
||||
liquid = LiquidDictionary.getLiquid(l.liquidID, baseCapsule.getType().capacity);
|
||||
break;
|
||||
}
|
||||
|
||||
if (liquid != null)
|
||||
{
|
||||
filled = new ItemStack(baseCapsule, 1, l.ordinal());
|
||||
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
||||
|
||||
// Register with Squeezer/Bottler
|
||||
RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled);
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] {filled} , liquid,
|
||||
ItemManager.wax.getStackForType(WaxType.MAGIC), 20);
|
||||
l.available = true;
|
||||
}
|
||||
}
|
||||
// Empty will be set to unavailable. Obviously, it always is.
|
||||
LiquidType.EMPTY.available = true;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -59,13 +59,7 @@ public class ItemMiscResources extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
String result = "";
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta >= 0 && meta < ResourceType.values().length)
|
||||
{
|
||||
result = ResourceType.values()[meta].name;
|
||||
}
|
||||
return result;
|
||||
return ResourceType.values()[stack.getItemDamage()].getName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -80,17 +80,11 @@ public class ItemPollen extends Item
|
||||
|
||||
return colour;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
String result = "";
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta >= 0 && meta < PollenType.values().length)
|
||||
{
|
||||
result = PollenType.values()[meta].name;
|
||||
}
|
||||
return result;
|
||||
return PollenType.values()[stack.getItemDamage()].getName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -57,13 +57,7 @@ public class ItemPropolis extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
String result = "";
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta >= 0 && meta < PropolisType.values().length)
|
||||
{
|
||||
result = PropolisType.values()[meta].name;
|
||||
}
|
||||
return result;
|
||||
return PropolisType.values()[stack.getItemDamage()].getName();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2,11 +2,13 @@ package thaumicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.Tabs;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -32,7 +34,6 @@ public class ItemSolidFlux extends Item
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
list.add(new ItemStack(this.itemID, 1, tag.id));
|
||||
}
|
||||
}
|
||||
@@ -40,7 +41,7 @@ public class ItemSolidFlux extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
return "Crystalized " + EnumTag.get(stack.getItemDamage()).name + " Aspect";
|
||||
return String.format(LocalizationManager.getLocalizedString("tb.resource.crystalFlux"), EnumTag.get(stack.getItemDamage()).name);
|
||||
}
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -70,12 +70,6 @@ public class ItemWax extends Item
|
||||
@Override
|
||||
public String getItemDisplayName(ItemStack stack)
|
||||
{
|
||||
String result = "";
|
||||
int meta = stack.getItemDamage();
|
||||
if (meta >= 0 && meta < WaxType.values().length)
|
||||
{
|
||||
result = WaxType.values()[meta].name;
|
||||
}
|
||||
return result;
|
||||
return WaxType.values()[stack.getItemDamage()].getName();
|
||||
}
|
||||
}
|
||||
@@ -1,10 +1,14 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum CapsuleType
|
||||
{
|
||||
MAGIC("Magic Capsule", 2000, 0),
|
||||
MAGIC("magic", 2000, 0),
|
||||
VOID("void", 8000, 1),
|
||||
;
|
||||
public String name;
|
||||
private String name;
|
||||
public int capacity;
|
||||
public int iconIdx;
|
||||
|
||||
@@ -14,4 +18,9 @@ public enum CapsuleType
|
||||
this.capacity = c;
|
||||
this.iconIdx = idx;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.capsule." + name);
|
||||
}
|
||||
}
|
||||
@@ -1,18 +1,22 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum CombType
|
||||
{
|
||||
OCCULT("Occult Comb", 0x6e1c6d, 0xff8fff, true),
|
||||
OTHERWORLDLY("Otherworldy Comb", 0x000056, 0x765cc1, true),
|
||||
PAPERY("Papery Comb", 0x503900, 0xbd9a30, true),
|
||||
STARK("Stark Comb", 0xB0B0BC, 0x6e6e79, false),
|
||||
AIRY("Airy Comb", 0xffff7e, 0x717600, false),
|
||||
FIREY("Firey Comb", 0xff3C01, 0x740002, false),
|
||||
WATERY("Watery Comb", 0x0090ff, 0x00308c, false),
|
||||
EARTHY("Earthy Comb", 0x00a000, 0x005100, false),
|
||||
INFUSED("Infused Comb", 0xaa32fc, 0x7A489E, false),
|
||||
INTELLECT("Memory Comb", 0x618fff, 0xb0092e9, false),
|
||||
SKULKING("Furtive Comb", 0x545454, 0xcda6cd, true),
|
||||
OCCULT("occult", 0x6e1c6d, 0xff8fff, true),
|
||||
OTHERWORLDLY("otherworldly", 0x000056, 0x765cc1, true),
|
||||
PAPERY("paper", 0x503900, 0xbd9a30, true),
|
||||
STARK("stark", 0xB0B0BC, 0x6e6e79, false),
|
||||
AIRY("air", 0xffff7e, 0x717600, false),
|
||||
FIREY("fire", 0xff3C01, 0x740002, false),
|
||||
WATERY("water", 0x0090ff, 0x00308c, false),
|
||||
EARTHY("earth", 0x00a000, 0x005100, false),
|
||||
INFUSED("magic", 0xaa32fc, 0x7A489E, false),
|
||||
INTELLECT("aware", 0x618fff, 0xb0092e9, false),
|
||||
SKULKING("furtive", 0x545454, 0xcda6cd, true),
|
||||
SOUL("soul", 0x3C1E00, 0x8A4500, true),
|
||||
;
|
||||
|
||||
private CombType(String pName, int colourA, int colourB, boolean show)
|
||||
@@ -25,7 +29,12 @@ public enum CombType
|
||||
this.showInList = show;
|
||||
}
|
||||
|
||||
public final String name;
|
||||
private String name;
|
||||
public int[] combColour;
|
||||
public boolean showInList;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.comb." + this.name);
|
||||
}
|
||||
}
|
||||
@@ -1,9 +1,12 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum DropType
|
||||
{
|
||||
ENCHANTED("Enchanting Drop", 0x6e1c6d, 0xff8fff),
|
||||
INTELLECT("Intellect Drop", 0x25914D, 0x18E072),
|
||||
ENCHANTED("enchanting", 0x6e1c6d, 0xff8fff),
|
||||
INTELLECT("intellect", 0x25914D, 0x18E072),
|
||||
;
|
||||
|
||||
private DropType(String pName, int colourA, int colourB)
|
||||
@@ -13,6 +16,11 @@ public enum DropType
|
||||
this.combColour[1] = colourB;
|
||||
}
|
||||
|
||||
public final String name;
|
||||
private final String name;
|
||||
public int[] combColour = new int[2];
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.drop." + this.name);
|
||||
}
|
||||
}
|
||||
@@ -1,33 +1,39 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
|
||||
public enum HiveFrameType
|
||||
{
|
||||
MAGIC("Magic Frame", 32, 240, 1f, 1f, 1f, 2f, 2,
|
||||
MAGIC("magic", 32, 240, 1f, 1f, 1f, 2f, 2, 5,
|
||||
null),
|
||||
RESILIENT("Resilient Frame", 33, 840, 1f, 1f, 1f, 2f, 2,
|
||||
RESILIENT("resillient", 33, 840, 1f, 1f, 1f, 2f, 2, 5,
|
||||
new ObjectTags().add(EnumTag.ARMOR, 1)),
|
||||
GENTLE("Gentle Frame", 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)),
|
||||
METABOLIC("Metabolic Frame", 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)),
|
||||
NECROTIC("Necrotic Frame", 36, 270, 1f, 1f, 0.4f, 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)),
|
||||
TEMPORAL("temporal", 37, 300, 1f, 1f, 2.5f, 1f, 1, 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,
|
||||
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,
|
||||
float territory, float mutation, float lifespan, float production, float flowering,
|
||||
boolean sealed, boolean lit, boolean sunlit, boolean hellish,
|
||||
int auraUse, ObjectTags fluxTags)
|
||||
int auraUse, int wearTicks, ObjectTags fluxTags)
|
||||
{
|
||||
this.frameName = name;
|
||||
this.iconIdx = icon;
|
||||
@@ -45,9 +51,10 @@ public enum HiveFrameType
|
||||
|
||||
this.auraPerUse = auraUse;
|
||||
this.flux = fluxTags;
|
||||
this.wearTicksPerAura = wearTicks;
|
||||
}
|
||||
|
||||
public String frameName;
|
||||
private String frameName;
|
||||
public int iconIdx;
|
||||
public int maxDamage;
|
||||
|
||||
@@ -63,4 +70,10 @@ public enum HiveFrameType
|
||||
|
||||
public ObjectTags flux;
|
||||
public int auraPerUse;
|
||||
public int wearTicksPerAura;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.frame." + this.frameName);
|
||||
}
|
||||
}
|
||||
@@ -1,50 +1,57 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
|
||||
public enum LiquidType
|
||||
{
|
||||
// Incidentally, Item meta is the liquid ID.
|
||||
|
||||
// Args are: forgeLiquidID, Display Name, Icon idx
|
||||
EMPTY("", "Empty", 16),
|
||||
EMPTY("", 16),
|
||||
|
||||
// Vanilla
|
||||
WATER("water", "Water", 17),
|
||||
LAVA("lava", "Lava", 18),
|
||||
WATER("water", 17),
|
||||
LAVA("lava", 18),
|
||||
|
||||
// Forestry
|
||||
BIOMASS("biomass", "Biomass", 19),
|
||||
BIOFUEL("biofuel", "Biofuel", 20),
|
||||
BIOMASS("biomass", 19),
|
||||
BIOFUEL("biofuel", 20),
|
||||
|
||||
// Buildcraft
|
||||
OIL("Oil", "Oil", 21),
|
||||
FUEL("Fuel", "Fuel", 22),
|
||||
OIL("Oil", 21),
|
||||
FUEL("Fuel", 22),
|
||||
|
||||
// More Forestry
|
||||
SEEDOIL("seedoil", "Seed Oil", 23),
|
||||
HONEY("honey", "Honey", 24),
|
||||
JUICE("juice", "Juice", 25),
|
||||
CRUSHEDICE("ice", "Crushed Ice", 26),
|
||||
MILK("milk", "Milk", 27),
|
||||
SEEDOIL("seedoil", 23),
|
||||
HONEY("honey", 24),
|
||||
JUICE("juice", 25),
|
||||
CRUSHEDICE("ice", 26),
|
||||
MILK("milk", 27),
|
||||
|
||||
// ExtraBees liquids
|
||||
ACID("acid", "Acid", 28),
|
||||
POISON("poison", "Poison", 29),
|
||||
LIQUIDNITROGEN("liquidNitrogen", "Liquid Nitrogen", 30),
|
||||
DNA("liquidDNA", "Liquid DNA", 31),
|
||||
ACID("acid", 28),
|
||||
POISON("poison", 29),
|
||||
LIQUIDNITROGEN("liquidNitrogen", 30),
|
||||
DNA("liquidDNA", 31),
|
||||
|
||||
// Railcraft
|
||||
CREOSOTEOIL("Creosote Oil", "Creosote Oil", 32),
|
||||
STEAM("Steam", "Steam", 33),
|
||||
CREOSOTEOIL("Creosote Oil", 32),
|
||||
STEAM("Steam", 33),
|
||||
;
|
||||
public String liquidID;
|
||||
public String displayName;
|
||||
public int iconIdx;
|
||||
public boolean available = false;
|
||||
|
||||
private LiquidType(String l, String display, int idx)
|
||||
private LiquidType(String l, int idx)
|
||||
{
|
||||
this.liquidID = l;
|
||||
this.displayName = display;
|
||||
this.iconIdx = idx;
|
||||
}
|
||||
|
||||
public String getDisplayName()
|
||||
{
|
||||
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,8 +1,12 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum PollenType
|
||||
{
|
||||
UNUSUAL("Unusual Pollen", 0xA03059, 0xD8417B),
|
||||
UNUSUAL("unusual", 0xA03059, 0xD8417B),
|
||||
PHASED("phased", 0x456BA5, 0x4974B4),
|
||||
;
|
||||
|
||||
private PollenType(String pName, int colourA, int colourB)
|
||||
@@ -12,6 +16,11 @@ public enum PollenType
|
||||
this.combColour[1] = colourB;
|
||||
}
|
||||
|
||||
public final String name;
|
||||
private String name;
|
||||
public int[] combColour = new int[2];
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.pollen." + this.name);
|
||||
}
|
||||
}
|
||||
@@ -1,13 +1,16 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum PropolisType
|
||||
{
|
||||
STARK("Dull Propolis", 0xBBBBBB),
|
||||
AIR("Air Propolis", 0xA19E10),
|
||||
FIRE("Firey Propolis", 0x95132F),
|
||||
WATER("Watery Propolis", 0x1054A1),
|
||||
EARTH("Earthen Propolis", 0x00a000),
|
||||
INFUSED("Infused Propolis", 0xaa32fc),
|
||||
STARK("dull", 0xBBBBBB),
|
||||
AIR("air", 0xA19E10),
|
||||
FIRE("fire", 0x95132F),
|
||||
WATER("water", 0x1054A1),
|
||||
EARTH("earth", 0x00a000),
|
||||
INFUSED("magic", 0xaa32fc),
|
||||
;
|
||||
|
||||
private PropolisType(String pName, int overlayColour)
|
||||
@@ -16,6 +19,11 @@ public enum PropolisType
|
||||
this.colour = overlayColour;
|
||||
}
|
||||
|
||||
public String name;
|
||||
private String name;
|
||||
public int colour;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.propolis." + this.name);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,16 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum ResourceType
|
||||
{
|
||||
LORE_FRAGMENT("Lore Fragment", 2, true),
|
||||
AROMATIC_LUMP("Aromatic Lump", 3, true),
|
||||
EXTENDED_FERTILIZER("Concentrated Compound", 4, true),
|
||||
LORE_FRAGMENT("fragment", 2, true),
|
||||
AROMATIC_LUMP("lump", 3, true),
|
||||
EXTENDED_FERTILIZER("fertilizer", 4, true),
|
||||
|
||||
// Dummy items for Thaumanomicon research icons.
|
||||
// These won't ever actually exist in-game, and so
|
||||
RESEARCH_StartNode("Start Node", 241, false),
|
||||
RESEARCH_BeeInfusion("Bee Infusion", 240, false),
|
||||
;
|
||||
@@ -17,7 +21,12 @@ public enum ResourceType
|
||||
this.iconIdx = i;
|
||||
this.showInList = show;
|
||||
}
|
||||
public String name;
|
||||
private String name;
|
||||
public int iconIdx;
|
||||
public boolean showInList;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.resource." + this.name);
|
||||
}
|
||||
}
|
||||
@@ -1,8 +1,12 @@
|
||||
package thaumicbees.item.types;
|
||||
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public enum WaxType
|
||||
{
|
||||
MAGIC("Magic Wax", false, 0xd242df),
|
||||
MAGIC("magic", false, 0xd242df),
|
||||
SOUL("soul", true, 0x8A4500),
|
||||
;
|
||||
|
||||
private WaxType(String n, boolean sp, int c)
|
||||
@@ -12,7 +16,12 @@ public enum WaxType
|
||||
this.colour = c;
|
||||
}
|
||||
|
||||
public String name;
|
||||
private String name;
|
||||
public boolean sparkly;
|
||||
public int colour;
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.wax." + this.name);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import thaumicbees.main.render.BeeRenderEffect;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
@@ -18,13 +20,27 @@ public class ClientProxy extends CommonProxy
|
||||
// Preload the TCBees items file
|
||||
MinecraftForgeClient.preloadTexture(TCBEES_ITEMS_IMAGE);
|
||||
MinecraftForgeClient.preloadTexture(TCBEES_LIQUIDS_IMAGE);
|
||||
|
||||
Field f;
|
||||
try
|
||||
{
|
||||
f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
|
||||
ThaumicBees.getConfig().DrawParticleEffects = f.getBoolean(null);
|
||||
|
||||
f = Class.forName("forestry.core.config.Defaults").getField("TEXTURE_PARTICLES_BEE");
|
||||
thaumicbees.main.CommonProxy.FORESTRY_GFX_BEEEFFECTS = (String)f.get(null);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawBeeEffects(World world, double xPos, double yPos, double zPos, int colour, int rangeX, int rangeY, int rangeZ)
|
||||
{
|
||||
// drawParticleEffects flag pulled from Forestry after configs
|
||||
if (ThaumicBees.getInstanceConfig().DrawParticleEffects)
|
||||
if (ThaumicBees.getConfig().DrawParticleEffects)
|
||||
{
|
||||
double spawnX;
|
||||
double spawnY;
|
||||
|
||||
@@ -8,6 +8,7 @@ public class CommonProxy
|
||||
{
|
||||
public static final String TCBEES_GFX = "/gfx/thaumicbees/";
|
||||
public static final String TCBEES_RESEARCH = "/research/thaumicbees/";
|
||||
public static final String TCBEES_LOCDIR = "/lang/thaumicbees/";
|
||||
public static final String TCBEES_ITEM_GFX = TCBEES_GFX + "items/";
|
||||
|
||||
public static String FORESTRY_GFX_ITEMS;
|
||||
|
||||
@@ -0,0 +1,342 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import thaumicbees.block.BlockPlanks;
|
||||
import thaumicbees.block.BlockWoodSlab;
|
||||
import thaumicbees.item.ItemCapsule;
|
||||
import thaumicbees.item.ItemComb;
|
||||
import thaumicbees.item.ItemDrop;
|
||||
import thaumicbees.item.ItemMagicHiveFrame;
|
||||
import thaumicbees.item.ItemMiscResources;
|
||||
import thaumicbees.item.ItemNugget;
|
||||
import thaumicbees.item.ItemPollen;
|
||||
import thaumicbees.item.ItemPropolis;
|
||||
import thaumicbees.item.ItemThaumiumGrafter;
|
||||
import thaumicbees.item.ItemThaumiumScoop;
|
||||
import thaumicbees.item.ItemSolidFlux;
|
||||
import thaumicbees.item.ItemWax;
|
||||
import thaumicbees.item.types.CapsuleType;
|
||||
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 cpw.mods.fml.common.FMLLog;
|
||||
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.BeeManager;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
import forestry.api.storage.EnumBackpackType;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockLog;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemFood;
|
||||
import net.minecraft.item.ItemMultiTextureTile;
|
||||
import net.minecraft.item.ItemSlab;
|
||||
import net.minecraft.item.ItemStack;
|
||||
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.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
||||
/**
|
||||
* A class to hold some data related to mod state & functions.
|
||||
* @author MysteriousAges
|
||||
*
|
||||
*/
|
||||
public class Config
|
||||
{
|
||||
public boolean DrawParticleEffects;
|
||||
public boolean BeeInfusionsAdded;
|
||||
public boolean AddThaumcraftItemsToBackpacks;
|
||||
public boolean SkipUpdateCheck;
|
||||
public boolean AreMagicPlanksFlammable;
|
||||
public boolean UseImpregnatedStickInTools;
|
||||
public String ThaumaturgeExtraItems;
|
||||
public int CapsuleStackSizeMax;
|
||||
|
||||
public static BlockPlanks planksWood;
|
||||
public static BlockWoodSlab slabWoodHalf;
|
||||
public static BlockWoodSlab slabWoodFull;
|
||||
|
||||
public static ItemComb combs;
|
||||
public static ItemWax wax;
|
||||
public static ItemPropolis propolis;
|
||||
public static ItemDrop drops;
|
||||
public static ItemPollen pollen;
|
||||
public static ItemSolidFlux solidFlux;
|
||||
public static ItemMiscResources miscResources;
|
||||
public static ItemFood jellyBaby;
|
||||
public static ItemThaumiumScoop thaumiumScoop;
|
||||
public static ItemThaumiumGrafter thaumiumGrafter;
|
||||
public static ItemNugget nuggets;
|
||||
|
||||
//----- Liquid Capsules --------------------
|
||||
public static ItemCapsule magicCapsule;
|
||||
public static ItemCapsule voidCapsule;
|
||||
|
||||
//----- Apiary Frames ----------------------
|
||||
public static ItemMagicHiveFrame hiveFrameMagic;
|
||||
public static ItemMagicHiveFrame hiveFrameResilient;
|
||||
public static ItemMagicHiveFrame hiveFrameGentle;
|
||||
public static ItemMagicHiveFrame hiveFrameMetabolic;
|
||||
public static ItemMagicHiveFrame hiveFrameNecrotic;
|
||||
public static ItemMagicHiveFrame hiveFrameTemporal;
|
||||
public static ItemMagicHiveFrame hiveFrameOblivion;
|
||||
|
||||
//----- Backpacks ------------------------------------------
|
||||
public static Item thaumaturgeBackpackT1;
|
||||
public static Item thaumaturgeBackpackT2;
|
||||
public static BackpackDefinition thaumaturgeBackpackDef;
|
||||
|
||||
//----- Forestry Blocks ------------------------------------
|
||||
//----- Forestry Items -------------------------------------
|
||||
public static Item fBeeComb;
|
||||
public static Item fPollen;
|
||||
public static Item fCraftingResource;
|
||||
//----- Thaumcraft Blocks ----------------------------------
|
||||
public static Block tcPlant;
|
||||
public static Block tcCandle;
|
||||
public static Block tcCrystal;
|
||||
public static Block tcMarker;
|
||||
public static Block tcJar;
|
||||
public static Block tcLog;
|
||||
public static Block tcLeaf;
|
||||
public static Block tcWarded;
|
||||
//----- Thaumcraft Items -----------------------------------
|
||||
public static Item tcFilledJar;
|
||||
public static Item tcMiscResource;
|
||||
public static Item tcEssentiaBottle;
|
||||
public static Item tcShard;
|
||||
public static Item tcGolem;
|
||||
public static Item tcWispEssence;
|
||||
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 ----------------------------------
|
||||
private Configuration tbConfig;
|
||||
|
||||
public Config(File configFile)
|
||||
{
|
||||
this.tbConfig = new Configuration(configFile);
|
||||
|
||||
this.tbConfig.load();
|
||||
this.doMiscConfig();
|
||||
}
|
||||
|
||||
public void saveConfigs()
|
||||
{
|
||||
this.tbConfig.save();
|
||||
}
|
||||
|
||||
public void setupBlocks()
|
||||
{
|
||||
ThaumcraftHelper.getBlocks();
|
||||
ForestryHelper.getBlocks();
|
||||
EquivalentExchangeHelper.getBlocks();
|
||||
|
||||
int blockIdBase = 1750;
|
||||
|
||||
{
|
||||
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()
|
||||
{
|
||||
ThaumcraftHelper.getItems();
|
||||
ForestryHelper.getItems();
|
||||
EquivalentExchangeHelper.getItems();
|
||||
|
||||
int itemIDBase = 26090;
|
||||
|
||||
Property p = tbConfig.getItem("combs", itemIDBase++);
|
||||
combs= new ItemComb(p.getInt());
|
||||
OreDictionary.registerOre("beeComb", new ItemStack(combs, 1, -1));
|
||||
|
||||
wax = new ItemWax(tbConfig.getItem("wax", itemIDBase++).getInt());
|
||||
propolis = new ItemPropolis(tbConfig.getItem("propolis", itemIDBase++).getInt());
|
||||
drops = new ItemDrop(tbConfig.getItem("drop", itemIDBase++).getInt());
|
||||
miscResources = new ItemMiscResources(tbConfig.getItem("miscResources", itemIDBase++).getInt());
|
||||
|
||||
|
||||
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
|
||||
BeeManager.inducers.put(miscResources.getStackForType(ResourceType.AROMATIC_LUMP), 80);
|
||||
|
||||
{
|
||||
int tier1 = tbConfig.getItem("thaumaturgePack1", itemIDBase++).getInt();
|
||||
int tier2 = tbConfig.getItem("thaumaturgePack2", itemIDBase++).getInt();
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
try
|
||||
{
|
||||
// 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.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
magicCapsule = new ItemCapsule(CapsuleType.MAGIC, tbConfig.getItem("magicCapsule", itemIDBase++).getInt(), this.CapsuleStackSizeMax);
|
||||
|
||||
pollen = new ItemPollen(tbConfig.getItem("pollen", 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);
|
||||
hiveFrameResilient = new ItemMagicHiveFrame(tbConfig.getItem("frameResilient", itemIDBase++).getInt(), HiveFrameType.RESILIENT);
|
||||
hiveFrameGentle = new ItemMagicHiveFrame(tbConfig.getItem("frameGentle", itemIDBase++).getInt(), HiveFrameType.GENTLE);
|
||||
hiveFrameMetabolic = new ItemMagicHiveFrame(tbConfig.getItem("frameMetabolic", itemIDBase++).getInt(), HiveFrameType.METABOLIC);
|
||||
hiveFrameNecrotic = new ItemMagicHiveFrame(tbConfig.getItem("frameNecrotic", itemIDBase++).getInt(), HiveFrameType.NECROTIC);
|
||||
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.
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
itemIDBase++;
|
||||
|
||||
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()
|
||||
.setPotionEffect(Potion.moveSpeed.id, 5, 1, 1f);
|
||||
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()
|
||||
{
|
||||
Property p;
|
||||
|
||||
p = tbConfig.get("general", "backpack.thaumaturge.additionalItems", "");
|
||||
p.comment = "Add additional items to the Thaumaturge's Backpack." +
|
||||
"\n Format is the same as Forestry's: id:meta;id;id:meta (etc)";
|
||||
this.ThaumaturgeExtraItems = p.value;
|
||||
|
||||
p = tbConfig.get("general", "backpack.forestry.addThaumcraftItems", true);
|
||||
p.comment = "Set to true if you want ThaumicBees to add several Thaumcraft blocks & items to Forestry backpacks." +
|
||||
"\n Set to false to disable.";
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,39 +1,31 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.main.utils.CompatabilityManager;
|
||||
import thaumicbees.main.utils.CraftingManager;
|
||||
import thaumicbees.main.utils.LocalizationManager;
|
||||
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.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import forestry.api.core.ItemInterface;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.PrintStream;
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
import net.minecraftforge.event.EventBus;
|
||||
import net.minecraftforge.event.ForgeSubscribe;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
import thaumcraft.api.*;
|
||||
import thaumicbees.bees.TBBeeManager;
|
||||
import thaumicbees.bees.genetics.BeeSpecies;
|
||||
import thaumicbees.block.BlockManager;
|
||||
import thaumicbees.item.ItemComb;
|
||||
import thaumicbees.item.ItemWax;
|
||||
import thaumicbees.item.ItemManager;
|
||||
import thaumicbees.thaumcraft.ThaumcraftCompat;
|
||||
|
||||
@Mod(
|
||||
modid="ThaumicBees",
|
||||
name="Thaumic Bees",
|
||||
useMetadata=true,
|
||||
acceptedMinecraftVersions=VersionInfo.MCVersion,
|
||||
version=VersionInfo.Version,
|
||||
version=VersionInfo.Version + " - " + VersionInfo.Build,
|
||||
dependencies=VersionInfo.Depends
|
||||
)
|
||||
public class ThaumicBees
|
||||
@@ -46,39 +38,30 @@ public class ThaumicBees
|
||||
public static CommonProxy proxy;
|
||||
|
||||
private String configsPath;
|
||||
private Configuration config;
|
||||
private ThaumicBeesConfiguration modConfig;
|
||||
private TBBeeManager plugin;
|
||||
private Config modConfig;
|
||||
|
||||
public ThaumicBees()
|
||||
{
|
||||
this.modConfig = new ThaumicBeesConfiguration();
|
||||
|
||||
this.modConfig.ThaumcraftRecipesAdded = false;
|
||||
this.plugin = new TBBeeManager();
|
||||
}
|
||||
|
||||
@Mod.PreInit
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
LocalizationManager.setupLocalizationInfo();
|
||||
|
||||
this.configsPath = event.getModConfigurationDirectory().getAbsolutePath();
|
||||
this.config = new Configuration(event.getSuggestedConfigurationFile());
|
||||
this.modConfig = new Config(event.getSuggestedConfigurationFile());
|
||||
|
||||
this.config.load();
|
||||
// Allow us to set up some extra stuff.
|
||||
this.modConfig.doMiscConfig(this.config);
|
||||
|
||||
ThaumcraftCompat.registerResearch();
|
||||
// Compatibility Helpers setup time.
|
||||
ThaumcraftHelper.init();
|
||||
ExtraBeesHelper.init();
|
||||
EquivalentExchangeHelper.init();
|
||||
}
|
||||
|
||||
@Mod.Init
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
// Check on ExtraBees & enable content. =D
|
||||
this.modConfig.ExtraBeesInstalled = cpw.mods.fml.common.Loader.isModLoaded("ExtraBees");
|
||||
|
||||
// Give ThaumcraftCompat a chance to set itself up.
|
||||
ThaumcraftCompat.parseThaumcraftConfig(configsPath);
|
||||
this.proxy.preloadTextures();
|
||||
try
|
||||
{
|
||||
@@ -92,48 +75,33 @@ public class ThaumicBees
|
||||
throw new RuntimeException("Could not get the Forestry item texture file! Did Forestry load correctly?", e);
|
||||
}
|
||||
|
||||
BlockManager.setupBlocks(this.config);
|
||||
ItemManager.setupItems(this.config);
|
||||
this.config.save();
|
||||
this.modConfig.setupBlocks();
|
||||
this.modConfig.registerTileEntities();
|
||||
this.modConfig.setupItems();
|
||||
|
||||
|
||||
|
||||
// Vanilla & Forestry mechanics setup
|
||||
ItemManager.setupCrafting();
|
||||
// Thaumcraft-specific crafting (Infusions, & Vis-needing)
|
||||
ThaumcraftCompat.setupCrafting();
|
||||
|
||||
ThaumcraftCompat.setupBackpacks();
|
||||
ThaumcraftCompat.setupItemAspects();
|
||||
|
||||
plugin.doInit();
|
||||
CompatabilityManager.setupBackpacks();
|
||||
}
|
||||
|
||||
@Mod.PostInit
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
// Item Manager has a couple tasks left to it at this point...
|
||||
ItemManager.postInit();
|
||||
thaumicbees.bees.Allele.setupAdditionalAlleles();
|
||||
thaumicbees.bees.BeeSpecies.setupBeeSpecies();
|
||||
thaumicbees.bees.BeeMutation.setupMutations();
|
||||
|
||||
// Forestry has init'd by this point.
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
this.modConfig.saveConfigs();
|
||||
|
||||
plugin.postInit();
|
||||
ThaumcraftHelper.setupItemAspects();
|
||||
|
||||
ThaumcraftCompat.setupResearch();
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
public void worldLoad(net.minecraftforge.event.world.WorldEvent.Load event)
|
||||
{
|
||||
if (!this.modConfig.ThaumcraftRecipesAdded)
|
||||
{
|
||||
ThaumcraftCompat.setupBeeInfusions(event.world);
|
||||
this.modConfig.ThaumcraftRecipesAdded = true;
|
||||
}
|
||||
// Vanilla, Forestry & Thaumcraft crafting setup
|
||||
CraftingManager.setupCrafting();
|
||||
|
||||
ThaumcraftHelper.setupResearch();
|
||||
|
||||
VersionInfo.doVersionCheck();
|
||||
}
|
||||
|
||||
public static ThaumicBeesConfiguration getInstanceConfig()
|
||||
public static Config getConfig()
|
||||
{
|
||||
return object.modConfig;
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
||||
/**
|
||||
* A class to hold some data related to mod state & functions.
|
||||
* @author MysteriousAges
|
||||
*
|
||||
*/
|
||||
public class ThaumicBeesConfiguration
|
||||
{
|
||||
public boolean DrawParticleEffects;
|
||||
public boolean ThaumcraftRecipesAdded;
|
||||
public boolean ExtraBeesInstalled;
|
||||
public boolean AddThaumcraftItemsToBackpacks;
|
||||
|
||||
public String ThaumaturgeExtraItems;
|
||||
|
||||
public void doMiscConfig(Configuration cfg)
|
||||
{
|
||||
Property p;
|
||||
|
||||
p = cfg.get("general", "backpack.thaumaturge.additionalItems", "");
|
||||
p.comment = "Add additional items to the Thaumaturge's Backpack." +
|
||||
"\n Format is the same as Forestry's: id:meta;id;id:meta (etc)";
|
||||
this.ThaumaturgeExtraItems = p.value;
|
||||
|
||||
p = cfg.get("general", "backpack.forestry.addThaumcraftItems", true);
|
||||
p.comment = "Set to true if you want ThaumicBees to add several Thaumcraft blocks & items to Forestry backpacks." +
|
||||
"\n Set to false to disable.";
|
||||
this.AddThaumcraftItemsToBackpacks = p.getBoolean(true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
public class Vector3
|
||||
{
|
||||
public int x;
|
||||
public int y;
|
||||
public int z;
|
||||
|
||||
public Vector3()
|
||||
{
|
||||
x = y = z = 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
public class VersionInfo
|
||||
{
|
||||
|
||||
public static final String Version = "@MODVERSION@";
|
||||
public static final String MCVersion = "@MCVERSION@";
|
||||
public static final String Build = "@BUILD_NUMBER@";
|
||||
|
||||
public static final String Logo = "/gfx/thaumicbees/logo.png";
|
||||
|
||||
public static final String Depends = "required-after:Forestry;required-after:Thaumcraft@[3.0.2b,);after:ExtraBees";
|
||||
|
||||
}
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,501 @@
|
||||
package thaumicbees.main.utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumicbees.bees.Allele;
|
||||
import thaumicbees.bees.BeeGenomeManager;
|
||||
import thaumicbees.bees.BeeSpecies;
|
||||
import thaumicbees.item.ItemCapsule;
|
||||
import thaumicbees.item.ItemWax;
|
||||
import thaumicbees.item.types.CombType;
|
||||
import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.HiveFrameType;
|
||||
import thaumicbees.item.types.LiquidType;
|
||||
import thaumicbees.item.types.NuggetType;
|
||||
import thaumicbees.item.types.PlankType;
|
||||
import thaumicbees.item.types.PropolisType;
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
import thaumicbees.item.types.WaxType;
|
||||
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 forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.recipes.RecipeManagers;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.liquids.LiquidContainerData;
|
||||
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||
import net.minecraftforge.liquids.LiquidDictionary;
|
||||
import net.minecraftforge.liquids.LiquidStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
import net.minecraftforge.oredict.ShapelessOreRecipe;
|
||||
|
||||
public class CraftingManager
|
||||
{
|
||||
public static void setupCrafting()
|
||||
{
|
||||
// Broken up into seperate sections to make things a bit easier to find.
|
||||
setupVanillaCrafting();
|
||||
setupCentrifugeRecipes();
|
||||
setupSqueezerRecipes();
|
||||
setupCarpenterRecipes();
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
ThaumcraftHelper.setupThaumcraftCrafting();
|
||||
}
|
||||
else
|
||||
{
|
||||
setupThaumcraftAlternativeCrafting();
|
||||
}
|
||||
|
||||
registerLiquidContainer(Config.magicCapsule);
|
||||
registerLiquidContainer(Config.voidCapsule);
|
||||
}
|
||||
|
||||
private static void setupVanillaCrafting()
|
||||
{
|
||||
ItemStack input;
|
||||
ItemStack output;
|
||||
|
||||
// Magic capsules
|
||||
output = new ItemStack(Config.magicCapsule); output.stackSize = 4;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"WWW",
|
||||
'W', Config.wax.getStackForType(WaxType.MAGIC)
|
||||
});
|
||||
|
||||
// Concentrated Fertilizer -> Forestry fertilizer
|
||||
input = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
|
||||
output = ItemInterface.getItem("fertilizerCompound");
|
||||
output.stackSize = 6;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
" S ", " F ", " S ",
|
||||
'F', input,
|
||||
'S', Block.sand
|
||||
});
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
" ", "SFS", " ",
|
||||
'F', input,
|
||||
'S', Block.sand
|
||||
});
|
||||
|
||||
output = output.copy();
|
||||
output.stackSize = 12;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"aaa", "aFa", "aaa",
|
||||
'F', input,
|
||||
'a', ItemInterface.getItem("ash")
|
||||
});
|
||||
|
||||
// "bottling" Intellect drops
|
||||
GameRegistry.addRecipe(new ItemStack(Item.expBottle), new Object[] {
|
||||
"DDD", "DBD", "DDD",
|
||||
'D', Config.drops.getStackForType(DropType.INTELLECT),
|
||||
'B', Item.glassBottle
|
||||
});
|
||||
|
||||
GameRegistry.addRecipe(new ItemStack(Block.slowSand, 0, 4), new Object[] {
|
||||
"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)
|
||||
{
|
||||
NuggetType.COPPER.setActive(false);
|
||||
}
|
||||
if (OreDictionary.getOres("ingotTin").size() <= 0)
|
||||
{
|
||||
NuggetType.TIN.setActive(false);
|
||||
}
|
||||
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.
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.OCCULT),
|
||||
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||
new int[] { 100, 60 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.OTHERWORLDLY),
|
||||
new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||
new int[] { 50, 20, 100 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.PAPERY),
|
||||
new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
|
||||
new int[] { 80, 20, 5 });
|
||||
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 int[] { 90, 40, 10 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.SKULKING),
|
||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemInterface.getItem("propolis"), ItemInterface.getItem("honeydew") },
|
||||
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 });
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
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(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
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {Config.propolis.getStackForType(PropolisType.FIRE) },
|
||||
new LiquidStack(Block.lavaStill, 250),
|
||||
new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()), 10);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
private static void setupCarpenterRecipes()
|
||||
{
|
||||
ItemStack input;
|
||||
ItemStack output;
|
||||
|
||||
output = BlockInterface.getBlock("candle");
|
||||
output.stackSize = 24;
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||
" S ", "WWW", "WWW",
|
||||
'W', Config.wax,
|
||||
'S', Item.silk
|
||||
});
|
||||
|
||||
output = BlockInterface.getBlock("candle");
|
||||
output.stackSize = 6;
|
||||
input = ItemInterface.getItem("craftingMaterial");
|
||||
input.setItemDamage(ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()); // Set to Silk Wisp
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||
"WSW",
|
||||
'W', Config.wax,
|
||||
'S', input
|
||||
});
|
||||
|
||||
output = Config.miscResources.getStackForType(ResourceType.AROMATIC_LUMP, 2);
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||
" P ", "JDJ", " P ",
|
||||
'P', ItemInterface.getItem("pollen"),
|
||||
'J', ItemInterface.getItem("royalJelly"),
|
||||
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||
});
|
||||
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||
" J ", "PDP", " J ",
|
||||
'P', ItemInterface.getItem("pollen"),
|
||||
'J', ItemInterface.getItem("royalJelly"),
|
||||
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||
});
|
||||
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
// Carpenter recipes
|
||||
input = ItemInterface.getItem("craftingMaterial");
|
||||
input.setItemDamage(3); // Set to Silk Mesh
|
||||
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.planksWood, 6, 1);
|
||||
RecipeManagers.carpenterManager.addRecipe(8, new LiquidStack(Block.waterStill, 500), null, output, new Object[] {
|
||||
"B",
|
||||
'B', new ItemStack(Config.tcLog, 1, 1)
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private static void registerLiquidContainer(ItemCapsule baseCapsule)
|
||||
{
|
||||
ItemStack empty = new ItemStack(baseCapsule, 1, 0);
|
||||
ItemStack filled;
|
||||
LiquidStack liquid = null;
|
||||
|
||||
for (LiquidType liquidType : LiquidType.values())
|
||||
{
|
||||
switch (liquidType)
|
||||
{
|
||||
case EMPTY:
|
||||
liquid = null;
|
||||
break;
|
||||
case WATER:
|
||||
liquid = new LiquidStack(Block.waterStill, baseCapsule.getType().capacity);
|
||||
break;
|
||||
case LAVA:
|
||||
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
|
||||
break;
|
||||
default:
|
||||
liquid = LiquidDictionary.getLiquid(liquidType.liquidID, baseCapsule.getType().capacity);
|
||||
break;
|
||||
}
|
||||
|
||||
if (liquid != null)
|
||||
{
|
||||
filled = new ItemStack(baseCapsule, 1, liquidType.ordinal());
|
||||
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
||||
|
||||
// Register with Squeezer/Bottler
|
||||
RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled);
|
||||
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] {filled} , liquid,
|
||||
Config.wax.getStackForType(WaxType.MAGIC), 20);
|
||||
liquidType.available = true;
|
||||
}
|
||||
}
|
||||
// Empty will be set to unavailable. Obviously, it always is.
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package thaumicbees.main.utils;
|
||||
|
||||
import net.minecraft.util.StringTranslate;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
|
||||
public class LocalizationManager
|
||||
{
|
||||
private enum Locale
|
||||
{
|
||||
en_US("en_US"),
|
||||
;
|
||||
public String locale;
|
||||
|
||||
private Locale(String loc)
|
||||
{
|
||||
this.locale = loc;
|
||||
}
|
||||
}
|
||||
|
||||
public static void setupLocalizationInfo()
|
||||
{
|
||||
for (Locale l : Locale.values())
|
||||
{
|
||||
LanguageRegistry.instance().loadLocalization(CommonProxy.TCBEES_LOCDIR + l.locale + ".xml", l.locale, true);
|
||||
}
|
||||
}
|
||||
|
||||
public static String getLocalizedString(String key)
|
||||
{
|
||||
String result = LanguageRegistry.instance().getStringLocalization(key);
|
||||
if (result.isEmpty())
|
||||
{
|
||||
result = LanguageRegistry.instance().getStringLocalization(key, "en_US");
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
+22
-10
@@ -1,5 +1,6 @@
|
||||
package thaumicbees.bees;
|
||||
package thaumicbees.main.utils;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
@@ -7,14 +8,20 @@ import net.minecraft.world.World;
|
||||
*/
|
||||
public enum MoonPhase
|
||||
{
|
||||
FULL,
|
||||
WANING_GIBBOUS,
|
||||
WANING_HALF,
|
||||
WANING_CRESCENT,
|
||||
NEW,
|
||||
WAXING_CRESCENT,
|
||||
WAXING_HALF,
|
||||
WAXING_GIBBOUS;
|
||||
FULL("full"),
|
||||
WANING_GIBBOUS("gibbousWaning"),
|
||||
WANING_HALF("halfWaning"),
|
||||
WANING_CRESCENT("crescentWaning"),
|
||||
NEW("new"),
|
||||
WAXING_CRESCENT("crecentWaxing"),
|
||||
WAXING_HALF("halfWaxing"),
|
||||
WAXING_GIBBOUS("gibbousWaxing");
|
||||
|
||||
private String phaseName;
|
||||
private MoonPhase(String name)
|
||||
{
|
||||
this.phaseName = name;
|
||||
}
|
||||
|
||||
public boolean isBetween(MoonPhase first, MoonPhase second)
|
||||
{
|
||||
@@ -35,8 +42,13 @@ public enum MoonPhase
|
||||
return flag;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("tb.moon." + this.phaseName);
|
||||
}
|
||||
|
||||
public static MoonPhase getMoonPhase(World w)
|
||||
{
|
||||
return MoonPhase.values()[(int)(w.getWorldTime() / 24000L) % 8];
|
||||
return MoonPhase.values()[(int)((w.getWorldTime() - 0) / 24000L) % 8];
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,254 @@
|
||||
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 static final String Version = "@VERSION@";
|
||||
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 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,
|
||||
;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package thaumicbees.main.utils.compat;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import thaumicbees.main.Config;
|
||||
|
||||
public class ForestryHelper
|
||||
{
|
||||
public enum CraftingMaterial
|
||||
{
|
||||
PULSATING_DUST, // unused
|
||||
PULSATING_MESH,
|
||||
SILK_WISP,
|
||||
WOVEN_SILK,
|
||||
DISSIPATION_CHARGE,
|
||||
ICE_SHARD,
|
||||
SCENTED_PANELING,
|
||||
;
|
||||
}
|
||||
|
||||
public enum Comb
|
||||
{
|
||||
HONEY,
|
||||
COCOA,
|
||||
SIMMERING,
|
||||
STRINGY,
|
||||
FROZEN,
|
||||
DRIPPING,
|
||||
SILKY,
|
||||
PARCHED,
|
||||
MYSTERIOUS,
|
||||
IRRADIATED,
|
||||
POWDERY,
|
||||
REDDENED,
|
||||
DARKENED,
|
||||
OMEGA,
|
||||
WHEATEN,
|
||||
MOSSY,
|
||||
;
|
||||
}
|
||||
|
||||
public enum Propolis
|
||||
{
|
||||
NORMAL,
|
||||
STICKY, // Unused.
|
||||
PULSATING,
|
||||
SILKY,
|
||||
;
|
||||
}
|
||||
|
||||
public enum Pollen
|
||||
{
|
||||
NORMAL,
|
||||
CRYSTALLINE,
|
||||
;
|
||||
}
|
||||
|
||||
public enum CircuitBoard
|
||||
{
|
||||
BASIC,
|
||||
ENHANCED,
|
||||
REFINED,
|
||||
INTRICATE,
|
||||
;
|
||||
}
|
||||
|
||||
public enum Tube
|
||||
{
|
||||
COPPER,
|
||||
TIN,
|
||||
BRONZE,
|
||||
IRON,
|
||||
GOLD,
|
||||
DIAMOND,
|
||||
OBSIDIAN,
|
||||
BLAZE,
|
||||
RUBBER,
|
||||
EMERALD,
|
||||
APATITE,
|
||||
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
-1
@@ -1,4 +1,4 @@
|
||||
package thaumicbees.thaumcraft;
|
||||
package thaumicbees.main.utils.compat;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -0,0 +1,759 @@
|
||||
package thaumicbees.main.utils.compat;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
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.BeeGenomeManager;
|
||||
import thaumicbees.bees.BeeSpecies;
|
||||
import thaumicbees.item.types.CombType;
|
||||
import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.LiquidType;
|
||||
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 cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import forestry.api.apiculture.EnumBeeChromosome;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.core.ItemInterface;
|
||||
|
||||
public class ThaumcraftHelper
|
||||
{
|
||||
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,
|
||||
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)
|
||||
{
|
||||
// Add all shards and Thaumium to miner's backpack
|
||||
String ids = Config.tcShard.itemID + ":" + -1 + ";"
|
||||
+ Config.tcMiscResource.itemID + ":" + ThaumcraftHelper.MiscResource.THAUMIUM.ordinal();
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "miner@" + ids);
|
||||
|
||||
// All resources go into Thaumaturge's backpack
|
||||
ids = Config.tcMiscResource.itemID + ":" + -1 + ";"
|
||||
+ Config.tcShard.itemID + ":" + -1 + ";"
|
||||
+ Config.tcFilledJar.itemID + ":" + -1 + ";"
|
||||
+ Config.tcCrystal.blockID + ":" + -1 + ";"
|
||||
+ Config.tcJar.blockID + ":" + -1 + ";"
|
||||
+ Config.tcGolem.itemID + ":" + -1 + ";";
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ids);
|
||||
|
||||
// Add some plants & saplings to Forester's
|
||||
ids = Config.tcPlant.blockID + ":" + "-1" + ";"
|
||||
+ Config.tcLeaf.blockID + ":" + -1 + ";"
|
||||
+ Config.tcLog.blockID + ":" + "-1";
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "forester@" + ids);
|
||||
|
||||
// Add Wisp & brains to Hunter's
|
||||
ids = Config.tcWispEssence.itemID + ":" + -1 + ";"
|
||||
+ Config.tcMiscResource.itemID + ":" + ThaumcraftHelper.MiscResource.ZOMBIE_BRAIN.ordinal();
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "hunter@" + ids);
|
||||
|
||||
// Add Marker, warded stone, candle to builder
|
||||
ids = Config.tcCandle.blockID + ":" + -1 + ";"
|
||||
+ Config.tcMarker.blockID + ":" + -1 + ";"
|
||||
+ Config.tcWarded.blockID + ":" + -1;
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "builder@" + ids);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setupItemAspects()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
setupItemAspectsThaumicBees();
|
||||
setupItemAspectsForestry();
|
||||
if (ExtraBeesHelper.isActive())
|
||||
{
|
||||
setupItemAspectsExtraBees();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void setupItemAspectsThaumicBees()
|
||||
{
|
||||
ObjectTags tags;
|
||||
ItemStack itemStack;
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 2);
|
||||
ThaumcraftApi.registerObjectTag(Config.planksWood.blockID, -1, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
||||
ThaumcraftApi.registerObjectTag(Config.wax.itemID, WaxType.MAGIC.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 1);
|
||||
ThaumcraftApi.registerObjectTag(Config.drops.itemID, DropType.ENCHANTED.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 1);
|
||||
ThaumcraftApi.registerObjectTag(Config.drops.itemID, DropType.INTELLECT.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
|
||||
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);
|
||||
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, -1, tags);
|
||||
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1);
|
||||
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.STARK.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.WIND, 3);
|
||||
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.AIR.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.FIRE, 3);
|
||||
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.FIRE.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.WATER, 3);
|
||||
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.WATER.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.EARTH, 3);
|
||||
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.EARTH.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 4);
|
||||
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.INFUSED.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
|
||||
ThaumcraftApi.registerObjectTag(Config.miscResources.itemID, ResourceType.LORE_FRAGMENT.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
|
||||
ThaumcraftApi.registerObjectTag(Config.combs.itemID, -1, tags);
|
||||
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2);
|
||||
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OCCULT.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OTHERWORLDLY.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.STARK.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 4);
|
||||
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.
|
||||
tags = new ObjectTags().add(EnumTag.VOID, 2).add(EnumTag.MAGIC, 2);
|
||||
ThaumcraftApi.registerComplexObjectTag(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal())
|
||||
.add(EnumTag.WATER, 8);
|
||||
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, LiquidType.WATER.ordinal(), tags);
|
||||
tags = new ObjectTags(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal())
|
||||
.add(EnumTag.FIRE, 12).add(EnumTag.ROCK, 4);
|
||||
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, LiquidType.LAVA.ordinal(), tags);
|
||||
|
||||
for (EnumTag tag : EnumTag.values())
|
||||
{
|
||||
if (tag == EnumTag.UNKNOWN)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
tags = new ObjectTags().add(tag, 1);
|
||||
ThaumcraftApi.registerObjectTag(Config.solidFlux.itemID, tag.id, tags);
|
||||
}
|
||||
}
|
||||
|
||||
private static void setupItemAspectsForestry()
|
||||
{
|
||||
ObjectTags tags;
|
||||
ItemStack itemStack;
|
||||
|
||||
itemStack = BlockInterface.getBlock("candle");
|
||||
tags = new ObjectTags().add(EnumTag.LIGHT, 1).add(EnumTag.CONTROL, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = BlockInterface.getBlock("glass");
|
||||
tags = new ObjectTags(Block.glass.blockID, 0);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
|
||||
// Pulsating propolis
|
||||
itemStack = ItemInterface.getItem("propolis");
|
||||
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.ELDRITCH, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Propolis.PULSATING.ordinal(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("pollen");
|
||||
tags = new ObjectTags().add(EnumTag.FLOWER, 1).add(EnumTag.PLANT, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Pollen.NORMAL.ordinal(), tags);
|
||||
tags = new ObjectTags(itemStack.itemID, ForestryHelper.Pollen.NORMAL.ordinal()).add(EnumTag.COLD, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Pollen.CRYSTALLINE.ordinal(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("craftingMaterial");
|
||||
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.PULSATING_MESH.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.SILK_WISP.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 4).add(EnumTag.CLOTH, 5);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.WOVEN_SILK.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.COLD, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.ICE_SHARD.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.VALUABLE, 1).add(EnumTag.PLANT, 1).add(EnumTag.INSECT, 2)
|
||||
.add(EnumTag.CONTROL, 2).add(EnumTag.WOOD, 5);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.SCENTED_PANELING.ordinal(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("beealyzer");
|
||||
tags = new ObjectTags().add(EnumTag.VALUABLE, 3).add(EnumTag.MECHANISM, 3).add(EnumTag.METAL, 19)
|
||||
.add(EnumTag.POWER, 8).add(EnumTag.TOOL, 18);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("treealyzer");
|
||||
tags = new ObjectTags().add(EnumTag.POWER, 3).add(EnumTag.PURE, 3).add(EnumTag.LIFE, 6)
|
||||
.add(EnumTag.TOOL, 12).add(EnumTag.METAL, 19);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("apatite");
|
||||
tags = new ObjectTags().add(EnumTag.CRYSTAL, 2).add(EnumTag.POWER, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("impregnatedCasing");
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 56).add(EnumTag.EXCHANGE, 8);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("stickImpregnated");
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 6).add(EnumTag.EXCHANGE, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("peat");
|
||||
tags = new ObjectTags().add(EnumTag.POWER, 2).add(EnumTag.PLANT, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("ash");
|
||||
tags = new ObjectTags().add(EnumTag.DESTRUCTION, 1).add(EnumTag.EXCHANGE, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("honeyDrop");
|
||||
tags = new ObjectTags().add(EnumTag.EXCHANGE, 2).add(EnumTag.LIFE, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("honeydew");
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("royalJelly");
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.POWER, 1).add(EnumTag.VALUABLE, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("honeyPot");
|
||||
tags = new ObjectTags().add(EnumTag.LIFE, 2);
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("ambrosia");
|
||||
tags = new ObjectTags().add(EnumTag.HEAL, 4);
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("beeswax");
|
||||
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("refractoryWax");
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 3);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("phosphor");
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 2).add(EnumTag.DESTRUCTION, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("waxCapsule");
|
||||
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("waxCapsuleWater");
|
||||
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("refractoryEmpty");
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("refractoryWater");
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("refractoryLava");
|
||||
tags = new ObjectTags().add(EnumTag.VOID, 1).add(EnumTag.FIRE, 7).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("canEmpty");
|
||||
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("canWater");
|
||||
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("canLava");
|
||||
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.FIRE, 6).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("beeComb");
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.FIRE, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.SIMMERING.ordinal(), tags);
|
||||
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.COLD, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.FROZEN.ordinal(), tags);
|
||||
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.CROP, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.WHEATEN.ordinal(), tags);
|
||||
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.FUNGUS, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.MOSSY.ordinal(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("ambrosia");
|
||||
tags = new ObjectTags().add(EnumTag.LIFE, 2).add(EnumTag.HEAL, 4);
|
||||
|
||||
// Forestry's wood
|
||||
itemStack = BlockInterface.getBlock("log1");
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 8);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
itemStack = BlockInterface.getBlock("log2"); // Same tags
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
itemStack = BlockInterface.getBlock("log3"); // Same tags.
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
itemStack = BlockInterface.getBlock("log4"); // Still same tags.
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("sapling");
|
||||
tags = new ObjectTags().add(EnumTag.PLANT, 4).add(EnumTag.WOOD, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||
|
||||
// BEES!
|
||||
itemStack = ItemInterface.getItem("beeDroneGE");
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.FLIGHT, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // All drones
|
||||
|
||||
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.VALUABLE, 4); // Get drone tags & add valuable
|
||||
itemStack = ItemInterface.getItem("beePrincessGE");
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // All princesses.
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.VALUABLE, 8).add(EnumTag.INSECT, 2).add(EnumTag.FLIGHT, 4);
|
||||
itemStack = ItemInterface.getItem("beeQueenGE");
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); //All queens.
|
||||
|
||||
itemStack = ItemInterface.getItem("circuitboards");
|
||||
tags = new ObjectTags().add(EnumTag.CRYSTAL, 2).add(EnumTag.METAL, 5).add(EnumTag.MECHANISM, 10)
|
||||
.add(EnumTag.POWER, 10);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.BASIC.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 14)
|
||||
.add(EnumTag.CONTROL, 2).add(EnumTag.EXCHANGE, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.ENHANCED.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 14);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.REFINED.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 19)
|
||||
.add(EnumTag.VALUABLE, 10);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.INTRICATE.ordinal(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("tubes");
|
||||
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);
|
||||
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);
|
||||
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);
|
||||
tags = new ObjectTags(Item.ingotIron.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.IRON.ordinal(), tags);
|
||||
tags = new ObjectTags(Item.ingotGold.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.GOLD.ordinal(), tags);
|
||||
tags = new ObjectTags(Item.diamond.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.DIAMOND.ordinal(), tags);
|
||||
tags = new ObjectTags(Block.obsidian.blockID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.OBSIDIAN.ordinal(), tags);
|
||||
tags = new ObjectTags(Item.blazePowder.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.BLAZE.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.MOTION, 2).add(EnumTag.CONTROL, 2).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.RUBBER.ordinal(), tags);
|
||||
tags = new ObjectTags(Item.emerald.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.EMERALD.ordinal(), tags);
|
||||
tags = new ObjectTags(ItemInterface.getItem("apatite").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.APATITE.ordinal(), tags);
|
||||
tags = new ObjectTags(Item.dyePowder.itemID, 4).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.LAPIS.ordinal(), tags);
|
||||
}
|
||||
|
||||
private static void setupItemAspectsExtraBees()
|
||||
{
|
||||
ItemStack itemStack;
|
||||
ObjectTags tags;
|
||||
|
||||
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);
|
||||
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()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
ObjectTags tags;
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 10).add(EnumTag.PLANT, 10).add(EnumTag.INSECT, 10);
|
||||
ResearchItem startNode = new ResearchItem("TBSTARTNODE", tags, 10, 1, Config.miscResources.getStackForType(ResourceType.RESEARCH_StartNode))
|
||||
.setParents(ResearchList.getResearch("UTFT"))
|
||||
.registerResearchItem();
|
||||
|
||||
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"))
|
||||
.setParents(startNode)
|
||||
.registerResearchItem();
|
||||
|
||||
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);
|
||||
ResearchItem beeInfusion = new ResearchItem("BEEINFUSION", tags, 5, 3, Config.miscResources.getStackForType(ResourceType.RESEARCH_BeeInfusion))
|
||||
.setParents(starkHint).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
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"))
|
||||
.setParents(startNode)
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 6).add(EnumTag.INSECT, 15).add(EnumTag.BEAST, 2)
|
||||
.add(EnumTag.MAGIC, 5);
|
||||
ResearchItem magicFrame = new ResearchItem("HIVEFRAME", tags, 10, -2, Config.hiveFrameMagic)
|
||||
.setParents(startNode)
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6)
|
||||
.add(EnumTag.MAGIC, 8);
|
||||
ResearchItem magicFrame2 = new ResearchItem("HIVEFRAME2", tags, 8, -2, Config.hiveFrameResilient)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
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);
|
||||
ResearchItem gentleFrame = new ResearchItem("HIVEFRAMEGENTLE", tags, 12, -2, Config.hiveFrameGentle)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
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);
|
||||
ResearchItem metabolicFrame = new ResearchItem("HIVEFRAMEMETA", tags, 9, -3, Config.hiveFrameMetabolic)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
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);
|
||||
ResearchItem necroticFrame = new ResearchItem("HIVEFRAMENECRO", tags, 11, -3, Config.hiveFrameNecrotic)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
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)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.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();
|
||||
}
|
||||
}
|
||||
|
||||
private static void registerResearchXML()
|
||||
{
|
||||
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,6 +0,0 @@
|
||||
package thaumicbees.thaumcraft;
|
||||
|
||||
public enum TCBlockPlant
|
||||
{
|
||||
GREATWOOD_SAPLING, SILVERWOOD_SAPLING, SILVERLEAF, CINDERPEARL;
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package thaumicbees.thaumcraft;
|
||||
|
||||
public enum TCEntity
|
||||
{
|
||||
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 TCEntity(String id, String clazz)
|
||||
{
|
||||
this.entityID = id;
|
||||
this.className = clazz;
|
||||
}
|
||||
|
||||
public String getClassName()
|
||||
{
|
||||
return packageName + this.className;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package thaumicbees.thaumcraft;
|
||||
|
||||
public enum TCMiscResource
|
||||
{
|
||||
ALUMENTUM, NITOR, THAUMIUM, QUICKSILVER, MAGIC_TALLOW,
|
||||
ZOMBIE_BRAIN, AMBER, ENCHANTED_FABRIC, FLUX_FILTER, KNOWLEDGE_FRAGMENT;
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package thaumicbees.thaumcraft;
|
||||
|
||||
public enum TCShardType
|
||||
{
|
||||
AIR, FIRE, WATER, EARTH, MAGIC, DULL;
|
||||
}
|
||||
@@ -1,468 +0,0 @@
|
||||
package thaumicbees.thaumcraft;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchList;
|
||||
import thaumicbees.bees.genetics.Allele;
|
||||
import thaumicbees.bees.genetics.BeeGenomeManager;
|
||||
import thaumicbees.block.BlockManager;
|
||||
import thaumicbees.item.ItemComb;
|
||||
import thaumicbees.item.ItemManager;
|
||||
import thaumicbees.item.ItemMiscResources;
|
||||
import thaumicbees.item.types.CombType;
|
||||
import thaumicbees.item.types.DropType;
|
||||
import thaumicbees.item.types.LiquidType;
|
||||
import thaumicbees.item.types.ResourceType;
|
||||
import thaumicbees.item.types.WaxType;
|
||||
import thaumicbees.main.CommonProxy;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
import thaumicbees.storage.BackpackDefinition;
|
||||
|
||||
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;
|
||||
|
||||
public class ThaumcraftCompat
|
||||
{
|
||||
|
||||
public static void parseThaumcraftConfig(String configPath)
|
||||
{
|
||||
Configuration tcConfig = new Configuration(new File(configPath + "/Thaumcraft.cfg"));
|
||||
Property p;
|
||||
|
||||
tcConfig.load();
|
||||
|
||||
// Load blocks out of the Thaumcraft config to get their IDs;
|
||||
p = tcConfig.getBlock("BlockCustomPlant", 0);
|
||||
BlockManager.tcPlant = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockCandle", 0);
|
||||
BlockManager.tcCandle = Block.blocksList[ p.getInt()];
|
||||
p = tcConfig.getBlock("BlockCrystal", 0);
|
||||
BlockManager.tcCrystal = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockMarker", 0);
|
||||
BlockManager.tcMarker = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockJar", 0);
|
||||
BlockManager.tcJar = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockMagicalLeaves", 0);
|
||||
BlockManager.tcLeaf = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockMagicalLog", 0);
|
||||
BlockManager.tcLog = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockSecure", 0);
|
||||
BlockManager.tcWarded = Block.blocksList[p.getInt()];
|
||||
|
||||
// Load items out of the Thaumcraft config to get their IDs.
|
||||
p = tcConfig.getItem("ItemEssence", 0);
|
||||
ItemManager.tcEssentiaBottle = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("ItemResource", 0);
|
||||
ItemManager.tcMiscResource = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("ItemShard", 0);
|
||||
ItemManager.tcShard = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("BlockJarFilledItem", 0);
|
||||
ItemManager.tcFilledJar = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("ItemGolemPlacer", 0);
|
||||
ItemManager.tcGolem = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("ItemEssence", 0);
|
||||
ItemManager.tcWispEssence = Item.itemsList[p.getInt() + 256];
|
||||
}
|
||||
|
||||
public static void setupBackpacks()
|
||||
{
|
||||
if (ThaumicBees.getInstanceConfig().AddThaumcraftItemsToBackpacks)
|
||||
{
|
||||
// Add all shards and Thaumium to miner's backpack
|
||||
String ids = ItemManager.tcShard.itemID + ":" + -1 + ";"
|
||||
+ ItemManager.tcMiscResource.itemID + ":" + TCMiscResource.THAUMIUM.ordinal();
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "miner@" + ids);
|
||||
|
||||
// All resources go into Thaumaturge's backpack
|
||||
ids = ItemManager.tcMiscResource.itemID + ":" + -1 + ";"
|
||||
+ ItemManager.tcShard.itemID + ":" + -1 + ";"
|
||||
+ ItemManager.tcFilledJar.itemID + ":" + -1 + ";"
|
||||
+ BlockManager.tcCrystal.blockID + ":" + -1 + ";"
|
||||
+ BlockManager.tcJar.blockID + ":" + -1 + ";"
|
||||
+ ItemManager.tcGolem.itemID + ":" + -1;
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ids);
|
||||
|
||||
// Add some plants & saplings to Forester's
|
||||
ids = BlockManager.tcPlant.blockID + ":" + "-1" + ";"
|
||||
+ BlockManager.tcLeaf.blockID + ":" + -1 + ";"
|
||||
+ BlockManager.tcLog.blockID + ":" + "-1";
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "forester@" + ids);
|
||||
|
||||
// Add Wisp & brains to Hunter's
|
||||
ids = ItemManager.tcWispEssence.itemID + ":" + -1 + ";"
|
||||
+ ItemManager.tcMiscResource.itemID + ":" + TCMiscResource.ZOMBIE_BRAIN.ordinal();
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "hunter@" + ids);
|
||||
|
||||
// Add Marker, warded stone, candle to builder
|
||||
ids = BlockManager.tcCandle.blockID + ":" + -1 + ";"
|
||||
+ BlockManager.tcMarker.blockID + ":" + -1 + ";"
|
||||
+ BlockManager.tcWarded.blockID + ":" + -1;
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "builder@" + ids);
|
||||
}
|
||||
}
|
||||
|
||||
public static void setupItemAspects()
|
||||
{
|
||||
ObjectTags tags;
|
||||
ItemStack itemStack;
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.wax.itemID, WaxType.MAGIC.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 1);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.drops.itemID, DropType.ENCHANTED.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 1);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.drops.itemID, DropType.INTELLECT.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.miscResources.itemID, ResourceType.LORE_FRAGMENT.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 1).add(EnumTag.INSECT, 2).add(EnumTag.CONTROL, 1);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.STARK.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.AIRY.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.FIREY.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.WATERY.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.EARTHY.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.INFUSED.ordinal(), tags);
|
||||
|
||||
// Tagging capsules.
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
||||
ThaumcraftApi.registerComplexObjectTag(ItemManager.magicCapsule.itemID, -1, tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.VOID, 2);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, 0, tags);
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.WATER, 2);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, LiquidType.WATER.ordinal(), tags);
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.FIRE, 2);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, LiquidType.LAVA.ordinal(), tags);
|
||||
|
||||
for (EnumTag tag : EnumTag.values())
|
||||
{
|
||||
if (tag == EnumTag.UNKNOWN)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
tags = new ObjectTags().add(tag, 1);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.solidFlux.itemID, tag.id, tags);
|
||||
}
|
||||
|
||||
// Tag some Forestry stuff.
|
||||
// Pulsating propolis
|
||||
itemStack = ItemInterface.getItem("propolis");
|
||||
tags = new ObjectTags().add(EnumTag.ELDRITCH, 1).add(EnumTag.CONTROL, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, 2 , tags);
|
||||
itemStack = ItemInterface.getItem("craftingMaterial");
|
||||
// 0: pulsatingDust
|
||||
// 1: "pulsatingMesh";
|
||||
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, 1, tags);
|
||||
// 2: "silkWisp";
|
||||
// 3: "wovenSilk";
|
||||
// 4: "dissipationCharge";
|
||||
// 5: "iceShard";
|
||||
tags = new ObjectTags().add(EnumTag.COLD, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, 5, tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("apatite");
|
||||
tags = new ObjectTags().add(EnumTag.CRYSTAL, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("impregnatedCasing");
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 58).add(EnumTag.PLANT, 8);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("stickImpregnated");
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 8).add(EnumTag.PLANT, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("peat");
|
||||
tags = new ObjectTags().add(EnumTag.POWER, 2).add(EnumTag.PLANT, 1).add(EnumTag.EARTH, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("ash");
|
||||
tags = new ObjectTags().add(EnumTag.DESTRUCTION, 1).add(EnumTag.EXCHANGE, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("honeyDrop");
|
||||
tags = new ObjectTags().add(EnumTag.EXCHANGE, 2).add(EnumTag.LIFE, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("beeswax");
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.CONTROL, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("refractoryWax");
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 3);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("phosphor");
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 2).add(EnumTag.DESTRUCTION, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("waxCapsule");
|
||||
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("waxCapsuleWater");
|
||||
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("refractoryEmpty");
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("refractoryWater");
|
||||
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("refractoryLava");
|
||||
tags = new ObjectTags().add(EnumTag.VOID, 1).add(EnumTag.FIRE, 7).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("canEmpty");
|
||||
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("canWater");
|
||||
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemInterface.getItem("canLava");
|
||||
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.FIRE, 6).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("beeComb");
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // ALL combs plox.
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, -1, tags);
|
||||
|
||||
itemStack = ItemManager.combs.getStackForType(CombType.OCCULT);
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2).add(EnumTag.MAGIC, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemManager.combs.getStackForType(CombType.STARK);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("ambrosia");
|
||||
tags = new ObjectTags().add(EnumTag.LIFE, 2).add(EnumTag.HEAL, 4);
|
||||
|
||||
// Forestry's wood
|
||||
itemStack = BlockInterface.getBlock("log1");
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 8);
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
|
||||
itemStack = BlockInterface.getBlock("log2"); // Same tags
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
|
||||
itemStack = BlockInterface.getBlock("log3"); // Same tags.
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
|
||||
itemStack = BlockInterface.getBlock("log4"); // Still same tags.
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
|
||||
|
||||
itemStack = ItemInterface.getItem("sapling");
|
||||
tags = new ObjectTags().add(EnumTag.PLANT, 4).add(EnumTag.WOOD, 2);
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
|
||||
|
||||
// BEES!
|
||||
itemStack = ItemInterface.getItem("beeDroneGE");
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.FLIGHT, 2);
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All drones
|
||||
|
||||
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.VALUABLE, 4); // Get drone tags & add valuable
|
||||
itemStack = ItemInterface.getItem("beePrincessGE");
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All princesses.
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.VALUABLE, 8).add(EnumTag.INSECT, 2).add(EnumTag.FLIGHT, 4);
|
||||
itemStack = ItemInterface.getItem("beeQueenGE");
|
||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); //All queens.
|
||||
}
|
||||
|
||||
public static void setupResearch()
|
||||
{
|
||||
ObjectTags tags = new ObjectTags().add(EnumTag.WOOD, 2).add(EnumTag.INSECT, 2);
|
||||
ResearchItem startNode = new ResearchItem("TBSTARTNODE", tags, 10, 0, ItemManager.miscResources.getStackForType(ResourceType.RESEARCH_StartNode))
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 9).add(EnumTag.MAGIC, 2).add(EnumTag.FLUX, 2);
|
||||
ResearchItem starkHint = new ResearchItem("STARKHINT", tags, 5, 2, ItemInterface.getItem("beeQueenGE"))
|
||||
.setParents(startNode)
|
||||
.registerResearchItem();
|
||||
|
||||
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);
|
||||
ResearchItem beeInfusion = new ResearchItem("BEEINFUSION", tags, 5, 3, ItemManager.miscResources.getStackForType(ResourceType.RESEARCH_BeeInfusion))
|
||||
.setParents(starkHint, ResearchList.getResearch("UTFT")).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.CROP, 20).add(EnumTag.EARTH, 10).add(EnumTag.WATER, 2);
|
||||
ResearchItem fertilizer = new ResearchItem("FERTILIZER", tags, 16, 0, ItemInterface.getItem("apatite"))
|
||||
.setParents(startNode)
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 10).add(EnumTag.TOOL, 6).add(EnumTag.INSECT, 15).add(EnumTag.BEAST, 2)
|
||||
.add(EnumTag.MAGIC, 5);
|
||||
ResearchItem magicFrame = new ResearchItem("HIVEFRAME", tags, 10, -2, ItemManager.hiveFrameMagic)
|
||||
.setParents(startNode)
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 15).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6)
|
||||
.add(EnumTag.MAGIC, 8);
|
||||
ResearchItem magicFrame2 = new ResearchItem("HIVEFRAME2", tags, 8, -2, ItemManager.hiveFrameResilient)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 15).add(EnumTag.LIFE, 5).add(EnumTag.EXCHANGE, 6)
|
||||
.add(EnumTag.HEAL, 2).add(EnumTag.FLOWER, 6);
|
||||
ResearchItem gentleFrame = new ResearchItem("HIVEFRAMEGENTLE", tags, 12, -2, ItemManager.hiveFrameGentle)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 15).add(EnumTag.LIFE, 12).add(EnumTag.EXCHANGE, 6)
|
||||
.add(EnumTag.MAGIC, 8).add(EnumTag.MOTION, 5).add(EnumTag.FLESH, 3);
|
||||
ResearchItem metabolicFrame = new ResearchItem("HIVEFRAMEMETA", tags, 9, -3, ItemManager.hiveFrameMetabolic)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 15).add(EnumTag.DEATH, 15).add(EnumTag.EXCHANGE, 6)
|
||||
.add(EnumTag.MAGIC, 8).add(EnumTag.POISON, 6);
|
||||
ResearchItem necroticFrame = new ResearchItem("HIVEFRAMENECRO", tags, 11, -3, ItemManager.hiveFrameNecrotic)
|
||||
.setParents(magicFrame).setHidden()
|
||||
.registerResearchItem();
|
||||
|
||||
/*ItemStack iconStack = BlockInterface.getBlock("soil");
|
||||
tags = new ObjectTags().add(EnumTag.EARTH, 10).add(EnumTag.WOOD, 4);
|
||||
ResearchItem humus = new ResearchItem("HUMUS", tags, 9, -1, iconStack)
|
||||
.setParents(startNode)
|
||||
.registerResearchItem();
|
||||
|
||||
iconStack = BlockInterface.getBlock("soil");
|
||||
iconStack.setItemDamage(1);
|
||||
tags = new ObjectTags().add(EnumTag.EARTH, 10).add(EnumTag.WATER, 4).add(EnumTag.CROP, 4);
|
||||
ResearchItem bogEarth = new ResearchItem("BOGEARTH", tags, 9, -1, iconStack)
|
||||
.setParents(startNode)
|
||||
.registerResearchItem();*/
|
||||
}
|
||||
|
||||
public static void setupCrafting()
|
||||
{
|
||||
ItemStack output = ItemManager.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
|
||||
ItemStack inputA = ItemInterface.getItem("apatite");
|
||||
ObjectTags tags = (new ObjectTags()).add(EnumTag.CROP, 12);
|
||||
output.stackSize = 2;
|
||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("FERTILIZER", "FERTILIZER", 5, tags, output, new Object[] {
|
||||
inputA
|
||||
});
|
||||
|
||||
output = new ItemStack(ItemManager.hiveFrameMagic);
|
||||
inputA = ItemInterface.getItem("frameUntreated");
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8);
|
||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAME", "FRAMEMAGIC", 50, tags, output, new Object[] {
|
||||
inputA
|
||||
});
|
||||
|
||||
output = new ItemStack(ItemManager.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', ItemManager.hiveFrameMagic,
|
||||
'i', Item.ingotIron
|
||||
});
|
||||
|
||||
output = new ItemStack(ItemManager.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(ItemManager.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(ItemManager.hiveFrameNecrotic);
|
||||
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12).add(EnumTag.DEATH, 10)
|
||||
.add(EnumTag.POISON, 5);
|
||||
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMENECRO", "FRAMENECROTIC", 50, tags, output, new Object[] {
|
||||
" S ", "SxS", " S ",
|
||||
'S', Item.rottenFlesh,
|
||||
'x', inputA
|
||||
});
|
||||
}
|
||||
|
||||
public static void setupBeeInfusions(World world)
|
||||
{
|
||||
ItemStack drone = BeeGenomeManager.getBeeNBTForSpecies(Allele.Stark, EnumBeeType.DRONE);
|
||||
ItemStack princess = BeeGenomeManager.getBeeNBTForSpecies(Allele.Stark, EnumBeeType.PRINCESS);
|
||||
ItemStack airDrone = Allele.Air.getBeeItem(world, EnumBeeType.DRONE);
|
||||
ItemStack airPrincess = Allele.Air.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||
ItemStack waterDrone = Allele.Water.getBeeItem(world, EnumBeeType.DRONE);
|
||||
ItemStack waterPrincess = Allele.Water.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||
ItemStack earthDrone = Allele.Earth.getBeeItem(world, EnumBeeType.DRONE);
|
||||
ItemStack earthPrincess = Allele.Earth.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||
ItemStack fireDrone = Allele.Fire.getBeeItem(world, EnumBeeType.DRONE);
|
||||
ItemStack firePrincess = Allele.Fire.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||
ItemStack magicDrone = Allele.Infused.getBeeItem(world, EnumBeeType.DRONE);
|
||||
ItemStack magicPrincess = Allele.Infused.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||
|
||||
String researchKey = "BEEINFUSION";
|
||||
|
||||
ObjectTags tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 20);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION1", airDrone,
|
||||
new ItemStack[] { drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.AIR.ordinal())},
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION2", airPrincess,
|
||||
new ItemStack[] { princess , new ItemStack(ItemManager.tcShard, 1, TCShardType.AIR.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
|
||||
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 20);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION3", fireDrone, new Object[]
|
||||
{ drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.FIRE.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION4", firePrincess, new Object[]
|
||||
{ princess, new ItemStack(ItemManager.tcShard, 1, TCShardType.FIRE.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
|
||||
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 20);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION5", waterDrone, new Object[]
|
||||
{ drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.WATER.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION6", waterPrincess, new Object[]
|
||||
{ princess, new ItemStack(ItemManager.tcShard, 1, TCShardType.WATER.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
|
||||
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 20);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION7", earthDrone, new Object[]
|
||||
{ drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.EARTH.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION8", earthPrincess, new Object[]
|
||||
{ princess, new ItemStack(ItemManager.tcShard, 1, TCShardType.EARTH.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 40).add(EnumTag.FLUX, 20);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION9", magicDrone, new Object[]
|
||||
{ drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.MAGIC.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION0", magicPrincess, new Object[]
|
||||
{ princess, new ItemStack(ItemManager.tcShard, 1, TCShardType.MAGIC.ordinal()) },
|
||||
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||
}
|
||||
|
||||
public static void registerResearch()
|
||||
{
|
||||
ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "research.xml");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user