Compare commits

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

Deleting block classes from this branch, because GO AWAY.
2013-03-04 13:18:15 -08:00
MysteriousAges f21bd467c2 Uncommenting blocks in Config. 2013-03-04 13:10:21 -08:00
MysteriousAges d3e93188c0 Edits to build.xml & mod info. 2013-03-04 13:09:50 -08:00
MysteriousAges e92d9c131e Merge from master. 2013-03-04 13:04:21 -08:00
MysteriousAges 1bee56adf3 Die, build.number. You don't need to be tracked. 2013-03-04 13:03:15 -08:00
MysteriousAges 85a2723ef8 Checkin before moving Apiary stuff to branch. 2013-03-04 13:02:15 -08:00
MysteriousAges 29069e7e9f Grafter & Scoop~! 2013-03-03 23:50:29 -08:00
MysteriousAges c8be483bf0 Merge branch 'master' of bitbucket.org:MysteriousAges/thaumicbees
Conflicts:
	thaumicbees_src/thaumicbees/main/Config.java
2013-02-27 19:29:18 -08:00
MysteriousAges 92ace4e9a3 Scoop work. 2013-02-27 17:49:32 -08:00
MysteriousAges aed979a19f dev 2013-02-26 17:56:57 -08:00
MysteriousAges 0fa9a6ed23 New capsule, more refactoring. More research. More config options for capsule stack size 2013-02-22 16:14:17 -08:00
MysteriousAges b3660ecf58 Removing build number from repo. 2013-02-18 12:37:37 -08:00
MysteriousAges 5eb787352b Planks & Refactoring. 2013-02-18 12:13:31 -08:00
MysteriousAges a7774e1fca Loc problems getting fixed. 2013-02-15 13:00:30 -08:00
MysteriousAges 596ae798ec Initial commit. en_US only. 2013-02-12 17:34:33 -08:00
MysteriousAges 902812e015 Starting Localization! Yaaaaaaaaaay 2013-02-12 17:21:29 -08:00
MysteriousAges 0b510e8426 Tweaking the flux & purify bee effect
Commenting out Magic Apiary blocks for a release version.
2013-02-12 13:40:18 -08:00
MysteriousAges d4c5d1e356 Forestry API break not public yet. 2013-02-12 13:13:37 -08:00
MysteriousAges 5a2f360e50 Another FC build.
*Heavily refactored bee code. Much cleaner now I think.
*Temporal bee branch complete, now with more Doctor Who!
2013-02-09 14:12:43 -08:00
MysteriousAges 84ad8b0d7b Lots of work... None of it actually on machines. 2013-02-06 00:33:51 -08:00
MysteriousAges 6a26bec4e1 Fucktons of refactoring.
*Moving ItemManager & BlockManager functionality into Config object.
*New CraftingManager to hold all the crafting stuff
*Shuffling some classes around in packages and whatnot.
*Switching to use the ItemInterface provided by Thaumcraft's API rather than reading configs.
*New texture stuff for a magic apiary.
2013-02-05 01:16:01 -08:00
MysteriousAges 827199b518 :P 2013-02-03 23:44:12 -08:00
150 changed files with 6159 additions and 2354 deletions

No files matched your search

-3
View File
@@ -1,3 +0,0 @@
#Build Number for ANT. Do not edit!
#Wed Jan 30 12:06:05 PST 2013
build.number=103
+23 -18
View File
@@ -15,9 +15,9 @@
<property name="clientsrc.dir" value="${mcp.dir}/src/minecraft" />
<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="mc.version" value="1.5.1"/>
<property name="forge.version" value="7.7.1.651"/>
<property name="thaumicbees.version" value="1.4.4b"/>
<!-- for local deployment only, not used by main -->
<property name="deploy.type" value="previews" />
@@ -71,16 +71,17 @@
<include name="forestry/api/**" />
</fileset>
<fileset dir="${thaumcraft.dir}/">
<include name="thaumcraft/**" />
<include name="thaumcraft/api/**" />
</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>
@@ -108,22 +108,24 @@
<!-- Reobf -->
<exec dir="${mcp.dir}" executable="cmd" osfamily="windows">
<arg line="/c reobfuscate.bat"/>
<arg line="/c reobfuscate_srg.bat"/>
</exec>
<exec dir="${mcp.dir}" executable="sh" osfamily="unix">
<arg value="reobfuscate.sh" />
<arg value="reobfuscate.sh_srg" />
</exec>
<!-- 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 -->
+92
View File
@@ -1,3 +1,95 @@
1.4.5
Added the Jade Moon Dial - tells you what moon phase it currently is for breeding purposes.
Added a creative menu tab for certain Thaumic Bees items - misc resources, capsules, tools.
1.4.4b
Ported to 1.5! Wooo!
1.4.4a
Fixed an isuse that caused GregTech to crash.
1.4.4
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.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

@@ -1 +0,0 @@
storage.backpack.Thaumaturge=Thaumaturge's Backpack
+246
View File
@@ -0,0 +1,246 @@
<?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.thaumicbees:jellyBabies.name">Handful of Jelly Babies</entry>
<entry key="item.thaumicbees:thaumiumScoop.name">Thaumium Scoop</entry>
<entry key="item.thaumicbees:thaumiumGrafter.name">Thaumium Grafter</entry>
<entry key="item.moonDial.name">Jade Moon Dial</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.startNode">Bees and Magic</entry>
<entry key="tb.resource.beeEnchant">Stark Infusion</entry>
<entry key="tb.resource.crystalFlux">Crystalized %s Aspect</entry>
<!-- Frames -->
<entry key="item.frameMagic.name">Magic Frame</entry>
<entry key="item.frameResilient.name">Resilient Frame</entry>
<entry key="item.frameGentle.name">Gentle Frame</entry>
<entry key="item.frameMetabolic.name">Metabolic Frame</entry>
<entry key="item.frameNecrotic.name">Necrotic Frame</entry>
<entry key="item.frameTemporal.name">Temporal Frame</entry>
<entry key="item.frameOblivion.name">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.gibbousWaxing">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>
<entry key="itemGroup.thaumicBees">Thaumic Bees</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">Not all that glitters is gold.|Ancient Aphorism</entry>
<entry key="thaumicbees.speciesCopper">Copper</entry>
<entry key="thaumicbees.speciesCopper.description">A base metal common in many applications; these bees are helpful for resource-starved magicians.|Apinomicon</entry>
<entry key="thaumicbees.speciesTin">Tin</entry>
<entry key="thaumicbees.speciesTin.description">While metalic, these bees are suprisingly fragile.|Apinomicon</entry>
<entry key="thaumicbees.speciesSilver">Silver</entry>
<entry key="thaumicbees.speciesSilver.description">While they do not recieve as much attention as Golden bees, they are nonetheless valuable.|Apinomicon</entry>
<entry key="thaumicbees.speciesLead">Lead</entry>
<entry key="thaumicbees.speciesLead.description">A favourite of amateur alchemists, they believe they can transform these bees into gold.|Apinomicon</entry>
<entry key="thaumicbees.speciesDiamond">Diamond</entry>
<entry key="thaumicbees.speciesDiamond.description">Crystalline, glittering, and harder than dragon's teeth. These bees are none of those.|Apinomicon</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>
+5 -4
View File
@@ -1,11 +1,12 @@
[
{
"modid": "ThaumicBees",
"version": "@MODVERSION@",
"name": "ThaumicBees",
"url": "http://www.minecraftforum.net/topic/1623692-thaumicbees-beekeeping-is-magic/",
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
"url": "http://bit.ly/XFDvLY",
"description": "Magic bees & more. Supports Thaumcraft, Equivalent Exchange 3",
"authors": [ "MysteriousAges" ],
"credits": "Thanks to Sengir and Azanor for awesome mods! Also thanks to Binnie and Florastar. (:",
"logoFile": "/gfx/thaumicbees/logo.png"
"credits": "SirSengir, Azanor, Binnie & the Forestry Dev peeps",
"logoFile": "/mods/thaumicbees/textures/logo.png"
}
]
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

File renamed without changes.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

@@ -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,211 @@
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() { }
@Override
public boolean isInvNameLocalized() {
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isStackValidForSlot(int i, ItemStack itemstack) {
// TODO Auto-generated method stub
return false;
}
}
@@ -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;
}
}
@@ -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
@@ -44,14 +45,14 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
public IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
{
int[] area = genome.getTerritory();
float mod = housing.getTerritoryModifier(genome);
float mod = housing.getTerritoryModifier(genome, 1f);
// Check to make sure territory is at least 1 with housing modifications
area[0] = Math.max((int)(area[0] * mod), 1);
area[1] = Math.max((int)(area[1] * mod), 1);
area[2] = Math.max((int)(area[2] * mod), 1);
ThaumicBees.proxy.drawBeeEffects(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(),
genome.getPrimaryAsBee().getPrimaryColor(), area[0], area[1], area[2]);
genome.getPrimaryAsBee().getIconColour(0), area[0], area[1], area[2]);
return storedData;
}
@@ -84,7 +85,7 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
min[2] = housing.getZCoord() - area[2] / 2;
max[2] = housing.getZCoord() + area[2] / 2;
AxisAlignedBB bounds = AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(min[0], min[1], min[2], max[0], max[1], max[2]);
AxisAlignedBB bounds = AxisAlignedBB.getAABBPool().getAABB(min[0], min[1], min[2], max[0], max[1], max[2]);
return housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, bounds);
}
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import java.lang.reflect.Method;
@@ -11,14 +11,14 @@ import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodeGrow extends AlleleEffect
public class AlleleEffectAuraNodeAttract extends AlleleEffect
{
private int throttle;
public AlleleEffectAuraNodeGrow(String id, String identifier, boolean isDominant, int timeout)
public AlleleEffectAuraNodeAttract(String id, boolean isDominant, int timeout)
{
super(id, isDominant, identifier);
super(id, isDominant);
this.throttle = timeout;
}
@@ -39,7 +39,7 @@ public class AlleleEffectAuraNodeGrow extends AlleleEffect
if (value >= throttle)
{
World w = housing.getWorld();
if (w.rand.nextInt(20) < 1)
if (w.rand.nextInt(10) < 1)
{
float x = housing.getXCoord();
float y = housing.getYCoord();
@@ -48,7 +48,7 @@ public class AlleleEffectAuraNodeGrow extends AlleleEffect
if (nodeId != -1)
{
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
if (node.level >= node.baseLevel * 3 / 4)
if (node.level >= node.baseLevel * 4 / 5)
{
x = (float)(x - node.xPos);
y = (float)(y - node.yPos);
@@ -59,11 +59,11 @@ public class AlleleEffectAuraNodeGrow extends AlleleEffect
y = y / distance;
z = z / distance;
x *= 0.0125f;
y *= 0.0125f;
z *= 0.0125f;
x *= 0.05f;
y *= 0.05f;
z *= 0.05f;
ThaumcraftApi.queueNodeChanges(nodeId, node.level * -3 / 8, w.rand.nextInt(1), false, null, x, y, z);
ThaumcraftApi.queueNodeChanges(nodeId, node.baseLevel * -1 / 13, w.rand.nextInt(2), false, null, x, y, z);
}
}
}
@@ -0,0 +1,59 @@
package thaumicbees.bees;
import net.minecraft.world.World;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodeCharge extends AlleleEffect
{
private int effectTimeout;
AlleleEffectAuraNodeCharge(String id, boolean dominant, int timeout)
{
super(id, dominant);
this.effectTimeout = timeout;
}
@Override
public IEffectData validateStorage(IEffectData storedData)
{
if (storedData == null)
{
storedData = new EffectData(1, 0, 0);
}
return storedData;
}
@Override
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
{
int timeout = storedData.getInteger(0);
if (timeout >= this.effectTimeout)
{
World world = housing.getWorld();
int x = housing.getXCoord();
int y = housing.getYCoord();
int z = housing.getZCoord();
EnumTag tag;
do
{
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
}
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
ThaumcraftApi.increaseLowestAura(world, x, y, z, 1);
}
else
{
storedData.setInteger(0, timeout + 1);
}
return storedData;
}
}
@@ -0,0 +1,65 @@
package thaumicbees.bees;
import net.minecraft.world.World;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodeFlux extends AlleleEffect
{
private int effectTimeout;
private int nodeRange;
AlleleEffectAuraNodeFlux(String id, boolean dominant, int timeout, int range)
{
super(id, dominant);
this.effectTimeout = timeout;
this.nodeRange = range;
}
@Override
public IEffectData validateStorage(IEffectData storedData)
{
if (storedData == null)
{
storedData = new EffectData(1, 0, 0);
}
return storedData;
}
@Override
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
{
int timeout = storedData.getInteger(0);
if (timeout >= this.effectTimeout)
{
World world = housing.getWorld();
int x = housing.getXCoord();
int y = housing.getYCoord();
int z = housing.getZCoord();
EnumTag tag;
do
{
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
}
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
if (nodeId != -1)
{
int quantity = world.rand.nextInt(2) + 1;
ThaumcraftApi.queueNodeChanges(nodeId, 0, 0, false, new ObjectTags().add(tag, quantity), 0f, 0f, 0f);
}
}
else
{
storedData.setInteger(0, timeout + 1);
}
return storedData;
}
}
@@ -0,0 +1,75 @@
package thaumicbees.bees;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import thaumcraft.api.AuraNode;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.Config;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodePurify extends AlleleEffect
{
private int effectTimeout;
private int nodeRange;
public AlleleEffectAuraNodePurify(String id, boolean dominant, int timeout, int range)
{
super(id, dominant);
this.effectTimeout = timeout;
this.nodeRange = range;
}
@Override
public IEffectData validateStorage(IEffectData storedData)
{
if (storedData == null)
{
storedData = new EffectData(1, 0, 0);
}
return storedData;
}
@Override
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
{
int timeout = storedData.getInteger(0);
if (timeout >= this.effectTimeout)
{
World world = housing.getWorld();
int x = housing.getXCoord();
int y = housing.getYCoord();
int z = housing.getZCoord();
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
if (nodeId >= 0)
{
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
if (node != null)
{
int aspectCount = node.flux.tags.size();
if (aspectCount > 0)
{
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
if (selectedTag != null && housing.addProduct(new ItemStack(Config.solidFlux, 1, selectedTag.id), true))
{
node.flux.remove(selectedTag, 1);
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().remove(selectedTag, 1), 0, 0, 0);
}
}
}
}
storedData.setInteger(0, 0);
}
else
{
storedData.setInteger(0, timeout + 1);
}
return storedData;
}
}
@@ -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
@@ -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;
}
@@ -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);
}
}
@@ -200,9 +218,9 @@ public class AlleleEffectSpawnMob extends AlleleEffect
protected double[] randomMobSpawnCoords(World world, IBeeGenome bee, IBeeHousing housing)
{
double pos[] = new double[3];
pos[0] = housing.getXCoord() + (world.rand.nextDouble() * (bee.getTerritory()[0] * housing.getTerritoryModifier(bee)) - bee.getTerritory()[0] / 2);
pos[0] = housing.getXCoord() + (world.rand.nextDouble() * (bee.getTerritory()[0] * housing.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[0] / 2);
pos[1] = housing.getYCoord() + world.rand.nextInt(3) - 1;
pos[2] = housing.getZCoord() + (world.rand.nextDouble() * (bee.getTerritory()[2] * housing.getTerritoryModifier(bee)) - bee.getTerritory()[2] / 2);
pos[2] = housing.getZCoord() + (world.rand.nextDouble() * (bee.getTerritory()[2] * housing.getTerritoryModifier(bee, 1f)) - bee.getTerritory()[2] / 2);
return pos;
}
}
@@ -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
@@ -56,15 +53,11 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
// 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,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import forestry.api.apiculture.IAlleleFlowers;
import forestry.api.apiculture.IFlowerProvider;
@@ -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;
}
}
@@ -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");
@@ -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 float getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
{
float finalChance = 0f;
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, chance)
* BeeManager.breedingManager.getBeekeepingMode(housing.getWorld())
.getMutationModifier((IBeeGenome) genome0,
(IBeeGenome) genome1, chance));
}
return finalChance;
}
public IAllele getAllele0()
{
return parent1;
}
public IAllele getAllele1()
{
return parent2;
}
public IAllele[] getTemplate()
{
return mutationTemplate;
}
public float 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,595 @@
package thaumicbees.bees;
import java.util.HashMap;
import java.util.Locale;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraftforge.oredict.OreDictionary;
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 cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.apiculture.BeeManager;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.IIconProvider;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IClassification;
public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
{
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;
@SideOnly(Side.CLIENT)
private Icon[][] icons;
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);
}
@Override
public String getName()
{
return LocalizationManager.getLocalizedString(getUID());
}
@Override
public String getDescription()
{
return LocalizationManager.getLocalizedString(getUID() + ".description");
}
@Override
public EnumTemperature getTemperature()
{
return temperature;
}
@Override
public EnumHumidity getHumidity()
{
return humidity;
}
@Override
public boolean hasEffect()
{
return hasEffect;
}
public BeeSpecies setInactive()
{
this.isActive = false;
return this;
}
public boolean isActive()
{
return this.isActive;
}
@Override
public boolean isSecret()
{
return isSecret;
}
@Override
public boolean isCounted()
{
return isCounted;
}
@Override
public String getBinomial()
{
return binomial;
}
@Override
public String getAuthority()
{
return authority;
}
@Override
public IClassification getBranch()
{
return this.branch;
}
@Override
public HashMap getProducts()
{
return products;
}
@Override
public HashMap getSpecialty()
{
return specialty;
}
@Override
public String getUID()
{
return this.uid;
}
@Override
public boolean isDominant()
{
return this.dominant;
}
@Override
public boolean isJubilant(IBeeGenome genome, IBeeHousing housing)
{
return true;
}
private BeeSpecies register()
{
BeeManager.breedingManager.registerBeeTemplate(this.getGenome());
if (!this.isActive)
{
AlleleManager.alleleRegistry.blacklistAllele(this.getUID());
}
return this;
}
@Override
public int getIconColour(int renderPass)
{
int value = 0xffffff;
if (renderPass == 0) {
value = this.primaryColour;
}
else if (renderPass == 1) {
value = this.secondaryColour;
}
return value;
}
@Override
@SideOnly(Side.CLIENT)
public IIconProvider getIconProvider()
{
return this;
}
@Override
@SideOnly(Side.CLIENT)
public Icon getIcon(EnumBeeType type, int renderPass)
{
return icons[type.ordinal()][Math.min(renderPass, 2)];
}
public void registerItemIcons(IconRegister itemMap)
{
this.icons = new Icon[EnumBeeType.values().length][3];
Icon outline = itemMap.registerIcon(ForestryHelper.Name + ":bees/outline");
Icon body1 = itemMap.registerIcon(ForestryHelper.Name + ":bees/outline");
for (int i = 0; i < EnumBeeType.values().length; i++) {
if(EnumBeeType.values()[i] == EnumBeeType.NONE)
continue;
icons[i][0] = outline;
icons[i][1] = body1;
icons[i][2] = itemMap.registerIcon(ForestryHelper.Name + ":bees/" + EnumBeeType.values()[i].toString().toLowerCase(Locale.ENGLISH) + ".body2");
}
}
/// --------- Unused Functions ---------------------------------------------
@Override
@SideOnly(Side.CLIENT)
public Icon getIcon(short texUID)
{
return null;
}
@Override
@SideOnly(Side.CLIENT)
public void registerTerrainIcons(IconRegister terrainMap) { }
}
@@ -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.setBlockMetadataWithNotify(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;
@@ -14,7 +16,7 @@ public class FlowerProviderAuraNodeFlux extends FlowerProviderAuraNode
@Override
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
{
if (world.rand.nextInt(10) < 1)
if (world.rand.nextInt(20) < 1)
{
EnumTag tag;
do
@@ -37,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,16 +23,16 @@ 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)
{
if (world.rand.nextInt(10) < 1)
if (world.rand.nextInt(25) < 1)
{
AuraNode node = this.getNodeWithinRange(world, x, y, z);
if (node != null)
if (node != null && (1.0 * node.level) / node.baseLevel > 0.75)
{
int aspectCount = node.flux.tags.size();
if (aspectCount > 0)
@@ -40,8 +41,8 @@ public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode
if (selectedTag != null)
{
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));
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.setBlockMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.SHIMMERLEAF.ordinal());
flag = true;
}
else if (blockDown == Block.sand.blockID)
{
world.setBlockMetadataWithNotify(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,42 +0,0 @@
package thaumicbees.bees;
import net.minecraft.world.World;
/**
* Class to abstract the moon phase from the world time a bit.
*/
public enum MoonPhase
{
FULL,
WANING_GIBBOUS,
WANING_HALF,
WANING_CRESCENT,
NEW,
WAXING_CRESCENT,
WAXING_HALF,
WAXING_GIBBOUS;
public boolean isBetween(MoonPhase first, MoonPhase second)
{
boolean flag = false;
if (first.ordinal() <= second.ordinal())
{
// Straightforward.
flag = first.ordinal() <= this.ordinal() && this.ordinal() <= second.ordinal();
}
else
{
// Wraps around the boundary.
flag = (first.ordinal() <= this.ordinal() && this.ordinal() <= WAXING_GIBBOUS.ordinal()) ||
(FULL.ordinal() <= this.ordinal() && this.ordinal() <= second.ordinal());
}
return flag;
}
public static MoonPhase getMoonPhase(World w)
{
return MoonPhase.values()[(int)(w.getWorldTime() / 24000L) % 8];
}
}
@@ -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 magical = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "thaumis", "Thaumis");
magical.setParent(familyBee);
Allele.Stark = new BeeSpecies("Stark", "\"These are unusually attracted to shards. This warrents further investigation.\"|Azanor, Master Thaumaturge",
"torridae", magical, 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());
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, 12);
BeeMutation.Vis = new BeeMutation(Allele.Aware, Allele.Arcane, Allele.Vis, 7)
.setAuraNodeRequired(40);
BeeMutation.Vis1 = new BeeMutation(Allele.Aware, Allele.Stark, Allele.Vis, 12)
.setAuraNodeRequired(80);
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,211 +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 Vis1;
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)
{
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);
}
}
@@ -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,66 @@
package thaumicbees.block;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import thaumicbees.item.types.PlankType;
import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.VersionInfo;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockPlanks extends Block
{
@SideOnly(Side.CLIENT)
private Icon[] icons = new Icon[PlankType.values().length];
public BlockPlanks(int id)
{
super(id, Material.wood);
this.setHardness(2.5f);
this.setResistance(6.0f);
this.setUnlocalizedName("tb.planks");
this.setCreativeTab(CreativeTabs.tabBlock);
if (ThaumicBees.getConfig().AreMagicPlanksFlammable)
{
Block.setBurnProperties(id, 5, 20);
}
}
@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()));
}
}
@SideOnly(Side.CLIENT)
@Override
public Icon getIcon(int side, int meta)
{
return this.icons[Math.max(0, Math.min(meta & 7, icons.length-1))];
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
for (PlankType t : PlankType.values())
{
this.icons[t.ordinal()] = par1IconRegister.registerIcon(VersionInfo.ModName + ":" + t.name);
}
}
}
@@ -0,0 +1,80 @@
package thaumicbees.block;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.BlockHalfSlab;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import thaumicbees.item.types.PlankType;
import thaumicbees.main.Config;
import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.VersionInfo;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockWoodSlab extends BlockHalfSlab
{
@SideOnly(Side.CLIENT)
private Icon[] icons = new Icon[PlankType.values().length];
public BlockWoodSlab(int id, boolean doubleSlab)
{
super(id, doubleSlab, Material.wood);
this.setHardness(2.5f);
this.setResistance(6.0f);
this.setUnlocalizedName("tb.slab.wood");
this.setCreativeTab(CreativeTabs.tabBlock);
this.setLightOpacity(doubleSlab ? 255 : 0);
if (ThaumicBees.getConfig().AreMagicPlanksFlammable)
{
Block.setBurnProperties(id, 5, 20);
}
}
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.getUnlocalizedName() + "." + 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()));
}
}
@SideOnly(Side.CLIENT)
@Override
public Icon getIcon(int side, int meta)
{
return this.icons[Math.max(0, Math.min(meta & 7, icons.length-1))];
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
for (PlankType t : PlankType.values())
{
this.icons[t.ordinal()] = par1IconRegister.registerIcon(VersionInfo.ModName + ":" + t.name);
}
}
}
@@ -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;
}
}
@@ -56,4 +56,10 @@ public class ItemArmorApiarist extends Item implements IArmorApiarist
ItemStack armorItem = player.inventory.armorInventory[0];
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
}
@Override
public boolean protectPlayer(EntityPlayer player, ItemStack armor, String cause, boolean doProtect)
{
return false;
}
}
@@ -8,13 +8,19 @@ import forestry.api.core.Tabs;
import forestry.api.recipes.RecipeManagers;
import thaumicbees.item.types.CapsuleType;
import thaumicbees.item.types.LiquidType;
import thaumicbees.item.types.PlankType;
import thaumicbees.main.CommonProxy;
import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.TabThaumicBees;
import thaumicbees.main.utils.VersionInfo;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumMovingObjectType;
import net.minecraft.util.Icon;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.liquids.LiquidContainerData;
@@ -26,13 +32,13 @@ 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.setCreativeTab(TabThaumicBees.tabThaumicBees);
this.setHasSubtypes(true);
this.setMaxStackSize(maxStackSize);
}
public CapsuleType getType()
@@ -43,7 +49,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.getLocalizedName();
}
public ItemStack getCapsuleForLiquid(LiquidType l)
@@ -70,26 +76,36 @@ public class ItemCapsule extends Item
{
return true;
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":capsule" + this.capsuleType.getName().substring(0, 1).toUpperCase()
+ this.capsuleType.getName().substring(1));
for (LiquidType t : LiquidType.values())
{
if (t != LiquidType.EMPTY && t.liquidIcon == null)
{
t.liquidIcon = par1IconRegister.registerIcon(VersionInfo.ModName.toLowerCase() + ":liquids/" + t.liquidID);
}
}
}
@Override
@SideOnly(Side.CLIENT)
public int getIconFromDamageForRenderPass(int metadata, int pass)
public Icon getIconFromDamageForRenderPass(int metadata, int pass)
{
int index = 0;
if (pass == 0)
Icon i = this.itemIcon;
if (metadata != 0 && pass == 0)
{
index = LiquidType.values()[metadata].iconIdx;
i = LiquidType.values()[Math.max(0, Math.min(metadata, LiquidType.values().length - 1))].liquidIcon;
}
else
{
index = capsuleType.iconIdx;
}
return index;
return i;
}
@Override
public int getRenderPasses(int metadata)
{
return 2;
return (metadata == 0) ? 1 : 2;
}
}
Loaded 100 of 150 files, more files were not shown because too many files have changed in this diff. Show more