mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5279a6e64a | ||
|
|
2c2306b223 | ||
|
|
e32c05ab3e | ||
|
|
f21bd467c2 | ||
|
|
d3e93188c0 | ||
|
|
e92d9c131e | ||
|
|
1bee56adf3 | ||
|
|
85a2723ef8 | ||
|
|
29069e7e9f | ||
|
|
c8be483bf0 | ||
|
|
92ace4e9a3 | ||
|
|
aed979a19f | ||
|
|
0fa9a6ed23 | ||
|
|
b3660ecf58 | ||
|
|
5eb787352b | ||
|
|
a7774e1fca | ||
|
|
902812e015 | ||
|
|
0b510e8426 | ||
|
|
d4c5d1e356 | ||
|
|
5a2f360e50 | ||
|
|
84ad8b0d7b | ||
|
|
6a26bec4e1 | ||
|
|
827199b518 | ||
|
|
ead879a913 | ||
|
|
47a2962bd6 | ||
|
|
105a8d47a0 | ||
|
|
ad16a3b999 | ||
|
|
63bb014de8 | ||
|
|
dc40994271 | ||
|
|
efc2309222 | ||
|
|
eafc34cb54 | ||
|
|
4125bbf647 | ||
|
|
bb5319f177 | ||
|
|
f3c933a537 | ||
|
|
2e6964af8e | ||
|
|
b49fbd7ccc | ||
|
|
41bc9d10f8 | ||
|
|
e6ac4e0b00 | ||
|
|
25024fc91f | ||
|
|
e40ac6b1e3 | ||
|
|
5d3053ea8d | ||
|
|
47e00474d0 |
No files matched your search
BIN
Binary file not shown.
|
After Width: | Height: | Size: 7.6 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,3 +0,0 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
|
||||||
#Sat Dec 29 20:28:23 PST 2012
|
|
||||||
build.number=34
|
|
||||||
+35
-27
@@ -1,7 +1,7 @@
|
|||||||
<project name="ThaumicBees" basedir="../../" default="main">
|
<project name="ThaumicBees" basedir="../../" default="main">
|
||||||
<property name="build.dir" value="build" />
|
<property name="build.dir" value="build" />
|
||||||
<property name="classes.dir" value="${build.dir}/classes" />
|
<property name="classes.dir" value="${build.dir}/classes" />
|
||||||
<property name="resource.dir" value="mc.devel" />
|
<property name="resource.dir" value="${build.dir}/mc.devel" />
|
||||||
<property name="jar.dir" value="${build.dir}/jar" />
|
<property name="jar.dir" value="${build.dir}/jar" />
|
||||||
|
|
||||||
<property name="src.dir" value="ThaumicBees" />
|
<property name="src.dir" value="ThaumicBees" />
|
||||||
@@ -9,22 +9,22 @@
|
|||||||
|
|
||||||
<property name="forge.dir" value="${build.dir}/forge" />
|
<property name="forge.dir" value="${build.dir}/forge" />
|
||||||
<property name="mcp.dir" value="${forge.dir}/mcp" />
|
<property name="mcp.dir" value="${forge.dir}/mcp" />
|
||||||
<property name="forestry.dir" value="ForestryApi-1.6.4" />
|
<property name="forestry.dir" value="Forestry/forestry_common/core" />
|
||||||
<property name="thaumcraft.dir" value="Thaumcraft" />
|
<property name="thaumcraft.dir" value="Thaumcraft" />
|
||||||
<property name="extrabiomes.dir" value="ExtraBiomes" />
|
<property name="extrabiomes.dir" value="ExtraBiomes" />
|
||||||
|
|
||||||
<property name="clientsrc.dir" value="${mcp.dir}/src/minecraft" />
|
<property name="clientsrc.dir" value="${mcp.dir}/src/minecraft" />
|
||||||
|
|
||||||
<property name="mc.version" value="1.4.6"/>
|
<property name="mc.version" value="1.4.7"/>
|
||||||
<property name="forge.version" value="6.5.0.473"/>
|
<property name="forge.version" value="6.6.0.507"/>
|
||||||
<property name="thaumicbees.version" value="0.9.0"/>
|
<property name="thaumicbees.version" value="1.4.3"/>
|
||||||
|
|
||||||
<!-- for local deployment only, not used by main -->
|
<!-- for local deployment only, not used by main -->
|
||||||
<property name="deploy.type" value="previews" />
|
<property name="deploy.type" value="previews" />
|
||||||
<property name="deploy.root" value="C:\Users\Marc\Dropbox\Public\ThaumicBees" />
|
<property name="deploy.root" value="C:\Users\Marc\Dropbox\Public\ThaumicBees" />
|
||||||
<property name="deploy.dir" value="${deploy.root}\${deploy.type}" />
|
<property name="deploy.dir" value="${deploy.root}\${deploy.type}" />
|
||||||
<property name="share.dir" value="C:\Users\Marc\Dropbox\Shared\ThaumicBees" />
|
<property name="share.dir" value="C:\Users\Marc\Dropbox\Shared\ThaumicBees" />
|
||||||
<property name="local.dir" value="D:\Games\Minecraft\MultiMC\instances\1.4.6test\minecraft\mods" />
|
<property name="local.dir" value="D:\Games\Minecraft\MultiMC\instances\1.4.6 pure\minecraft\mods" />
|
||||||
|
|
||||||
<!-- TARGETS -->
|
<!-- TARGETS -->
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
@@ -32,30 +32,32 @@
|
|||||||
<delete dir="${clientsrc.dir}/forestry" />
|
<delete dir="${clientsrc.dir}/forestry" />
|
||||||
<delete dir="${clientsrc.dir}/thaumcraft" />
|
<delete dir="${clientsrc.dir}/thaumcraft" />
|
||||||
<delete dir="${clientsrc.dir}/thaumicbees" />
|
<delete dir="${clientsrc.dir}/thaumicbees" />
|
||||||
|
<delete dir="${classes.dir}" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="setup">
|
<target name="forgeclean">
|
||||||
|
|
||||||
<!-- Unzip forge -->
|
<!-- Unzip forge -->
|
||||||
<!--<echo message="Unpacking Forge..." />
|
<echo message="Unpacking Forge..." />
|
||||||
<unzip dest="${build.dir}">
|
<unzip dest="${build.dir}">
|
||||||
<fileset dir="${resource.dir}">
|
<fileset dir="${resource.dir}">
|
||||||
<include name="minecraftforge-src-${mc.version}-${forge.version}.zip"/>
|
<include name="minecraftforge-src-${mc.version}-${forge.version}.zip"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</unzip>
|
</unzip>
|
||||||
|
|
||||||
<chmod file="${forge.dir}/install.sh" perm="+x"/> -->
|
<chmod file="${forge.dir}/install.sh" perm="+x"/>
|
||||||
|
|
||||||
<!-- Install forge -->
|
<!-- Install forge -->
|
||||||
<!--<echo message="Installing Forge..." />
|
<echo message="Installing Forge..." />
|
||||||
<exec dir="${forge.dir}" executable="cmd" osfamily="windows">
|
<exec dir="${forge.dir}" executable="cmd" osfamily="windows">
|
||||||
<arg line="/c install.cmd"/>
|
<arg line="/c install.cmd"/>
|
||||||
</exec>
|
</exec>
|
||||||
|
|
||||||
<exec dir="${forge.dir}" executable="sh" osfamily="unix">
|
<exec dir="${forge.dir}" executable="sh" osfamily="unix">
|
||||||
<arg value="install.sh" />
|
<arg value="install.sh" />
|
||||||
</exec> -->
|
</exec>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="setup">
|
||||||
<!-- Set build number -->
|
<!-- Set build number -->
|
||||||
<buildnumber file="${src.dir}/thaumicbees_res/build.number"/>
|
<buildnumber file="${src.dir}/thaumicbees_res/build.number"/>
|
||||||
|
|
||||||
@@ -69,17 +71,17 @@
|
|||||||
<include name="forestry/api/**" />
|
<include name="forestry/api/**" />
|
||||||
</fileset>
|
</fileset>
|
||||||
<fileset dir="${thaumcraft.dir}/">
|
<fileset dir="${thaumcraft.dir}/">
|
||||||
<exclude name="**/resources/**" />
|
<include name="thaumcraft/**" />
|
||||||
<exclude name="**/sound/**" />
|
|
||||||
</fileset>
|
</fileset>
|
||||||
<fileset dir="${src.dir}/thaumicbees_src">
|
<fileset dir="${src.dir}/thaumicbees_src">
|
||||||
|
<include name="**/net/mysteriousages/**" />
|
||||||
<include name="**/thaumicbees/**" />
|
<include name="**/thaumicbees/**" />
|
||||||
<include name="**/forestry/**" />
|
<include name="**/forestry/**" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<copy todir="${clientsrc.dir}" overwrite="true" failonerror="true">
|
<copy todir="${clientsrc.dir}" overwrite="true" failonerror="true">
|
||||||
<fileset dir="${src.dir}/thaumicbees_src">
|
<fileset dir="${src.dir}/thaumicbees_src">
|
||||||
<include name="**/VersionInfo.java" />
|
<include name="**/VersionInfo.java" />
|
||||||
</fileset>
|
</fileset>
|
||||||
<filterset>
|
<filterset>
|
||||||
@@ -87,7 +89,7 @@
|
|||||||
<filter token="VERSION" value="${thaumicbees.version}" />
|
<filter token="VERSION" value="${thaumicbees.version}" />
|
||||||
<filter token="BUILD_NUMBER" value="${build.number}" />
|
<filter token="BUILD_NUMBER" value="${build.number}" />
|
||||||
<filter token="FINGERPRINT" value="${key.fingerprint}" />
|
<filter token="FINGERPRINT" value="${key.fingerprint}" />
|
||||||
<filter token="MODVERSION" value="${VERSION}-${BUILD_NUMBER}" />
|
<filter token="MODVERSION" value="${thaumicbees.version} - ${build.number}" />
|
||||||
</filterset>
|
</filterset>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
@@ -118,25 +120,31 @@
|
|||||||
<copy todir="${classes.dir}/client">
|
<copy todir="${classes.dir}/client">
|
||||||
<fileset dir="${mcp.dir}/reobf/minecraft">
|
<fileset dir="${mcp.dir}/reobf/minecraft">
|
||||||
<include name="**/thaumicbees/**" />
|
<include name="**/thaumicbees/**" />
|
||||||
<include name="**/forestry/api/**" />
|
|
||||||
<include name="**/forestry/plugins/**" />
|
<include name="**/forestry/plugins/**" />
|
||||||
<exclude name="**/thaumcraft/**" />
|
<include name="**/net/mysteriousages/**" />
|
||||||
|
|
||||||
|
<exclude name="forestry/api/**" />
|
||||||
|
<exclude name="thaumcraft/**" />
|
||||||
|
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
|
|
||||||
<!-- Copy Forestry resources -->
|
<!-- Copy ThaumicBees resources -->
|
||||||
<copy todir="${classes.dir}/client">
|
<copy todir="${classes.dir}/client">
|
||||||
<fileset dir="${src.dir}/thaumicbees_res">
|
<fileset dir="${src.dir}/thaumicbees_res">
|
||||||
<exclude name="build.xml"/>
|
<exclude name="build.xml"/>
|
||||||
<exclude name="build.number"/>
|
<exclude name="build.number"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>
|
||||||
<!-- Copy localizations -->
|
|
||||||
<copy todir="${classes.dir}/client">
|
<copy todir="${classes.dir}/client" overwrite="true" failonerror="true">
|
||||||
<fileset dir="${lang.dir}">
|
<fileset dir="${src.dir}/thaumicbees_res">
|
||||||
<exclude name="README.md"/>
|
<include name="**/mcmod.info" />
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
<filterset>
|
||||||
|
<filter token="MODVERSION" value="${thaumicbees.version} - ${build.number}" />
|
||||||
|
</filterset>
|
||||||
|
</copy>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Package the jars -->
|
<!-- Package the jars -->
|
||||||
|
|||||||
@@ -0,0 +1,90 @@
|
|||||||
|
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.
|
||||||
|
|
||||||
|
1.1.702-62
|
||||||
|
Added Magic Capsules!
|
||||||
|
Compatible with BuildCraft and Forestry liquids, they function almost the same way as refactory capsules, except that they can store 2 buckets' worth of liquid. As such, you cannot right-click with them to scoop up water or lava, but you can use them in bottlers, carpenters, Railcraft's Iron Tanks, Thermal Expansion's liquid transposers, and other things that support the Forge Liquid Dictionary. They can be useful for storing larger amounts of liquids in chests and things. I am also able to add other liquids to them in the future, and liquids from mods that are not present will not appear in the Creative inventory or the NEI listings.
|
||||||
|
|
||||||
|
1.0.701-56
|
||||||
|
Update to Forestry 1.7.0.1/1.7.0.2
|
||||||
|
|
||||||
|
Added all kinds of backpack integration for Thaumcraft, including a new Thaumaturge's Backpack and Woven variety. These will suck up shards, Thaumcraft resources such as quicksilver, amber, zombie brains, research fragments and other goodies. Other TC items such as marker blocks, warded stone, candles, logs, leaves and plants also can fall into Forestry's default backpacks as appropriate. (I may have missed some other obvious items.)
|
||||||
|
|
||||||
|
1.0.70-53
|
||||||
|
Update to Forestry 1.7.0.0
|
||||||
|
|
||||||
|
1.0.0-50
|
||||||
|
-Added Thaumcraft aspects to some Forestry items, notably combs and bees. (Finally, something to use those extra drones for!)
|
||||||
|
-Added another Swarmer inducer item - craftable via carpenter using liquid honey, Royal Jelly, Pollen and Enchanting Drops from Arcane bees. 8 times more effective than Royal Jelly alone!
|
||||||
|
-Added carpenter recipe for candles using magic wax. Same patterns as with beeswax.
|
||||||
|
|
||||||
|
1.0.0-48
|
||||||
|
-Support for Forestry 1.6.5.5+
|
||||||
|
-Extra alles for bee mutations!
|
||||||
|
-Thaumcraft aspects associated with some Forestry items!
|
||||||
|
|
||||||
|
1.0.0-35
|
||||||
|
-Bugfix version to account for launcher jars located outside of expected folder. Replaced 1.0.0-34
|
||||||
|
|
||||||
|
1.0.0-34
|
||||||
|
-Initial Release
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 64 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1,191 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
|
||||||
|
<properties version="1.0">
|
||||||
|
<!-- Item names -->
|
||||||
|
<entry key="item.jellyBabies.name">Handful of Jelly Babies</entry>
|
||||||
|
<entry key="item.tb.thaumiumScoop.name">Thaumium Scoop</entry>
|
||||||
|
<entry key="item.tb.thaumiumGrafter.name">Thaumium Grafter</entry>
|
||||||
|
|
||||||
|
<!-- Block names -->
|
||||||
|
<entry key="tile.tb.planks.greatwood.name">Greatwood Planks</entry>
|
||||||
|
<entry key="tile.tb.slab.wood.greatwood.name">Greatwood Slab</entry>
|
||||||
|
<entry key="tile.tb.planks.silverwood.name">Silverwood Planks</entry>
|
||||||
|
<entry key="tile.tb.slab.wood.silverwood.name">Silverwood Slab</entry>
|
||||||
|
|
||||||
|
<!-- Comb names -->
|
||||||
|
<entry key="tb.comb.occult">Occult Comb</entry>
|
||||||
|
<entry key="tb.comb.otherworldly">Otherworldy Comb</entry>
|
||||||
|
<entry key="tb.comb.paper">Papery Comb</entry>
|
||||||
|
<entry key="tb.comb.stark">Stark Comb</entry>
|
||||||
|
<entry key="tb.comb.air">Airy Comb</entry>
|
||||||
|
<entry key="tb.comb.fire">Firey Comb</entry>
|
||||||
|
<entry key="tb.comb.water">Watery Comb</entry>
|
||||||
|
<entry key="tb.comb.earth">Earthy Comb</entry>
|
||||||
|
<entry key="tb.comb.magic">Infused Comb</entry>
|
||||||
|
<entry key="tb.comb.aware">Memory Comb</entry>
|
||||||
|
<entry key="tb.comb.furtive">Furtive Comb</entry>
|
||||||
|
|
||||||
|
<!-- Wax names -->
|
||||||
|
<entry key="tb.wax.magic">Magic 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>
|
||||||
|
|
||||||
|
<!-- Propolis names -->
|
||||||
|
<entry key="tb.propolis.dull">Dull Propolis</entry>
|
||||||
|
<entry key="tb.propolis.air">Breezey Propolis</entry>
|
||||||
|
<entry key="tb.propolis.fire">Burning Propolis</entry>
|
||||||
|
<entry key="tb.propolis.water">Flowing Propolis</entry>
|
||||||
|
<entry key="tb.propolis.earth">Stony Propolis</entry>
|
||||||
|
<entry key="tb.propolis.magic">Infused Propolis</entry>
|
||||||
|
|
||||||
|
<!-- Misc Resources -->
|
||||||
|
<entry key="tb.resource.fragment">Lore Fragment</entry>
|
||||||
|
<entry key="tb.resource.lump">Aromatic Lump</entry>
|
||||||
|
<entry key="tb.resource.fertilizer">Concentrated Compound</entry>
|
||||||
|
<entry key="tb.resource.crystalFlux">Crystalized %s Aspect</entry>
|
||||||
|
|
||||||
|
<!-- Frames -->
|
||||||
|
<entry key="tb.frame.magic">Magic Frame</entry>
|
||||||
|
<entry key="tb.frame.resillient">Resilient Frame</entry>
|
||||||
|
<entry key="tb.frame.gentle">Gentle Frame</entry>
|
||||||
|
<entry key="tb.frame.metabolic">Metabolic Frame</entry>
|
||||||
|
<entry key="tb.frame.necrotic">Necrotic Frame</entry>
|
||||||
|
<entry key="tb.frame.temporal">Temporal Frame</entry>
|
||||||
|
|
||||||
|
<!-- Capsule names -->
|
||||||
|
<entry key="tb.capsule.magic">Magic Capsule</entry>
|
||||||
|
<entry key="tb.capsule.void">Void Capsule</entry>
|
||||||
|
|
||||||
|
<!-- Liquids -->
|
||||||
|
<entry key="tb.liquid.">Empty</entry>
|
||||||
|
<entry key="tb.liquid.water">Water</entry>
|
||||||
|
<entry key="tb.liquid.lava">Lava</entry>
|
||||||
|
<entry key="tb.liquid.biomass">Biomass</entry>
|
||||||
|
<entry key="tb.liquid.biofuel">Empty</entry>
|
||||||
|
<entry key="tb.liquid.Oil">Oil</entry>
|
||||||
|
<entry key="tb.liquid.Fuel">Fuel</entry>
|
||||||
|
<entry key="tb.liquid.seedoil">Seed Oil</entry>
|
||||||
|
<entry key="tb.liquid.honey">Honey</entry>
|
||||||
|
<entry key="tb.liquid.juice">Juice</entry>
|
||||||
|
<entry key="tb.liquid.ice">Ice</entry>
|
||||||
|
<entry key="tb.liquid.milk">Milk</entry>
|
||||||
|
<entry key="tb.liquid.acid">Acid</entry>
|
||||||
|
<entry key="tb.liquid.poison">Poison</entry>
|
||||||
|
<entry key="tb.liquid.liquidNitrogen">Liquid Nitrogen</entry>
|
||||||
|
<entry key="tb.liquid.liquidDNA">Liquid DNA</entry>
|
||||||
|
<entry key="tb.liquid.Creosote Oil">Creosote Oil</entry>
|
||||||
|
<entry key="tb.liquid.Steam">Steam</entry>
|
||||||
|
|
||||||
|
<!-- Moon Phases -->
|
||||||
|
<entry key="tb.moon.full">Full Moon</entry>
|
||||||
|
<entry key="tb.moon.gibbousWaning">Waning Gibbous</entry>
|
||||||
|
<entry key="tb.moon.gibousWaxing">Waxing Gibbous</entry>
|
||||||
|
<entry key="tb.moon.halfWaning">Waning Half</entry>
|
||||||
|
<entry key="tb.moon.halfWaxing">Waxing Half</entry>
|
||||||
|
<entry key="tb.moon.crescentWaning">Waning Crescent</entry>
|
||||||
|
<entry key="tb.moon.crescentWaxing">Waxing Crescent</entry>
|
||||||
|
<entry key="tb.moon.new">New Moon</entry>
|
||||||
|
|
||||||
|
<!-- Miscellaneous names -->
|
||||||
|
<entry key="tb.backpack.thaumaturge">Thaumaturge's Backpack</entry>
|
||||||
|
|
||||||
|
<!-- Species names -->
|
||||||
|
<entry key="thaumicbees.speciesEsoteric">Esoteric</entry>
|
||||||
|
<entry key="thaumicbees.speciesEsoteric.description">An unusual crossbreed which seems to have magical properties.|Apinomicon</entry>
|
||||||
|
<entry key="thaumicbees.speciesMysterious">Mysterious</entry>
|
||||||
|
<entry key="thaumicbees.speciesMysterious.description">These bees have been to the end of the world and back, and their power has grown.|Apinomicon</entry>
|
||||||
|
<entry key="thaumicbees.speciesArcane">Arcane</entry>
|
||||||
|
<entry key="thaumicbees.speciesArcane.description">"Their produce is charged with magic."|Azanor, Master Thaumaturge</entry>
|
||||||
|
<entry key="thaumicbees.speciesCharmed">Charmed</entry>
|
||||||
|
<entry key="thaumicbees.speciesCharmed.description">Your first experiments in Thaumaturgical Apiculture have yielded fruit. Buzzing fruit.|Apinomicon</entry>
|
||||||
|
<entry key="thaumicbees.speciesEnchanted">Enchanted</entry>
|
||||||
|
<entry key="thaumicbees.speciesEnchanted.description">Successive generations of Charmed bees have reinforced their connection to the unknown.|Apinomicon</entry>
|
||||||
|
<entry key="thaumicbees.speciesSupernatural">Supernatural</entry>
|
||||||
|
<entry key="thaumicbees.speciesSupernatural.description">These bees walk the line between this world and the unseen.|Apinomicon</entry>
|
||||||
|
<entry key="thaumicbees.speciesPupil">Pupil</entry>
|
||||||
|
<entry key="thaumicbees.speciesPupil.description">"What does that bee want with my paper?!|Yorae, Librarian</entry>
|
||||||
|
<entry key="thaumicbees.speciesScholarly">Scholarly</entry>
|
||||||
|
<entry key="thaumicbees.speciesScholarly.description">"I can't be sure, but I think they might be smarter than me..."|Yorae, Librarian</entry>
|
||||||
|
<entry key="thaumicbees.speciesSavant">Savant</entry>
|
||||||
|
<entry key="thaumicbees.speciesSavant.description">lim(x^(i / pi)/ log(e * 7 - ln(32/x^-pi))). Solve for honey.|Note found on Yorae's desk</entry>
|
||||||
|
<entry key="thaumicbees.speciesStark">Stark</entry>
|
||||||
|
<entry key="thaumicbees.speciesStark.description">"These are unusually attracted to shards. This warrents further investigation."|Azanor, Master Thaumaturge</entry>
|
||||||
|
<entry key="thaumicbees.speciesAura">Aura</entry>
|
||||||
|
<entry key="thaumicbees.speciesAura.description">"They work so fast it's breathtaking."|Sengir, Mad Apiarist</entry>
|
||||||
|
<entry key="thaumicbees.speciesIgnis">Ignis</entry>
|
||||||
|
<entry key="thaumicbees.speciesIgnis.description">Caution: Contents of hive extremely hot.|Warning label on Azanor's apiary</entry>
|
||||||
|
<entry key="thaumicbees.speciesAqua">Aqua</entry>
|
||||||
|
<entry key="thaumicbees.speciesAqua.description">"I tried to breed them once, but that was a wash."|MysteriousAges, Apprentice Thaumaturge</entry>
|
||||||
|
<entry key="thaumicbees.speciesSolum">Solum</entry>
|
||||||
|
<entry key="thaumicbees.speciesSolum.description">"You're really gonna dig these bees, but watch out - they bore quite easily."|MysteriousAges, Apprentice Comedian</entry>
|
||||||
|
<entry key="thaumicbees.speciesPraecantatio">Praecantatio</entry>
|
||||||
|
<entry key="thaumicbees.speciesPraecantatio.description">Beekeeping is magic!|Apinomicon, Preface</entry>
|
||||||
|
<entry key="thaumicbees.speciesAware">Aware</entry>
|
||||||
|
<entry key="thaumicbees.speciesAware.description">"They can see into your soul!"|Florastar, Expert Beekeeper</entry>
|
||||||
|
<entry key="thaumicbees.speciesVis">Vis</entry>
|
||||||
|
<entry key="thaumicbees.speciesVis.description">"They can feel changes in the aura, but are not yet able to affect it."|Azanor, research notes</entry>
|
||||||
|
<entry key="thaumicbees.speciesPure">Pure</entry>
|
||||||
|
<entry key="thaumicbees.speciesPure.description">"It's like a bee janitor!"|MysteriousAges, Thaumaturge</entry>
|
||||||
|
<entry key="thaumicbees.speciesFlux">Flux</entry>
|
||||||
|
<entry key="thaumicbees.speciesFlux.description">"I thought they would help clean up, but it only makes things worse!"|Kreicus, Apprentice Thaumaturge</entry>
|
||||||
|
<entry key="thaumicbees.speciesNode">Node</entry>
|
||||||
|
<entry key="thaumicbees.speciesNode.description">Having undergone a freak mutation, these bees now attract magic to them.|Apinomicon</entry>
|
||||||
|
<entry key="thaumicbees.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</entry>
|
||||||
|
<entry key="thaumicbees.speciesTimely">Timely</entry>
|
||||||
|
<entry key="thaumicbees.speciesTimely.description">"An apiarist is never late. He arrives precicely when he means to!"|Sengir, Mad Apiarist</entry>
|
||||||
|
<entry key="thaumicbees.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>
|
||||||
|
|
||||||
|
<!-- 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.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>
|
||||||
|
<entry key="tb.bees.flower.nodePure">Purify Node</entry>
|
||||||
|
<entry key="tb.bees.flower.nodeFlux">Fluxify 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">Vis</entry>
|
||||||
|
<entry key="classification.vis.description"></entry>
|
||||||
|
<entry key="classification.time">Time</entry>
|
||||||
|
<entry key="classification.time.description"></entry>
|
||||||
|
|
||||||
|
|
||||||
|
</properties>
|
||||||
@@ -1,9 +1,12 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
"modid": "ThaumicBees",
|
"modid": "ThaumicBees",
|
||||||
|
"version": "@MODVERSION@",
|
||||||
"name": "ThaumicBees",
|
"name": "ThaumicBees",
|
||||||
|
"url": "http://bit.ly/XFDvLY",
|
||||||
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
|
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
|
||||||
"authors": [ "MysteriousAges" ],
|
"authors": [ "MysteriousAges" ],
|
||||||
"credits": "Thanks to Sengir for the Forestry help!"
|
"credits": "SirSengir, Azanor, Binnie & the Forestry Dev peeps",
|
||||||
|
"logoFile": "/gfx/thaumicbees/logo.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1,9 +1,136 @@
|
|||||||
<?xml version="1.0" ?>
|
|
||||||
<research>
|
<research>
|
||||||
<name>Test Bees</name>
|
<project id="TBSTARTNODE">
|
||||||
<popupText>Magical Bees</popupText>
|
<name>Bees And Magic</name>
|
||||||
<longText></longText>
|
<popupText>Across Fields and Forest</popupText>
|
||||||
<page type="text">Test, test test.
|
<longText>There is something about your world that makes you think trees and bees require more research.</longText>
|
||||||
|
<page type="text">A recent breakthrough has given you information regarding Apiculture and Arborculture. Perhaps it isn't quite as mundane as it first seemed.
|
||||||
|
|
||||||
|
The potential exists for further study. All that is required is some creative thinking to apply new uses to old, familiar items.</page>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<project id="STARKHINT">
|
||||||
|
<name>Stark Bees</name>
|
||||||
|
<popupText>Crossing two boundaries</popupText>
|
||||||
|
<longText>The cursory investigation you have completed in the direction of Beekeeping has yielded fruit. Perhaps under the right conditions, you can find a bee mutation that will enable you to infuse them with magic.</longText>
|
||||||
|
<page type="text">Even bees are susceptible to the influence of magic, some more than others.
|
||||||
|
|
||||||
|
Perhaps it would be possible to breed a bee from two species which are affected by Arcane or Supernatural powers. If such a species truly does exist, it could be possible that they could reveal additional secrets. Further research may be needed, in addition to a specimen.</page>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<project id="BEEINFUSION">
|
||||||
|
<name>Thaumic Bees</name>
|
||||||
|
<popupText>Magical Apiculture</popupText>
|
||||||
|
<longText>Further research into this so-called Stark Bee has provided you with insight into how a bee may become infused with elemental energy, or the raw essence of magic itself.</longText>
|
||||||
|
<page type="text">You have refined your previous theory regarding bees taking on aspects of elemental magic, and have come up with a way to attach elements to bees. It remains to be seen if this will be a benefit, or something you may regret in the future.
|
||||||
|
|
||||||
|
By placing a legendary Stark Bee into the Infusion Altar along with a charged shard of some kind, you will be able to imprint an aspect onto the insect. Unfortunately, it only seems to work with princesses or drones, as the Queens are too sensitive to undergo the infusion process.</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION1</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION2</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION3</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION4</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION5</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION6</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION7</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION8</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION9</page>
|
||||||
|
<page type="infusioncrafting">BEEINFUSION0</page>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<project id="FERTILIZER">
|
||||||
|
<name>Concentrated Compound</name>
|
||||||
|
<popupText>An Apatite for more...</popupText>
|
||||||
|
<longText>You believe you can extend your reserves of apatite by enriching the crafted material with something that crops may appreciate.</longText>
|
||||||
|
<page type="text">You have discovered a method to stretch your reserves of apatite to the limit through the use of magic. By infusing the mixture created by crushing the apatite crystals with dirt with the aspect of the Harvest, you can create additional reserves of it. This mixture is then diluted with sand to produce the normal variety of fertilizer.</page>
|
||||||
|
<page type="infusioncrafting">FERTILIZER</page>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<project id="HIVEFRAME">
|
||||||
|
<name>Magic Frame</name>
|
||||||
|
<popupText>A Different Frame of Bee</popupText>
|
||||||
|
<longText>Continuing from your curiousity into these flying creatures, an idea has ocurred to you how to encourage them to work faster, coaxed along by the judicious use of magic applied to some existing beekeeping equipment.</longText>
|
||||||
|
<page type="text">The simple frames known to all beekeepers, while effective, are flimsy and prone to breakage. With the help of magic, you have devised an improved design to function longer by enchanting it with reinforcing magic.
|
||||||
|
|
||||||
|
These improved versions can last several times longer than the basic frames, so long as there is sufficient aura in the area to feed the spells woven into the construction of the frame.</page>
|
||||||
|
<page type="infusioncrafting">FRAMEMAGIC</page>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<project id="HIVEFRAME2">
|
||||||
|
<name>Resilient Frame</name>
|
||||||
|
<popupText>Making it better...</popupText>
|
||||||
|
<longText>Having come up with an idea for an improved Magical Frame, the next logical step would be to reinforce the design further, shielding it from all but the harshest wear and tear. The trade-off, of course, would be an increased consumption of aura during its operation.</longText>
|
||||||
|
<page type="text">You have successfully created a design for a more durable Apiary Frame, the Resilient Frame. Like the Magic Frame, it will increase the bees' working speed and consume aura to offset received wear and tear. Unlike the Magic Frame, its expected lifespan is much longer, but its aura use is slightly higher. </page>
|
||||||
|
<page type="infusioncrafting">FRAMERESILIENT</page>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<project id="HIVEFRAMEGENTLE">
|
||||||
|
<name>Gentle Frame</name>
|
||||||
|
<popupText>You won't even notice I'm here.</popupText>
|
||||||
|
<longText>Continuing from your curiosity into these flying creatures, an idea has occured to you how to encourage them to live slightly longer within the Apiaries. Perhaps if you could surround them with the essence of health, life, and the plants they love, you can realize this idea.</longText>
|
||||||
|
<page type="text">The Gentle Frame extends the life expectancy of a working queen by roughly a half, and encourages the workers to move at a slightly increased pace. The end result is that the bees live longer, and produce more while they are alive.
|
||||||
|
|
||||||
|
Like the Magic Frame, the Gentle Frame also consumes small amounts of aura to maintain its enchantments, and has the negative side-effect of producing small amounts of flux in the surrounding aura now and again as the enchanted bees go about their work outside the hive. It's probably not enough to get too worried about, though.</page>
|
||||||
|
<page type="infusioncrafting">FRAMEGENTLE</page>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<project id="HIVEFRAMEMETA">
|
||||||
|
<name>Metabolic Frame</name>
|
||||||
|
<popupText>And One! And Two!</popupText>
|
||||||
|
<longText>Additional bee research has yielded insight into their body structure, metabolism, and life cycle. It is possible that you could create a frame to enhance their body processes.</longText>
|
||||||
|
<page type="text">The Metabolic Frame enhances the rate at which bees metabolize food, resulting in a higher work speed. However, this makes their genetic structure somewhat unstable and prone to mutations. While this can be frustrating for some apiarists, other, more prepared beekeepers have been known to use the Metabolic Frames in their apiaries to encourage mutations in bee species.
|
||||||
|
|
||||||
|
Like the Magic Frame, this frame consumes aura to maintain its enchantments, and has the negative side-effect of producing some flux in the surrounding aura now and again as the enchanted bees go about their work. The Metabolic Frame consumes significantly more aura, as its</page>
|
||||||
|
<page type="infusioncrafting">FRAMEMETABOLIC</page>
|
||||||
|
<page type="text">enchantments are much more complex, and is not quite as durable as the Magic Frame is known to be.</page>
|
||||||
|
</project>
|
||||||
|
|
||||||
|
<project id="HIVEFRAMENECRO">
|
||||||
|
<name>Necrotic Frame</name>
|
||||||
|
<popupText>Doom And Gloom, For Bees!</popupText>
|
||||||
|
<longText>After being stung by a bee, you concocted an idea to make them pay. Surely placing a frame infused with death and envenomed intents in a hive will teach them a lesson!</longText>
|
||||||
|
<page type="text">Your vengeance-fuelled research has paid off, resulting in the knowledge of the Necrotic Frame. This frame, when placed in an Apiary, will cause the bees to become sluggish, reducing their work speed, and severely unhealthy, greatly diminishing the current generation's lifespan. However, it is prudent to ensure the enchantments in the frame only affect the current generation.
|
||||||
|
|
||||||
|
Like the Magic Frame, this frame consumes aura to maintain its enchantments. This is not your best work, however, and the frame's operation will produce significantly more flux in the surrounding area than your other frames.</page>
|
||||||
|
<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>
|
||||||
|
|
||||||
Lorem Ipsom something something.</page>
|
|
||||||
</research>
|
</research>
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package forestry.plugins;
|
|
||||||
|
|
||||||
import thaumicbees.bees.ThaumicBeesPlugin;
|
|
||||||
|
|
||||||
public class PluginThaumicBees extends ThaumicBeesPlugin
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,199 @@
|
|||||||
|
package net.mysteriousages.utils;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides some common functionality for Inventory clusters. Performs bounds-checking on slot args.
|
||||||
|
*
|
||||||
|
* @author MysteriousAges
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class GenericInventory implements IInventory
|
||||||
|
{
|
||||||
|
private ItemStack[] inventory;
|
||||||
|
private String name;
|
||||||
|
private int stackLimit;
|
||||||
|
|
||||||
|
public GenericInventory(String inventoryName, int slotCount)
|
||||||
|
{
|
||||||
|
this(inventoryName, slotCount, 64);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GenericInventory(String inventoryName, int slotCount, int maxStackSize)
|
||||||
|
{
|
||||||
|
this.inventory = new ItemStack[slotCount];
|
||||||
|
this.name = inventoryName;
|
||||||
|
this.stackLimit = maxStackSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getSizeInventory()
|
||||||
|
{
|
||||||
|
return this.inventory.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getStackInSlot(int slot)
|
||||||
|
{
|
||||||
|
ItemStack result = null;
|
||||||
|
|
||||||
|
if (this.slotNumberValid(slot))
|
||||||
|
{
|
||||||
|
result = this.inventory[slot];
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack decrStackSize(int slot, int count)
|
||||||
|
{
|
||||||
|
ItemStack result = null;
|
||||||
|
|
||||||
|
if (this.slotNumberValid(slot))
|
||||||
|
{
|
||||||
|
if (this.inventory[slot] != null)
|
||||||
|
{
|
||||||
|
result = this.inventory[slot].splitStack(Math.min(count, this.inventory[slot].stackSize));
|
||||||
|
if (this.inventory[slot].stackSize <= 0)
|
||||||
|
{
|
||||||
|
this.inventory[slot] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getStackInSlotOnClosing(int slot)
|
||||||
|
{
|
||||||
|
return this.getStackInSlot(slot);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setInventorySlotContents(int slot, ItemStack itemStack)
|
||||||
|
{
|
||||||
|
if (this.slotNumberValid(slot))
|
||||||
|
{
|
||||||
|
this.inventory[slot] = itemStack;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getInvName()
|
||||||
|
{
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getInventoryStackLimit()
|
||||||
|
{
|
||||||
|
return this.stackLimit;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack[] getInventory()
|
||||||
|
{
|
||||||
|
return this.inventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onInventoryChanged() { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isUseableByPlayer(EntityPlayer player)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Accepts an ItemStack and attempts to merge it with a similar item stack or an empty slot.
|
||||||
|
* @param stack
|
||||||
|
* @return Any leftover items, or null if the merge completed successfully.
|
||||||
|
*/
|
||||||
|
public ItemStack attemptStackMerge(ItemStack stack)
|
||||||
|
{
|
||||||
|
for (int i = 0; i < this.inventory.length; ++i)
|
||||||
|
{
|
||||||
|
if (this.inventory[i] == null)
|
||||||
|
{
|
||||||
|
this.inventory[i] = stack;
|
||||||
|
stack = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (this.inventory[i].isItemEqual(stack))
|
||||||
|
{
|
||||||
|
int freeSlots = stack.getItem().getItemStackLimit() - this.inventory[i].stackSize;
|
||||||
|
|
||||||
|
this.inventory[i].stackSize += freeSlots;
|
||||||
|
stack.stackSize -= freeSlots;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stack.stackSize <= 0)
|
||||||
|
{
|
||||||
|
stack = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return stack;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void writeToNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
tag.setString("Name", this.name);
|
||||||
|
tag.setInteger("Size", this.inventory.length);
|
||||||
|
NBTTagList itemList = new NBTTagList();
|
||||||
|
|
||||||
|
for (int i = 0; i < this.inventory.length; ++i)
|
||||||
|
{
|
||||||
|
NBTTagCompound itemTag = new NBTTagCompound();
|
||||||
|
itemTag.setByte("Slot", (byte)i);
|
||||||
|
this.inventory[i].writeToNBT(itemTag);
|
||||||
|
itemList.appendTag(itemTag);
|
||||||
|
}
|
||||||
|
|
||||||
|
tag.setTag("Items", itemList);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void readFromNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
this.name = tag.getString("Name");
|
||||||
|
NBTTagList itemList = tag.getTagList("Items");
|
||||||
|
int length = tag.getInteger("Size");
|
||||||
|
this.inventory = new ItemStack[length];
|
||||||
|
|
||||||
|
for (int i = 0; i < itemList.tagCount(); ++i)
|
||||||
|
{
|
||||||
|
NBTTagCompound item = (NBTTagCompound)itemList.tagAt(i);
|
||||||
|
int slotId = item.getByte("Slot");
|
||||||
|
if (slotId >= 0 && slotId < this.inventory.length)
|
||||||
|
{
|
||||||
|
this.inventory[slotId] = ItemStack.loadItemStackFromNBT(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks to see if the given slot number is valid with the inventory size
|
||||||
|
* @param slot
|
||||||
|
* @return True, if slot in [0, inventory size)
|
||||||
|
*/
|
||||||
|
protected boolean slotNumberValid(int slot)
|
||||||
|
{
|
||||||
|
return slot >= 0 && slot < this.inventory.length;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void openChest() { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void closeChest() { }
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
package net.mysteriousages.utils;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides basic functionality for an owned inventory.
|
||||||
|
* @author MysteriousAges
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class GenericOwnedInventory extends GenericInventory
|
||||||
|
{
|
||||||
|
private String ownerName;
|
||||||
|
private boolean isPublic;
|
||||||
|
|
||||||
|
public GenericOwnedInventory(EntityPlayer player, String inventoryName, int slotCount)
|
||||||
|
{
|
||||||
|
super(inventoryName, slotCount);
|
||||||
|
this.setInfo(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
public GenericOwnedInventory(EntityPlayer player, String inventoryName, int slotCount, int maxStackSize)
|
||||||
|
{
|
||||||
|
super(inventoryName, slotCount, maxStackSize);
|
||||||
|
this.setInfo(player);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setInfo(EntityPlayer player)
|
||||||
|
{
|
||||||
|
this.ownerName = player.username;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPubliclyAccessible(boolean flag)
|
||||||
|
{
|
||||||
|
this.isPublic = flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getOwnerName()
|
||||||
|
{
|
||||||
|
return this.ownerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPubliclyAccessible()
|
||||||
|
{
|
||||||
|
return this.isPublic;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isUseableByPlayer(EntityPlayer player)
|
||||||
|
{
|
||||||
|
return this.isPublic || this.ownerName.equalsIgnoreCase(player.username);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void writeToNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
super.writeToNBT(tag);
|
||||||
|
tag.setString("Owner", this.ownerName);
|
||||||
|
tag.setBoolean("PublicFlag", this.isPublic);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void readFromNBT(NBTTagCompound tag)
|
||||||
|
{
|
||||||
|
super.readFromNBT(tag);
|
||||||
|
this.ownerName = tag.getString("Owner");
|
||||||
|
this.isPublic = tag.getBoolean("PublicFlag");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import net.minecraft.potion.Potion;
|
||||||
|
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
import forestry.api.apiculture.IAlleleBeeSpecies;
|
||||||
|
import forestry.api.genetics.AlleleManager;
|
||||||
|
import forestry.api.genetics.IAllele;
|
||||||
|
|
||||||
|
public class Allele implements IAllele
|
||||||
|
{
|
||||||
|
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 AlleleEffectPotion slowSpeed;
|
||||||
|
public static AlleleEffectSpawnMob spawnBrainyZombie;
|
||||||
|
public static AlleleEffectSpawnMob spawnWisp;
|
||||||
|
public static AlleleEffectSpawnMob spawnBats;
|
||||||
|
public static AlleleEffectSpawnMob spawnGhast;
|
||||||
|
public static AlleleEffectAuraNodeGrow nodeGen;
|
||||||
|
|
||||||
|
public static 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", Potion.digSpeed, 7, false);
|
||||||
|
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", Potion.moveSpeed, 5, false);
|
||||||
|
Allele.slowSpeed = new AlleleEffectPotion("effectSlowSpeed", Potion.moveSlowdown, 3, false);
|
||||||
|
|
||||||
|
Allele.nodeGen = new AlleleEffectAuraNodeGrow("effectNodeGeneration", false, 400);
|
||||||
|
|
||||||
|
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID);
|
||||||
|
Allele.spawnBrainyZombie.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);
|
||||||
|
Allele.spawnWisp.setThrottle(1800);
|
||||||
|
|
||||||
|
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghast");
|
||||||
|
Allele.spawnGhast.setThrottle(2000).setChanceToSpawn(20).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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
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;
|
||||||
|
import forestry.api.genetics.IEffectData;
|
||||||
|
|
||||||
|
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||||
|
{
|
||||||
|
|
||||||
|
public AlleleEffect(String id, boolean isDominant)
|
||||||
|
{
|
||||||
|
super(id, isDominant);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isCombinable()
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public abstract IEffectData validateStorage(IEffectData storedData);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getIdentifier()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString(getUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public abstract IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
|
{
|
||||||
|
int[] area = genome.getTerritory();
|
||||||
|
float mod = housing.getTerritoryModifier(genome);
|
||||||
|
// 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]);
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getIconTextureFile()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getIconIndex()
|
||||||
|
{
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected List<Entity> getEntitiesWithinRange(IBeeGenome genome, IBeeHousing housing)
|
||||||
|
{
|
||||||
|
// Get the size of the affected area
|
||||||
|
int[] area = genome.getTerritory();
|
||||||
|
|
||||||
|
// Calculate offset
|
||||||
|
int[] min = new int[3];
|
||||||
|
int[] max = new int[3];
|
||||||
|
min[0] = housing.getXCoord() - area[0] / 2;
|
||||||
|
max[0] = housing.getXCoord() + area[0] / 2;
|
||||||
|
|
||||||
|
min[1] = housing.getYCoord() - area[1] / 2;
|
||||||
|
max[1] = housing.getYCoord() + area[1] / 2;
|
||||||
|
|
||||||
|
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]);
|
||||||
|
return housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, bounds);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
import thaumcraft.api.AuraNode;
|
||||||
|
import thaumcraft.api.EnumNodeType;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import forestry.api.genetics.IEffectData;
|
||||||
|
|
||||||
|
public class AlleleEffectAuraNodeGrow extends AlleleEffect
|
||||||
|
{
|
||||||
|
|
||||||
|
private int throttle;
|
||||||
|
|
||||||
|
public AlleleEffectAuraNodeGrow(String id, boolean isDominant, int timeout)
|
||||||
|
{
|
||||||
|
super(id, isDominant);
|
||||||
|
this.throttle = timeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData validateStorage(IEffectData storedData)
|
||||||
|
{
|
||||||
|
if (storedData == null)
|
||||||
|
{
|
||||||
|
storedData = new EffectData(1, 0, 0);
|
||||||
|
}
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
|
{
|
||||||
|
int value = storedData.getInteger(0);
|
||||||
|
if (value >= throttle)
|
||||||
|
{
|
||||||
|
World w = housing.getWorld();
|
||||||
|
if (w.rand.nextInt(10) < 1)
|
||||||
|
{
|
||||||
|
float x = housing.getXCoord();
|
||||||
|
float y = housing.getYCoord();
|
||||||
|
float z = housing.getZCoord();
|
||||||
|
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, 1800);
|
||||||
|
if (nodeId != -1)
|
||||||
|
{
|
||||||
|
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||||
|
if (node.level >= node.baseLevel * 4 / 5)
|
||||||
|
{
|
||||||
|
x = (float)(x - node.xPos);
|
||||||
|
y = (float)(y - node.yPos);
|
||||||
|
z = (float)(z - node.zPos);
|
||||||
|
|
||||||
|
float distance = (float)Math.sqrt(x * x + y * y + z * z);
|
||||||
|
x = x / distance;
|
||||||
|
y = y / distance;
|
||||||
|
z = z / distance;
|
||||||
|
|
||||||
|
x *= 0.05f;
|
||||||
|
y *= 0.05f;
|
||||||
|
z *= 0.05f;
|
||||||
|
|
||||||
|
ThaumcraftApi.queueNodeChanges(nodeId, node.baseLevel * -1 / 13, w.rand.nextInt(2), false, null, x, y, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
storedData.setInteger(0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
storedData.setInteger(0, value + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+2
-25
@@ -1,8 +1,7 @@
|
|||||||
package thaumicbees.bees.genetics;
|
package thaumicbees.bees;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import thaumicbees.bees.EffectData;
|
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -35,12 +34,6 @@ public class AlleleEffectCure extends AlleleEffect
|
|||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier()
|
|
||||||
{
|
|
||||||
return "Cleansing";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
{
|
{
|
||||||
@@ -48,23 +41,7 @@ public class AlleleEffectCure extends AlleleEffect
|
|||||||
|
|
||||||
if (count == 200)
|
if (count == 200)
|
||||||
{
|
{
|
||||||
// Get the size of the affected area
|
List<Entity> entityList = this.getEntitiesWithinRange(genome, housing);
|
||||||
int[] area = genome.getTerritory();
|
|
||||||
|
|
||||||
// Calculate offset
|
|
||||||
int[] min = new int[3];
|
|
||||||
int[] max = new int[3];
|
|
||||||
min[0] = housing.getXCoord() - area[0] / 2;
|
|
||||||
max[0] = housing.getXCoord() + area[0] / 2;
|
|
||||||
|
|
||||||
min[1] = housing.getYCoord() - area[1] / 2;
|
|
||||||
max[1] = housing.getYCoord() + area[1] / 2;
|
|
||||||
|
|
||||||
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]);
|
|
||||||
List<Entity> entityList = housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, bounds);
|
|
||||||
|
|
||||||
for (Entity e : entityList)
|
for (Entity e : entityList)
|
||||||
{
|
{
|
||||||
+3
-28
@@ -1,4 +1,4 @@
|
|||||||
package thaumicbees.bees.genetics;
|
package thaumicbees.bees;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -7,7 +7,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.potion.Potion;
|
import net.minecraft.potion.Potion;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import thaumicbees.bees.EffectData;
|
|
||||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
@@ -18,12 +17,10 @@ public class AlleleEffectPotion extends AlleleEffect
|
|||||||
{
|
{
|
||||||
private int potionId;
|
private int potionId;
|
||||||
private int duration;
|
private int duration;
|
||||||
private String beealyzerId;
|
|
||||||
|
|
||||||
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);
|
super("effect" + name, isDominant);
|
||||||
this.beealyzerId = readableName;
|
|
||||||
this.potionId = potionApplied.id;
|
this.potionId = potionApplied.id;
|
||||||
this.duration = 20 * effectDuration;
|
this.duration = 20 * effectDuration;
|
||||||
}
|
}
|
||||||
@@ -38,12 +35,6 @@ public class AlleleEffectPotion extends AlleleEffect
|
|||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier()
|
|
||||||
{
|
|
||||||
return this.beealyzerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
{
|
{
|
||||||
@@ -51,23 +42,7 @@ public class AlleleEffectPotion extends AlleleEffect
|
|||||||
|
|
||||||
if (count == 200)
|
if (count == 200)
|
||||||
{
|
{
|
||||||
// Get the size of the affected area
|
List<Entity> entityList = this.getEntitiesWithinRange(genome, housing);
|
||||||
int[] area = genome.getTerritory();
|
|
||||||
|
|
||||||
// Calculate offset
|
|
||||||
int[] min = new int[3];
|
|
||||||
int[] max = new int[3];
|
|
||||||
min[0] = housing.getXCoord() - area[0] / 2;
|
|
||||||
max[0] = housing.getXCoord() + area[0] / 2;
|
|
||||||
|
|
||||||
min[1] = housing.getYCoord() - area[1] / 2;
|
|
||||||
max[1] = housing.getYCoord() + area[1] / 2;
|
|
||||||
|
|
||||||
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]);
|
|
||||||
List<Entity> entityList = housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, bounds);
|
|
||||||
|
|
||||||
for (Entity e : entityList)
|
for (Entity e : entityList)
|
||||||
{
|
{
|
||||||
@@ -0,0 +1,208 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import thaumicbees.item.ItemArmorApiarist;
|
||||||
|
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityList;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import forestry.api.genetics.IEffectData;
|
||||||
|
|
||||||
|
public class AlleleEffectSpawnMob extends AlleleEffect
|
||||||
|
{
|
||||||
|
protected boolean aggosOnPlayer;
|
||||||
|
protected boolean spawnsWhilePlayerNear;
|
||||||
|
protected String alternateMob;
|
||||||
|
protected String mobName;
|
||||||
|
protected int throttle;
|
||||||
|
protected int chanceToSpawn;
|
||||||
|
protected int maxMobsInArea;
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob(String id, boolean isDominant, String mobToSpawn)
|
||||||
|
{
|
||||||
|
super(id, isDominant);
|
||||||
|
this.aggosOnPlayer = false;
|
||||||
|
this.mobName = mobToSpawn;
|
||||||
|
this.throttle = 200;
|
||||||
|
this.chanceToSpawn = 100;
|
||||||
|
this.maxMobsInArea = 6;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData validateStorage(IEffectData storedData)
|
||||||
|
{
|
||||||
|
if (storedData == null)
|
||||||
|
{
|
||||||
|
// Throttle; Ready to spawn
|
||||||
|
storedData = new EffectData(1, 1, 0);
|
||||||
|
}
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
|
{
|
||||||
|
int count = storedData.getInteger(0);
|
||||||
|
|
||||||
|
if (count >= this.throttle && !storedData.getBoolean(0))
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, true);
|
||||||
|
storedData.setInteger(0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
storedData.setInteger(0, count + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if we're ready to spawn the mob.
|
||||||
|
if (storedData.getBoolean(0))
|
||||||
|
{
|
||||||
|
World w = housing.getWorld();
|
||||||
|
|
||||||
|
int roll = w.rand.nextInt(100);
|
||||||
|
|
||||||
|
if (roll <= this.chanceToSpawn)
|
||||||
|
{
|
||||||
|
if (this.spawnsWhilePlayerNear)
|
||||||
|
{
|
||||||
|
List<Entity> entities = this.getEntitiesWithinRange(genome, housing);
|
||||||
|
EntityPlayer target = null;
|
||||||
|
for (Entity e : entities)
|
||||||
|
{
|
||||||
|
if (e instanceof EntityPlayer)
|
||||||
|
{
|
||||||
|
target = (EntityPlayer)e;
|
||||||
|
// Check for wearing armor & cancel
|
||||||
|
if (ItemArmorApiarist.getNumberPiecesWorn(target) >= 4)
|
||||||
|
{
|
||||||
|
// Full armor suit is treated as "invisible."
|
||||||
|
target = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Let's spawn a mob. =D
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, !this.spawnMob(genome, target, w, housing, false));
|
||||||
|
}
|
||||||
|
else if (this.alternateMob != null)
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, !this.spawnMob(genome, null, w, housing, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, !this.spawnMob(genome, null, w, housing, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate)
|
||||||
|
{
|
||||||
|
boolean spawnedFlag = false;
|
||||||
|
|
||||||
|
|
||||||
|
EntityLiving mob;
|
||||||
|
if (spawnAlternate && this.alternateMob != null)
|
||||||
|
{
|
||||||
|
mob = (EntityLiving) EntityList.createEntityByName(this.alternateMob, world);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mob = (EntityLiving) EntityList.createEntityByName(this.mobName, world);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mob != null)
|
||||||
|
{
|
||||||
|
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||||
|
|
||||||
|
int entitiesCount = world.getEntitiesWithinAABB(mob.getClass(),
|
||||||
|
AxisAlignedBB.getBoundingBox((int)pos[0], (int)pos[1], (int)pos[2], (int)pos[0] + 1, (int)pos[1] + 1, (int)pos[2] + 1)
|
||||||
|
.expand(8.0D, 4.0D, 8.0D)).size();
|
||||||
|
|
||||||
|
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||||
|
|
||||||
|
if (entitiesCount < this.maxMobsInArea && mob.getCanSpawnHere())
|
||||||
|
{
|
||||||
|
if (mob.getCanSpawnHere())
|
||||||
|
{
|
||||||
|
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||||
|
if (this.aggosOnPlayer && player != null)
|
||||||
|
{
|
||||||
|
if (ItemArmorApiarist.getNumberPiecesWorn(player) < 4)
|
||||||
|
{
|
||||||
|
// Protect fully suited player from initial murder intent.
|
||||||
|
mob.setAttackTarget(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return spawnedFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob setSpawnsOnPlayerNear(String alternateMobToSpawn)
|
||||||
|
{
|
||||||
|
this.spawnsWhilePlayerNear = true;
|
||||||
|
this.alternateMob = alternateMobToSpawn;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob setAggrosPlayerOnSpawn()
|
||||||
|
{
|
||||||
|
this.aggosOnPlayer = true;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob setThrottle(int val)
|
||||||
|
{
|
||||||
|
this.throttle = val;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob setChanceToSpawn(int value)
|
||||||
|
{
|
||||||
|
this.chanceToSpawn = value;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob setMaxMobsInSpawnZone(int value)
|
||||||
|
{
|
||||||
|
this.maxMobsInArea = value;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
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[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);
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
import thaumicbees.item.ItemArmorApiarist;
|
||||||
|
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;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
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 mobToSpawn)
|
||||||
|
{
|
||||||
|
super(id, isDominant, mobToSpawn);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate)
|
||||||
|
{
|
||||||
|
boolean spawnedFlag = false;
|
||||||
|
|
||||||
|
EntityLiving mob;
|
||||||
|
if (spawnAlternate && this.alternateMob != null)
|
||||||
|
{
|
||||||
|
mob = (EntityLiving) EntityList.createEntityByName(this.alternateMob, world);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mob = (EntityLiving) EntityList.createEntityByName(this.mobName, world);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mob != null)
|
||||||
|
{
|
||||||
|
double pos[] = this.randomMobSpawnCoords(world, bee, housing);
|
||||||
|
|
||||||
|
int entitiesCount = world.getEntitiesWithinAABB(mob.getClass(),
|
||||||
|
AxisAlignedBB.getBoundingBox((int)pos[0], (int)pos[1], (int)pos[2], (int)pos[0] + 1, (int)pos[1] + 1, (int)pos[2] + 1)
|
||||||
|
.expand(8.0D, 4.0D, 8.0D)).size();
|
||||||
|
|
||||||
|
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||||
|
|
||||||
|
if (entitiesCount < this.maxMobsInArea && mob.getCanSpawnHere())
|
||||||
|
{
|
||||||
|
// Try some Reflection on TC code. This could be dangerous.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Class wispEntity = Class.forName(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: " + ThaumcraftHelper.Entity.WISP.getClassName()
|
||||||
|
+ " Please report this error in the thread if you see it.", (Object[])null);
|
||||||
|
}
|
||||||
|
|
||||||
|
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||||
|
if (this.aggosOnPlayer && player != null)
|
||||||
|
{
|
||||||
|
if (ItemArmorApiarist.getNumberPiecesWorn(player) < 4)
|
||||||
|
{
|
||||||
|
// Protect fully suited player from initial murder intent.
|
||||||
|
mob.setAttackTarget(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return spawnedFlag;
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package thaumicbees.bees.genetics;
|
package thaumicbees.bees;
|
||||||
|
|
||||||
import forestry.api.apiculture.IAlleleFlowers;
|
import forestry.api.apiculture.IAlleleFlowers;
|
||||||
import forestry.api.apiculture.IFlowerProvider;
|
import forestry.api.apiculture.IFlowerProvider;
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import forestry.api.genetics.IAlleleInteger;
|
||||||
|
|
||||||
|
public class AlleleInteger extends Allele implements IAlleleInteger
|
||||||
|
{
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
public AlleleInteger(String id, int val, boolean isDominant)
|
||||||
|
{
|
||||||
|
super(id, isDominant);
|
||||||
|
this.value = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getValue()
|
||||||
|
{
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
package thaumicbees.bees;
|
|
||||||
|
|
||||||
import forestry.api.apiculture.IBeeBranch;
|
|
||||||
import forestry.api.genetics.IAlleleSpecies;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class BeeBranch implements IBeeBranch
|
|
||||||
{
|
|
||||||
|
|
||||||
public static BeeBranch Arcane;
|
|
||||||
public static BeeBranch Supernatural;
|
|
||||||
public static BeeBranch Stark;
|
|
||||||
public static BeeBranch Elemental;
|
|
||||||
public static BeeBranch Scholarly;
|
|
||||||
private String uID;
|
|
||||||
private String name;
|
|
||||||
private String scientific;
|
|
||||||
private String description;
|
|
||||||
private ArrayList memberSpecies;
|
|
||||||
|
|
||||||
public BeeBranch(String branchName, String scientificName)
|
|
||||||
{
|
|
||||||
this(branchName, scientificName, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
public BeeBranch(String branchName, String scientificName, String branchDescription)
|
|
||||||
{
|
|
||||||
uID = (new StringBuilder()).append("thaumicbees.branch.").append(branchName.toLowerCase()).toString();
|
|
||||||
name = branchName;
|
|
||||||
scientific = scientificName;
|
|
||||||
description = branchDescription;
|
|
||||||
memberSpecies = new ArrayList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getUID()
|
|
||||||
{
|
|
||||||
return uID;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
return name;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getScientific()
|
|
||||||
{
|
|
||||||
return scientific;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
return description;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IAlleleSpecies[] getMembers()
|
|
||||||
{
|
|
||||||
return (IAlleleSpecies[]) memberSpecies.toArray(new IAlleleSpecies[memberSpecies.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void addMember(IAlleleSpecies species)
|
|
||||||
{
|
|
||||||
memberSpecies.add(species);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,109 @@
|
|||||||
|
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", ""),
|
||||||
|
SCHOLARLY("Scholarly", ""),
|
||||||
|
THAUMIC("Thaumic", ""),
|
||||||
|
SKULKING("Skulking", ""),
|
||||||
|
VIS("Vis", ""),
|
||||||
|
TIME("Time", ""),
|
||||||
|
;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,510 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
import forestry.api.apiculture.BeeManager;
|
||||||
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
|
import forestry.api.core.ItemInterface;
|
||||||
|
import forestry.api.genetics.AlleleManager;
|
||||||
|
import forestry.api.genetics.IAllele;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simply a class to hold all the functions to manage species' default genomes.
|
||||||
|
* @author MysteriousAges
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BeeGenomeManager
|
||||||
|
{
|
||||||
|
// Basic genome for All thaumic bees.
|
||||||
|
private static IAllele[] getTemplateBaseThaumic()
|
||||||
|
{
|
||||||
|
IAllele[] genome = new IAllele[EnumBeeChromosome.values().length];
|
||||||
|
|
||||||
|
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");
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||||
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolFalse");
|
||||||
|
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolFalse");
|
||||||
|
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolFalse");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersVanilla");
|
||||||
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
|
||||||
|
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryDefault");
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectNone");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Basic genome for Arcane branch bees.
|
||||||
|
private static IAllele[] getTemplateBaseArcane()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||||
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlow");
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityHigh");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Specialization genome for Esoteric bees.
|
||||||
|
public static IAllele[] getTemplateEsoteric()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseArcane();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ESOTERIC;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateMysterious()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseArcane();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.MYSTERIOUS;
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateArcane()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseArcane();
|
||||||
|
|
||||||
|
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");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IAllele[] getTemplateBaseSupernatural()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
||||||
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateCharmed()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseSupernatural();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.CHARMED;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateEnchanted()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseSupernatural();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ENCHANTED;
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateSupernatural()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseSupernatural();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SUPERNATURAL;
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||||
|
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IAllele[] getTemplateBaseScholarly()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||||
|
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanElongated");
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp2");
|
||||||
|
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerBookshelf;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplatePupil()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseScholarly();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.PUPIL;
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlower");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateScholarly()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseScholarly();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SCHOLARLY;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateSavant()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseScholarly();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SAVANT;
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IAllele[] getTemplateBaseElemental()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerThaumcraft;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateStark()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.STARK;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateAir()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
|
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");
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringMaximum");
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.moveSpeed;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateFire()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
|
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");
|
||||||
|
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp2");
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectIgnition");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateWater()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
|
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");
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.cleansingEffect;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateEarth()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
|
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");
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringFastest");
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.digSpeed;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateInfused()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.INFUSED;
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
||||||
|
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IAllele[] getTemplateBaseVis()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateAware()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.AWARE;
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateVis()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplatePure()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateFlux()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateNode()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IAllele[] getTemplateBaseMalevolent()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
|
||||||
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringFaster");
|
||||||
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.fertilityHighDominant;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateSkulking()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SKULKING;
|
||||||
|
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateBrainy()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BRAINY;
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnBrainyZombie;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateGossamer()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.GOSSAMER;
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateWispy()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
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");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateBatty()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BATTY;
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnBats;
|
||||||
|
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateGhastly()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
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");
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnGhast;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getBeeNBTForSpecies(BeeSpecies species, EnumBeeType beeType)
|
||||||
|
{
|
||||||
|
ItemStack taggedBee;
|
||||||
|
switch (beeType)
|
||||||
|
{
|
||||||
|
case PRINCESS:
|
||||||
|
taggedBee = ItemInterface.getItem("beePrincessGE");
|
||||||
|
break;
|
||||||
|
case QUEEN:
|
||||||
|
taggedBee = ItemInterface.getItem("beeQueenGE");
|
||||||
|
break;
|
||||||
|
case DRONE:
|
||||||
|
default:
|
||||||
|
taggedBee = ItemInterface.getItem("beeDroneGE");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
NBTTagCompound tags = new NBTTagCompound();
|
||||||
|
|
||||||
|
addGeneToCompound(EnumBeeChromosome.SPECIES, species, tags);
|
||||||
|
|
||||||
|
taggedBee.setTagCompound(tags);
|
||||||
|
|
||||||
|
return taggedBee;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void addGeneToCompound(EnumBeeChromosome gene, IAllele allele, NBTTagCompound compound)
|
||||||
|
{
|
||||||
|
NBTTagCompound geneRoot = new NBTTagCompound();
|
||||||
|
compound.setTag("Genome", geneRoot);
|
||||||
|
NBTTagList chromosomes = new NBTTagList();
|
||||||
|
geneRoot.setTag("Chromosomes", chromosomes);
|
||||||
|
|
||||||
|
NBTTagCompound selectedGene = new NBTTagCompound();
|
||||||
|
chromosomes.appendTag(selectedGene);
|
||||||
|
|
||||||
|
selectedGene.setByte("Slot", (byte)gene.ordinal());
|
||||||
|
selectedGene.setString("UID0", allele.getUID());
|
||||||
|
selectedGene.setString("UID1", allele.getUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,291 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
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;
|
||||||
|
public static BeeMutation Timely;
|
||||||
|
public static BeeMutation Lordly;
|
||||||
|
public static BeeMutation Doctoral;
|
||||||
|
|
||||||
|
public static void setupMutations()
|
||||||
|
{
|
||||||
|
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(BeeSpecies.ESOTERIC, Allele.getBaseSpecies("Ended"), BeeSpecies.MYSTERIOUS, 10);
|
||||||
|
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.Scholarly = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.ARCANE, BeeSpecies.SCHOLARLY, 8);
|
||||||
|
BeeMutation.Savant = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.SCHOLARLY, BeeSpecies.SAVANT, 6);
|
||||||
|
BeeMutation.Stark = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.SUPERNATURAL, BeeSpecies.STARK, 8);
|
||||||
|
|
||||||
|
BeeMutation.Aware = new BeeMutation(Allele.getBaseSpecies("Demonic"), Allele.getBaseSpecies("Edenic"), BeeSpecies.AWARE, 12);
|
||||||
|
BeeMutation.Vis = new BeeMutation(BeeSpecies.AWARE, BeeSpecies.ARCANE, BeeSpecies.VIS, 9)
|
||||||
|
.setAuraNodeRequired(40);
|
||||||
|
BeeMutation.Vis1 = new BeeMutation(BeeSpecies.AWARE, BeeSpecies.STARK, BeeSpecies.VIS, 12)
|
||||||
|
.setAuraNodeRequired(80);
|
||||||
|
|
||||||
|
BeeMutation.Pure = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Edenic"), BeeSpecies.PURE, 7)
|
||||||
|
.setAuraNodeTypeRequired(5, EnumNodeType.PURE).setMoonPhaseBonus(MoonPhase.NEW, MoonPhase.NEW, 1.6f);
|
||||||
|
BeeMutation.Flux = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Edenic"), BeeSpecies.FLUX, 7)
|
||||||
|
.setAuraNodeTypeRequired(30, EnumNodeType.UNSTABLE).setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 1.6f);
|
||||||
|
|
||||||
|
BeeMutation.Node = new BeeMutation(BeeSpecies.VIS, BeeSpecies.VIS, BeeSpecies.NODE, 2)
|
||||||
|
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WANING_HALF, MoonPhase.WANING_HALF);
|
||||||
|
BeeMutation.Node1 = new BeeMutation(BeeSpecies.VIS, BeeSpecies.VIS, BeeSpecies.NODE, 2)
|
||||||
|
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WAXING_HALF);
|
||||||
|
|
||||||
|
// Now we get into a little bit of branching...
|
||||||
|
if (ThaumicBees.getConfig().ExtraBeesInstalled)
|
||||||
|
{
|
||||||
|
setupMutationsExtraBeesBase();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setupMutationsForestryBase();
|
||||||
|
}
|
||||||
|
BeeMutation.Gossamer.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.WANING_CRESCENT);
|
||||||
|
BeeMutation.Wispy = new BeeMutation(BeeSpecies.GOSSAMER, Allele.getBaseSpecies("Cultivated"), BeeSpecies.WISPY, 8);
|
||||||
|
|
||||||
|
BeeMutation.Timely = new BeeMutation(Allele.getBaseSpecies("Industrious"), BeeSpecies.ENCHANTED, BeeSpecies.TIMELY, 10);
|
||||||
|
BeeMutation.Lordly = new BeeMutation(BeeSpecies.TIMELY, Allele.getBaseSpecies("Imperial"), BeeSpecies.LORDLY, 9);
|
||||||
|
BeeMutation.Doctoral = new BeeMutation(BeeSpecies.TIMELY, BeeSpecies.LORDLY, BeeSpecies.DOCTORAL, 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupMutationsExtraBeesBase()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getExtraSpecies("desolate"), BeeSpecies.SKULKING, 10);
|
||||||
|
BeeMutation.Brainy = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("rotten"), BeeSpecies.BRAINY, 12);
|
||||||
|
BeeMutation.Gossamer = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("ancient"), BeeSpecies.GOSSAMER, 10);
|
||||||
|
BeeMutation.Batty = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("rock"), BeeSpecies.BATTY, 14);
|
||||||
|
BeeMutation.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("creeper"), BeeSpecies.GHASTLY, 13);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
FMLLog.warning("ThaumicBees encountered an error attempting to register mutations using Extra Bees species! Ensure Extra Bees was able to initialize correctly!");
|
||||||
|
FMLLog.info("Could not use Extra Bees species for mutations. Falling back to Forestry defaults.");
|
||||||
|
setupMutationsForestryBase();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupMutationsForestryBase()
|
||||||
|
{
|
||||||
|
BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getBaseSpecies("Modest"), BeeSpecies.SKULKING, 10);
|
||||||
|
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.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Austere"), BeeSpecies.GHASTLY, 13);
|
||||||
|
}
|
||||||
|
|
||||||
|
private IAllele parent1;
|
||||||
|
private IAllele parent2;
|
||||||
|
private IAllele mutationTemplate[];
|
||||||
|
private int baseChance;
|
||||||
|
private boolean isSecret;
|
||||||
|
private boolean isMoonRestricted;
|
||||||
|
private MoonPhase moonPhaseStart;
|
||||||
|
private MoonPhase moonPhaseEnd;
|
||||||
|
private float moonPhaseMutationBonus;
|
||||||
|
private boolean nodeRequired;
|
||||||
|
private EnumNodeType nodeType;
|
||||||
|
private double nodeRange;
|
||||||
|
|
||||||
|
public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, BeeSpecies resultSpecies, int percentChance)
|
||||||
|
{
|
||||||
|
this.parent1 = species0;
|
||||||
|
this.parent2 = species1;
|
||||||
|
this.mutationTemplate = resultSpecies.getGenome();
|
||||||
|
this.baseChance = percentChance;
|
||||||
|
this.isSecret = false;
|
||||||
|
this.isMoonRestricted = false;
|
||||||
|
this.moonPhaseMutationBonus = -1f;
|
||||||
|
this.nodeType = null;
|
||||||
|
|
||||||
|
BeeManager.breedingManager.registerBeeMutation(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
||||||
|
{
|
||||||
|
int finalChance = 0;
|
||||||
|
float chance = this.baseChance * 1f;
|
||||||
|
|
||||||
|
if (this.arePartners(allele0, allele1))
|
||||||
|
{
|
||||||
|
// This mutation applies. Continue calculation.
|
||||||
|
if (this.moonPhaseStart != null && this.moonPhaseEnd != null)
|
||||||
|
{
|
||||||
|
// Only occurs during the phases.
|
||||||
|
if (this.isMoonRestricted && !MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd))
|
||||||
|
{
|
||||||
|
chance = 0;
|
||||||
|
}
|
||||||
|
else if (this.moonPhaseMutationBonus != -1f)
|
||||||
|
{
|
||||||
|
// There is a bonus to this mutation during moon phases...
|
||||||
|
if (MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd))
|
||||||
|
{
|
||||||
|
chance = (int)(chance * this.moonPhaseMutationBonus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.nodeRequired)
|
||||||
|
{
|
||||||
|
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(housing.getWorld(),
|
||||||
|
housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), this.nodeRange);
|
||||||
|
if (nodeId >= 0)
|
||||||
|
{
|
||||||
|
if (this.nodeType != null)
|
||||||
|
{
|
||||||
|
// Needs a _specific_ variety of node
|
||||||
|
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||||
|
if (node.type != this.nodeType)
|
||||||
|
{
|
||||||
|
chance = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
chance = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
finalChance = Math.round(chance
|
||||||
|
* housing.getMutationModifier((IBeeGenome) genome0,
|
||||||
|
(IBeeGenome) genome1)
|
||||||
|
* BeeManager.breedingManager.getBeekeepingMode(housing.getWorld())
|
||||||
|
.getMutationModifier((IBeeGenome) genome0,
|
||||||
|
(IBeeGenome) genome1));
|
||||||
|
}
|
||||||
|
|
||||||
|
return finalChance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IAllele getAllele0()
|
||||||
|
{
|
||||||
|
return parent1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IAllele getAllele1()
|
||||||
|
{
|
||||||
|
return parent2;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IAllele[] getTemplate()
|
||||||
|
{
|
||||||
|
return mutationTemplate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBaseChance()
|
||||||
|
{
|
||||||
|
return baseChance;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isPartner(IAllele allele)
|
||||||
|
{
|
||||||
|
return parent1.getUID().equals(allele.getUID()) || parent2.getUID().equals(allele.getUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
public IAllele getPartner(IAllele allele)
|
||||||
|
{
|
||||||
|
IAllele val = parent1;
|
||||||
|
if (val.getUID().equals(allele.getUID()))
|
||||||
|
val = parent2;
|
||||||
|
return val;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean arePartners(IAllele alleleA, IAllele alleleB)
|
||||||
|
{
|
||||||
|
return (this.parent1.getUID().equals(alleleA.getUID())) && this.parent2.getUID().equals(alleleB.getUID()) ||
|
||||||
|
this.parent1.getUID().equals(alleleB.getUID()) && this.parent2.getUID().equals(alleleA.getUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeMutation setSecret()
|
||||||
|
{
|
||||||
|
this.isSecret = true;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSecret()
|
||||||
|
{
|
||||||
|
return isSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeMutation setMoonPhaseRestricted(MoonPhase begin, MoonPhase end)
|
||||||
|
{
|
||||||
|
this.isMoonRestricted = true;
|
||||||
|
this.moonPhaseStart = begin;
|
||||||
|
this.moonPhaseEnd = end;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeMutation setMoonPhaseBonus(MoonPhase begin, MoonPhase end, float mutationBonus)
|
||||||
|
{
|
||||||
|
this.moonPhaseMutationBonus = mutationBonus;
|
||||||
|
this.moonPhaseStart = begin;
|
||||||
|
this.moonPhaseEnd = end;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeMutation setAuraNodeRequired(double range)
|
||||||
|
{
|
||||||
|
this.nodeRequired = true;
|
||||||
|
this.nodeRange = range;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeMutation setAuraNodeTypeRequired(double range, EnumNodeType type)
|
||||||
|
{
|
||||||
|
this.nodeType = type;
|
||||||
|
|
||||||
|
return this.setAuraNodeRequired(range);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,385 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.*;
|
||||||
|
import forestry.api.core.EnumHumidity;
|
||||||
|
import forestry.api.core.EnumTemperature;
|
||||||
|
import forestry.api.core.ItemInterface;
|
||||||
|
import forestry.api.genetics.*;
|
||||||
|
import forestry.api.genetics.IClassification.EnumClassLevel;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
import thaumicbees.item.types.CombType;
|
||||||
|
import thaumicbees.item.types.DropType;
|
||||||
|
import thaumicbees.item.types.PollenType;
|
||||||
|
import thaumicbees.item.types.ResourceType;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||||
|
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.stats.Achievement;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public enum BeeSpecies implements IAlleleBeeSpecies
|
||||||
|
{
|
||||||
|
ESOTERIC("Esoteric", "secretiore",
|
||||||
|
BeeClassification.ARCANE, 0x001099, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
|
MYSTERIOUS("Mysterious", "mysticus",
|
||||||
|
BeeClassification.ARCANE, 0x762bc2, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
|
ARCANE("Arcane", "arcanus",
|
||||||
|
BeeClassification.ARCANE, 0xd242df, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
|
CHARMED("Charmed", "larvatus",
|
||||||
|
BeeClassification.SUPERNATURAL, 0x48EEEC, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
|
ENCHANTED("Enchanted", "cantatus",
|
||||||
|
BeeClassification.SUPERNATURAL, 0x18e726, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
|
||||||
|
SUPERNATURAL("Supernatural", "coeleste",
|
||||||
|
BeeClassification.SUPERNATURAL, 0x005614, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
|
PUPIL("Pupil", "disciplina",
|
||||||
|
BeeClassification.SCHOLARLY, 0xFFFF00, EnumTemperature.NORMAL, EnumHumidity.ARID, false, true),
|
||||||
|
SCHOLARLY("Scholarly", "studiosis",
|
||||||
|
BeeClassification.SCHOLARLY, 0x6E0000, EnumTemperature.NORMAL, EnumHumidity.ARID, false, false),
|
||||||
|
SAVANT("Savant", "philologus",
|
||||||
|
BeeClassification.SCHOLARLY, 0x6E1C6D, EnumTemperature.NORMAL, EnumHumidity.ARID, true, false),
|
||||||
|
STARK("Stark", "torridae",
|
||||||
|
BeeClassification.THAUMIC, 0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||||
|
AIR("Aura", "ventosa",
|
||||||
|
BeeClassification.THAUMIC, 0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
|
FIRE("Ignis", "praefervidus",
|
||||||
|
BeeClassification.THAUMIC, 0xE50B0B, 0x95132F, EnumTemperature.HOT, EnumHumidity.ARID, true, true),
|
||||||
|
WATER("Aqua", "umidus",
|
||||||
|
BeeClassification.THAUMIC, 0x36CFD9, 0x1054A1, EnumTemperature.NORMAL, EnumHumidity.DAMP, true, true),
|
||||||
|
EARTH("Solum", "sordida",
|
||||||
|
BeeClassification.THAUMIC, 0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
|
INFUSED("Praecantatio", "azanorius",
|
||||||
|
BeeClassification.THAUMIC, 0xaa32fc, 0x7A489E, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
|
||||||
|
AWARE("Aware", "sensibilis",
|
||||||
|
BeeClassification.VIS, 0xb0092e9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
|
VIS("Vis", "arcanus saecula",
|
||||||
|
BeeClassification.VIS, 0x004c99, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
|
||||||
|
PURE("Pure", "arcanus puritatem",
|
||||||
|
BeeClassification.VIS, 0xb0092e9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||||
|
FLUX("Flux", "arcanus labe",
|
||||||
|
BeeClassification.VIS, 0x004c99, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||||
|
NODE("Node", "conficiens",
|
||||||
|
BeeClassification.VIS, 0xFFF266, 0xFF8CE9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
|
||||||
|
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),
|
||||||
|
;
|
||||||
|
|
||||||
|
public static void setupBeeSpecies()
|
||||||
|
{
|
||||||
|
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)
|
||||||
|
.addSpecialty(new ItemStack(Config.tcNuggets, 1, ThaumcraftHelper.NuggetType.QUICKSILVER.ordinal()), 8)
|
||||||
|
.setGenome(BeeGenomeManager.getTemplateAir())
|
||||||
|
.register();
|
||||||
|
FIRE.addProduct(Config.combs.getStackForType(CombType.FIREY), 15)
|
||||||
|
.addSpecialty(new ItemStack(Item.blazePowder), 8)
|
||||||
|
.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)
|
||||||
|
.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()), 6)
|
||||||
|
.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();
|
||||||
|
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)
|
||||||
|
.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.ZOMBIE_BRAIN.ordinal()), 2)
|
||||||
|
.setGenome(BeeGenomeManager.getTemplateBrainy())
|
||||||
|
.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();
|
||||||
|
BATTY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
|
||||||
|
.addSpecialty(new ItemStack(Item.gunpowder), 4)
|
||||||
|
.setGenome(BeeGenomeManager.getTemplateBatty())
|
||||||
|
.register();
|
||||||
|
GHASTLY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 8)
|
||||||
|
.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();
|
||||||
|
}
|
||||||
|
|
||||||
|
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[];
|
||||||
|
private String uid;
|
||||||
|
private boolean dominant;
|
||||||
|
|
||||||
|
private BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
|
||||||
|
{
|
||||||
|
this(speciesName, genusName, classification, 0, firstColour, 0xFF6E0D, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant);
|
||||||
|
}
|
||||||
|
|
||||||
|
private BeeSpecies(String speciesName, String genusName, IClassification classification, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
|
||||||
|
{
|
||||||
|
this(speciesName, genusName, classification, 0, firstColour, secondColour, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeSpecies setGenome(IAllele genome[])
|
||||||
|
{
|
||||||
|
genomeTemplate = genome;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IAllele[] getGenome()
|
||||||
|
{
|
||||||
|
return genomeTemplate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeSpecies addProduct(ItemStack produce, int percentChance)
|
||||||
|
{
|
||||||
|
products.put(produce, Integer.valueOf(percentChance));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeSpecies addSpecialty(ItemStack produce, int percentChance)
|
||||||
|
{
|
||||||
|
specialty.put(produce, Integer.valueOf(percentChance));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getBeeItem(EnumBeeType beeType)
|
||||||
|
{
|
||||||
|
return BeeManager.beeInterface.getBeeStack(BeeManager.beeInterface.getBee(null, BeeManager.beeInterface.templateAsGenome(genomeTemplate)), beeType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString(getUID());
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString(getUID() + ".description");
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getBodyType()
|
||||||
|
{
|
||||||
|
return bodyType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getPrimaryColor()
|
||||||
|
{
|
||||||
|
return primaryColour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getSecondaryColor()
|
||||||
|
{
|
||||||
|
return secondaryColour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumTemperature getTemperature()
|
||||||
|
{
|
||||||
|
return temperature;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EnumHumidity getHumidity()
|
||||||
|
{
|
||||||
|
return humidity;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean hasEffect()
|
||||||
|
{
|
||||||
|
return hasEffect;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isSecret()
|
||||||
|
{
|
||||||
|
return isSecret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCounted()
|
||||||
|
{
|
||||||
|
return isCounted;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBinomial()
|
||||||
|
{
|
||||||
|
return binomial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAuthority()
|
||||||
|
{
|
||||||
|
return authority;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IClassification getBranch()
|
||||||
|
{
|
||||||
|
return this.branch;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap getProducts()
|
||||||
|
{
|
||||||
|
return products;
|
||||||
|
}
|
||||||
|
|
||||||
|
public HashMap getSpecialty()
|
||||||
|
{
|
||||||
|
return specialty;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getUID()
|
||||||
|
{
|
||||||
|
return this.uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isDominant()
|
||||||
|
{
|
||||||
|
return this.dominant;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isJubilant(World world, int biomeid, int x, int y, int z)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
private BeeSpecies register()
|
||||||
|
{
|
||||||
|
BeeManager.breedingManager.registerBeeTemplate(this.getGenome());
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Method getAchievement is deprecated
|
||||||
|
*/
|
||||||
|
|
||||||
|
public Achievement getAchievement()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,115 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
import thaumcraft.api.AuraNode;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IFlowerProvider;
|
||||||
|
import forestry.api.genetics.IPollinatable;
|
||||||
|
|
||||||
|
public class FlowerProviderAuraNode implements IFlowerProvider
|
||||||
|
{
|
||||||
|
protected int nodeRange = 70;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAcceptedFlower(World world, IBeeGenome genome, int x, int y, int z)
|
||||||
|
{
|
||||||
|
return this.isNodeWithinRange(world, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isAcceptedPollinatable(World world, IPollinatable pollinatable)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean growFlower(World world, IBeeGenome genome, int x, int y, int z)
|
||||||
|
{
|
||||||
|
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))
|
||||||
|
{
|
||||||
|
int rand = world.rand.nextInt(10);
|
||||||
|
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||||
|
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.bees.flower.node");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
|
||||||
|
{
|
||||||
|
return products;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack[] getItemStacks()
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean isNodeWithinRange(World w, int x, int y, int z)
|
||||||
|
{
|
||||||
|
boolean nodeNearby = false;
|
||||||
|
if (ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, this.nodeRange) >= 0)
|
||||||
|
{
|
||||||
|
nodeNearby = true;
|
||||||
|
}
|
||||||
|
return nodeNearby;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected AuraNode getNodeWithinRange(World w, int x, int y, int z)
|
||||||
|
{
|
||||||
|
AuraNode node = null;
|
||||||
|
|
||||||
|
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, this.nodeRange);
|
||||||
|
if (nodeId >= 0)
|
||||||
|
{
|
||||||
|
node = ThaumcraftApi.getNodeCopy(nodeId);
|
||||||
|
}
|
||||||
|
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ItemStack[] addItemToProducts(ItemStack[] products, ItemStack itemStack)
|
||||||
|
{
|
||||||
|
for (ItemStack stack : products)
|
||||||
|
{
|
||||||
|
if (stack.itemID == itemStack.itemID && stack.getItemDamage() == itemStack.getItemDamage())
|
||||||
|
{
|
||||||
|
if (stack.stackSize < stack.getItem().getItemStackLimit())
|
||||||
|
{
|
||||||
|
stack.stackSize += itemStack.stackSize;
|
||||||
|
itemStack.stackSize = Math.max(stack.stackSize - stack.getItem().getItemStackLimit(), 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (itemStack.stackSize > 0)
|
||||||
|
{
|
||||||
|
ItemStack[] newProducts = new ItemStack[products.length + 1];
|
||||||
|
for (int i = 0; i < products.length; ++i)
|
||||||
|
{
|
||||||
|
newProducts[i] = products[i];
|
||||||
|
}
|
||||||
|
newProducts[products.length] = itemStack;
|
||||||
|
products = newProducts;
|
||||||
|
}
|
||||||
|
|
||||||
|
return products;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
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;
|
||||||
|
import forestry.api.apiculture.IFlowerProvider;
|
||||||
|
import forestry.api.genetics.IPollinatable;
|
||||||
|
|
||||||
|
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(20) < 1)
|
||||||
|
{
|
||||||
|
EnumTag tag;
|
||||||
|
do
|
||||||
|
{
|
||||||
|
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
|
||||||
|
}
|
||||||
|
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
|
||||||
|
|
||||||
|
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
|
||||||
|
if (nodeId != -1)
|
||||||
|
{
|
||||||
|
int quantity = world.rand.nextInt(2) + 1;
|
||||||
|
ThaumcraftApi.queueNodeChanges(nodeId, 0, 0, false, new ObjectTags().add(tag, quantity), 0f, 0f, 0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return products;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.bees.flower.nodeFlux");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
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;
|
||||||
|
import thaumcraft.api.AuraNode;
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
|
||||||
|
public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public boolean growFlower(World world, IBeeGenome genome, int x, int y, int z)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
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(25) < 1)
|
||||||
|
{
|
||||||
|
AuraNode node = this.getNodeWithinRange(world, x, y, z);
|
||||||
|
if (node != null && (1.0 * node.level) / node.baseLevel > 0.75)
|
||||||
|
{
|
||||||
|
int aspectCount = node.flux.tags.size();
|
||||||
|
if (aspectCount > 0)
|
||||||
|
{
|
||||||
|
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
|
||||||
|
if (selectedTag != null)
|
||||||
|
{
|
||||||
|
node.flux.remove(selectedTag, 1);
|
||||||
|
ThaumcraftApi.queueNodeChanges(node.key, node.baseLevel / -16, 0, false, new ObjectTags().add(selectedTag, -1), 0, 0, 0);
|
||||||
|
products = addItemToProducts(products, new ItemStack(Config.solidFlux, 1, selectedTag.id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return products;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package thaumicbees.bees;
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@@ -46,6 +48,6 @@ public class FlowerProviderBookshelf implements IFlowerProvider
|
|||||||
|
|
||||||
public String getDescription()
|
public String getDescription()
|
||||||
{
|
{
|
||||||
return "Books";
|
return LocalizationManager.getLocalizedString("tb.bees.flower.book");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
package thaumicbees.bees;
|
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.block.Block;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
@@ -10,13 +13,13 @@ import forestry.api.genetics.IPollinatable;
|
|||||||
|
|
||||||
public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||||
{
|
{
|
||||||
private ItemStack[] flowers = {new ItemStack(BlockManager.ThaumcraftPlant, 1, 2), new ItemStack(BlockManager.ThaumcraftPlant, 1, 3) };
|
private ItemStack[] flowers = {new ItemStack(Config.tcPlant, 1, 2), new ItemStack(Config.tcPlant, 1, 3) };
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isAcceptedFlower(World world, IBeeGenome genome, int x, int y, int z)
|
public boolean isAcceptedFlower(World world, IBeeGenome genome, int x, int y, int z)
|
||||||
{
|
{
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
if (world.getBlockId(x, y, z) == BlockManager.ThaumcraftPlant.blockID)
|
if (world.getBlockId(x, y, z) == Config.tcPlant.blockID)
|
||||||
{
|
{
|
||||||
int meta = world.getBlockMetadata(x, y, z);
|
int meta = world.getBlockMetadata(x, y, z);
|
||||||
if (meta == 2 || meta == 3)
|
if (meta == 2 || meta == 3)
|
||||||
@@ -32,12 +35,18 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
|||||||
{
|
{
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
int blockDown = world.getBlockId(x, y - 1, z);
|
int blockDown = world.getBlockId(x, y - 1, z);
|
||||||
if (world.isAirBlock(x, y, z) && (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID))
|
if (world.isAirBlock(x, y, z))
|
||||||
{
|
{
|
||||||
int rand = world.rand.nextInt(10);
|
if (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID)
|
||||||
world.setBlockAndMetadataWithNotify(x, y, z, BlockManager.ThaumcraftPlant.blockID, (rand >= 5) ? 2 : 3);
|
{
|
||||||
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.SHIMMERLEAF.ordinal());
|
||||||
flag = true;
|
flag = true;
|
||||||
|
}
|
||||||
|
else if (blockDown == Block.sand.blockID)
|
||||||
|
{
|
||||||
|
world.setBlockAndMetadataWithNotify(x, y, z, Config.tcPlant.blockID, ThaumcraftHelper.BlockPlant.CINDERPEARL.ordinal());
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return flag;
|
return flag;
|
||||||
}
|
}
|
||||||
@@ -45,7 +54,7 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
|||||||
@Override
|
@Override
|
||||||
public String getDescription()
|
public String getDescription()
|
||||||
{
|
{
|
||||||
return "Magic Flowers";
|
return LocalizationManager.getLocalizedString("tb.bees.flower.magic");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,301 +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 java.lang.reflect.Field;
|
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import thaumcraft.api.EnumTag;
|
|
||||||
import thaumcraft.api.ObjectTags;
|
|
||||||
import thaumcraft.api.ThaumcraftApi;
|
|
||||||
import thaumicbees.bees.genetics.Allele;
|
|
||||||
import thaumicbees.bees.genetics.AlleleEffectCure;
|
|
||||||
import thaumicbees.bees.genetics.AlleleEffectPotion;
|
|
||||||
import thaumicbees.bees.genetics.AlleleFlower;
|
|
||||||
import thaumicbees.bees.genetics.BeeGenomeManager;
|
|
||||||
import thaumicbees.bees.genetics.BeeMutation;
|
|
||||||
import thaumicbees.bees.genetics.BeeSpecies;
|
|
||||||
import thaumicbees.item.ItemManager;
|
|
||||||
import thaumicbees.item.ItemComb.CombType;
|
|
||||||
import thaumicbees.item.ItemMiscResources.ResourceType;
|
|
||||||
import thaumicbees.main.ThaumicBees;
|
|
||||||
|
|
||||||
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 ThaumicBeesPlugin implements IPlugin
|
|
||||||
{
|
|
||||||
|
|
||||||
private static int defaultBodyColour = 0xFF6E0D;
|
|
||||||
private static boolean hideSpecies = true;
|
|
||||||
|
|
||||||
public boolean isAvailable()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void preInit()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public void doInit()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Field f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
|
|
||||||
ThaumicBees.object.configFlags.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()
|
|
||||||
{
|
|
||||||
setupBeeSpecies();
|
|
||||||
setupBeeMutations();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void setupBeeSpecies()
|
|
||||||
{
|
|
||||||
IBreedingManager breedingMgr = BeeManager.breedingManager;
|
|
||||||
BeeBranch.Arcane = new BeeBranch("Arcane", "arcanis");
|
|
||||||
BeeBranch.Supernatural = new BeeBranch("Supernatural", "coeleste");
|
|
||||||
BeeBranch.Stark = new BeeBranch("Stark", "torridus", "Nothing of the mundane world remains in these bees.");
|
|
||||||
|
|
||||||
BeeBranch.Elemental = new BeeBranch("Elemental", "praecantatio");
|
|
||||||
BeeBranch.Scholarly = new BeeBranch("Scholarly", "scholasticus");
|
|
||||||
|
|
||||||
Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true);
|
|
||||||
Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), 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.Esoteric = new BeeSpecies("Esoteric", "", "secretiore", BeeBranch.Arcane, 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());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Esoteric.getGenome());
|
|
||||||
|
|
||||||
Allele.Mysterious = new BeeSpecies("Mysterious", "", "mysticus", BeeBranch.Arcane, 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());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Mysterious.getGenome());
|
|
||||||
|
|
||||||
Allele.Arcane = new BeeSpecies("Arcane", "", "arcanus", BeeBranch.Arcane, 0,
|
|
||||||
0xd242df, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
|
||||||
true, hideSpecies, true, true);
|
|
||||||
Allele.Arcane.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 30);
|
|
||||||
Allele.Arcane.setGenome(BeeGenomeManager.getTemplateArcane());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Arcane.getGenome());
|
|
||||||
|
|
||||||
Allele.Charmed = new BeeSpecies("Charmed", "", "larvatus", BeeBranch.Supernatural, 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());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Charmed.getGenome());
|
|
||||||
|
|
||||||
Allele.Enchanted = new BeeSpecies("Enchanted", "", "cantatus", BeeBranch.Supernatural, 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());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Enchanted.getGenome());
|
|
||||||
|
|
||||||
Allele.Supernatural = new BeeSpecies("Supernatural", "", "coeleste", BeeBranch.Supernatural, 0,
|
|
||||||
0x005614, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
|
||||||
true, hideSpecies, true, true);
|
|
||||||
Allele.Supernatural.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 40);
|
|
||||||
Allele.Supernatural.setGenome(BeeGenomeManager.getTemplateSupernatural());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Supernatural.getGenome());
|
|
||||||
|
|
||||||
Allele.Pupil = new BeeSpecies("Pupil", "", "disciplina", BeeBranch.Scholarly, 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());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Pupil.getGenome());
|
|
||||||
|
|
||||||
Allele.Scholarly = new BeeSpecies("Scholarly", "", "studiosis", BeeBranch.Scholarly, 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.KNOWLEDGE_FRAGMENT), 2);
|
|
||||||
Allele.Scholarly.setGenome(BeeGenomeManager.getTemplateScholarly());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Scholarly.getGenome());
|
|
||||||
|
|
||||||
Allele.Savant = new BeeSpecies("Savant", "", "philologus", BeeBranch.Scholarly, 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.KNOWLEDGE_FRAGMENT), 5);
|
|
||||||
Allele.Savant.setGenome(BeeGenomeManager.getTemplateSavant());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Savant.getGenome());
|
|
||||||
|
|
||||||
Allele.Stark = new BeeSpecies("Stark", "", "torridus", BeeBranch.Stark, 0,
|
|
||||||
0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
|
||||||
true, hideSpecies, true, false);
|
|
||||||
Allele.Stark.addProduct(ItemManager.combs.getStackForType(CombType.STARK), 5);
|
|
||||||
Allele.Stark.setGenome(BeeGenomeManager.getTemplateStark());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Stark.getGenome());
|
|
||||||
|
|
||||||
Allele.Air = new BeeSpecies("Aura", "", "ventosa", BeeBranch.Elemental, 0,
|
|
||||||
0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
|
||||||
true, hideSpecies, true, true);
|
|
||||||
Allele.Air.addProduct(ItemManager.combs.getStackForType(CombType.AIRY), 20);
|
|
||||||
Allele.Air.addSpecialty(ItemManager.quicksilver, 10);
|
|
||||||
Allele.Air.setGenome(BeeGenomeManager.getTemplateAir());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Air.getGenome());
|
|
||||||
|
|
||||||
Allele.Fire = new BeeSpecies("Ignis", "", "praefervidus", BeeBranch.Elemental, 0,
|
|
||||||
0xE50B0B, 0x95132F, EnumTemperature.HOT, EnumHumidity.ARID,
|
|
||||||
true, hideSpecies, true, true);
|
|
||||||
Allele.Fire.addProduct(ItemManager.combs.getStackForType(CombType.FIREY), 20);
|
|
||||||
Allele.Fire.addSpecialty(new ItemStack(Item.blazePowder), 8);
|
|
||||||
Allele.Fire.setGenome(BeeGenomeManager.getTemplateFire());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Fire.getGenome());
|
|
||||||
|
|
||||||
Allele.Water = new BeeSpecies("Aqua", "", "umidus", BeeBranch.Elemental, 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), 8);
|
|
||||||
Allele.Water.setGenome(BeeGenomeManager.getTemplateWater());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Water.getGenome());
|
|
||||||
|
|
||||||
Allele.Earth = new BeeSpecies("Solum", "", "sordida", BeeBranch.Elemental, 0,
|
|
||||||
0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
|
||||||
true, hideSpecies, true, true);
|
|
||||||
Allele.Earth.addProduct(ItemManager.combs.getStackForType(CombType.EARTHY), 30);
|
|
||||||
Allele.Earth.addSpecialty(ItemManager.amber, 10);
|
|
||||||
Allele.Earth.setGenome(BeeGenomeManager.getTemplateEarth());
|
|
||||||
breedingMgr.registerBeeTemplate(Allele.Earth.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.getGenome(), 10, false);
|
|
||||||
BeeMutation.Esoteric1 = new BeeMutation(Allele.getBaseSpecies("Heroic"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric.getGenome(), 25, false);
|
|
||||||
BeeMutation.Mysterious = new BeeMutation(Allele.Esoteric, Allele.getBaseSpecies("Ended"), Allele.Mysterious.getGenome(), 10, false);
|
|
||||||
BeeMutation.Arcane = new BeeMutation(Allele.Esoteric, Allele.Mysterious, Allele.Arcane.getGenome(), 8, false);
|
|
||||||
BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Cultivated"), Allele.getBaseSpecies("Valiant"), Allele.Charmed.getGenome(), 20, false);
|
|
||||||
BeeMutation.Enchanted = new BeeMutation(Allele.Charmed, Allele.getBaseSpecies("Valiant"), Allele.Enchanted.getGenome(), 8, false);
|
|
||||||
BeeMutation.Supernatural = new BeeMutation(Allele.Charmed, Allele.Enchanted, Allele.Supernatural.getGenome(), 8, false);
|
|
||||||
BeeMutation.Pupil = new BeeMutation(Allele.Arcane, Allele.Enchanted, Allele.Pupil.getGenome(), 10, false);
|
|
||||||
BeeMutation.Scholarly = new BeeMutation(Allele.Pupil, Allele.Arcane, Allele.Scholarly.getGenome(), 8, false);
|
|
||||||
BeeMutation.Savant = new BeeMutation(Allele.Pupil, Allele.Scholarly, Allele.Savant.getGenome(), 6, false);
|
|
||||||
BeeMutation.Stark = new BeeMutation(Allele.Arcane, Allele.Supernatural, Allele.Stark.getGenome(), 8, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setupBeeInfusions(World world)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
ItemStack starkDrone = Allele.Stark.getBeeItem(world, EnumBeeType.DRONE);
|
|
||||||
ItemStack starkPrincess = Allele.Stark.getBeeItem(world, EnumBeeType.PRINCESS);
|
|
||||||
ItemStack airDrone = Allele.Air.getBeeItem(world, EnumBeeType.DRONE);
|
|
||||||
ItemStack airPrincess = Allele.Air.getBeeItem(world, EnumBeeType.PRINCESS);
|
|
||||||
ItemStack waterDrone = Allele.Water.getBeeItem(world, EnumBeeType.DRONE);
|
|
||||||
ItemStack waterPrincess = Allele.Water.getBeeItem(world, EnumBeeType.PRINCESS);
|
|
||||||
ItemStack earthDrone = Allele.Earth.getBeeItem(world, EnumBeeType.DRONE);
|
|
||||||
ItemStack earthPrincess = Allele.Earth.getBeeItem(world, EnumBeeType.PRINCESS);
|
|
||||||
ItemStack fireDrone = Allele.Fire.getBeeItem(world, EnumBeeType.DRONE);
|
|
||||||
ItemStack firePrincess = Allele.Fire.getBeeItem(world, EnumBeeType.PRINCESS);
|
|
||||||
|
|
||||||
Item shard = (Item) Class.forName("thaumcraft.common.Config").getDeclaredField("itemShard").get(null);
|
|
||||||
|
|
||||||
ObjectTags tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 20);
|
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, airDrone, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 0) });
|
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, airPrincess, new Object[]
|
|
||||||
{ starkPrincess, new ItemStack(shard, 1, 0) });
|
|
||||||
|
|
||||||
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 20);
|
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, fireDrone, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 1) });
|
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, firePrincess, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 1) });
|
|
||||||
|
|
||||||
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 20);
|
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, waterDrone, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 2) });
|
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, waterPrincess, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 2) });
|
|
||||||
|
|
||||||
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 20);
|
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, earthDrone, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 3) });
|
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, earthPrincess, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 3) });
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
System.out.println("Reflection failed. Could not get Thaumcraft shard. ):");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
return "ThaumicBees";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void generateSurface(World world, Random random, int i, int j)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public IGuiHandler getGuiHandler()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IPacketHandler getPacketHandler()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IPickupHandler getPickupHandler()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IResupplyHandler getResupplyHandler()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ISaveEventHandler getSaveEventHandler()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IOreDictionaryHandler getDictionaryHandler()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ICommand[] getConsoleCommands()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,63 +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 AlleleFlower flowerBookshelf;
|
|
||||||
public static AlleleFlower flowerThaumcraft;
|
|
||||||
|
|
||||||
public static AlleleEffectCure cleansingEffect;
|
|
||||||
public static AlleleEffectPotion digSpeed;
|
|
||||||
public static AlleleEffectPotion moveSpeed;
|
|
||||||
|
|
||||||
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 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,59 +0,0 @@
|
|||||||
package thaumicbees.bees.genetics;
|
|
||||||
|
|
||||||
import thaumicbees.main.ThaumicBees;
|
|
||||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
|
||||||
import forestry.api.genetics.IEffectData;
|
|
||||||
|
|
||||||
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|
||||||
{
|
|
||||||
|
|
||||||
public AlleleEffect(String id, boolean isDominant)
|
|
||||||
{
|
|
||||||
super(id, isDominant);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean isCombinable()
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public abstract IEffectData validateStorage(IEffectData storedData);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public abstract String getIdentifier();
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public abstract IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IEffectData doFX(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
|
||||||
{
|
|
||||||
int[] area = genome.getTerritory();
|
|
||||||
float mod = housing.getTerritoryModifier(genome);
|
|
||||||
// Check to make sure territory is at least 1 with housing modifications
|
|
||||||
area[0] = Math.min((int)(area[0] * mod), 1);
|
|
||||||
area[1] = Math.min((int)(area[1] * mod), 1);
|
|
||||||
area[2] = Math.min((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]);
|
|
||||||
return storedData;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIconTextureFile()
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public int getIconIndex()
|
|
||||||
{
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,246 +0,0 @@
|
|||||||
package thaumicbees.bees.genetics;
|
|
||||||
|
|
||||||
import forestry.api.apiculture.BeeManager;
|
|
||||||
import forestry.api.apiculture.EnumBeeChromosome;
|
|
||||||
import forestry.api.genetics.AlleleManager;
|
|
||||||
import forestry.api.genetics.IAllele;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Simply a class to hold all the functions to manage species' default genomes.
|
|
||||||
* @author MysteriousAges
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public class BeeGenomeManager
|
|
||||||
{
|
|
||||||
// Basic genome for All thaumic bees.
|
|
||||||
private static IAllele[] getTemplateBaseThaumic()
|
|
||||||
{
|
|
||||||
IAllele[] genome = new IAllele[EnumBeeChromosome.values().length];
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Esoteric;
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlowest");
|
|
||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanShorter");
|
|
||||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
|
||||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolFalse");
|
|
||||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
|
||||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolFalse");
|
|
||||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolFalse");
|
|
||||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.getBaseAllele("flowersVanilla");
|
|
||||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
|
|
||||||
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryDefault");
|
|
||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectNone");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Basic genome for Arcane branch bees.
|
|
||||||
private static IAllele[] getTemplateBaseArcane()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseThaumic();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
|
||||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlow");
|
|
||||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityHigh");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Specialization genome for Esoteric bees.
|
|
||||||
public static IAllele[] getTemplateEsoteric()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseArcane();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Esoteric;
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateMysterious()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseArcane();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Mysterious;
|
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateArcane()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseArcane();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Arcane;
|
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
|
||||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
|
||||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlower");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static IAllele[] getTemplateBaseSupernatural()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseThaumic();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
|
||||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlower");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateCharmed()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseSupernatural();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Charmed;
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateEnchanted()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseSupernatural();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Enchanted;
|
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateSupernatural()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseSupernatural();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Supernatural;
|
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
|
||||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static IAllele[] getTemplateBaseScholarly()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseThaumic();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
|
||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanElongated");
|
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp1");
|
|
||||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
|
||||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
|
||||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerBookshelf;
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplatePupil()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseScholarly();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Pupil;
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlower");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateScholarly()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseScholarly();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Scholarly;
|
|
||||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateSavant()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseScholarly();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Savant;
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
|
||||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static IAllele[] getTemplateBaseElemental()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseThaumic();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerThaumcraft;
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateStark()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseElemental();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Stark;
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateAir()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseElemental();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Air;
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFastest");
|
|
||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanShortened");
|
|
||||||
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLargest");
|
|
||||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
|
||||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringMaximum");
|
|
||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.moveSpeed;
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateFire()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseElemental();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Fire;
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFaster");
|
|
||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
|
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown3");
|
|
||||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp2");
|
|
||||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
|
||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectIgnition");
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateWater()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseElemental();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Water;
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
|
|
||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLong");
|
|
||||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown2");
|
|
||||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
|
||||||
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
|
|
||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.cleansingEffect;
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IAllele[] getTemplateEarth()
|
|
||||||
{
|
|
||||||
IAllele[] genome = getTemplateBaseElemental();
|
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Earth;
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
|
||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
|
|
||||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown1");
|
|
||||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
|
||||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
|
||||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlow"); // 1.6.5+: floweringFastest
|
|
||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.digSpeed;
|
|
||||||
|
|
||||||
return genome;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,93 +0,0 @@
|
|||||||
package thaumicbees.bees.genetics;
|
|
||||||
|
|
||||||
import forestry.api.apiculture.*;
|
|
||||||
import forestry.api.genetics.IAllele;
|
|
||||||
import forestry.api.genetics.IGenome;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
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;
|
|
||||||
|
|
||||||
|
|
||||||
private IAllele parent1;
|
|
||||||
private IAllele parent2;
|
|
||||||
private IAllele mutationTemplate[];
|
|
||||||
private int baseChance;
|
|
||||||
private boolean isSecret;
|
|
||||||
|
|
||||||
public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, IAllele producesGenome[], int percentChance, boolean hide)
|
|
||||||
{
|
|
||||||
parent1 = species0;
|
|
||||||
parent2 = species1;
|
|
||||||
mutationTemplate = producesGenome;
|
|
||||||
baseChance = percentChance;
|
|
||||||
isSecret = hide;
|
|
||||||
|
|
||||||
BeeManager.beeMutations.add(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
|
||||||
{
|
|
||||||
int chance = 0;
|
|
||||||
|
|
||||||
if ((this.parent1.getUID().equals(allele0.getUID())) && this.parent2.getUID().equals(allele1.getUID()) ||
|
|
||||||
this.parent1.getUID().equals(allele1.getUID()) && this.parent2.getUID().equals(allele0.getUID()))
|
|
||||||
{
|
|
||||||
// This mutation applies. Continue calculation.
|
|
||||||
chance = Math.round((float) this.baseChance * BeeManager.breedingManager.getBeekeepingMode(housing.getWorld()).getMutationModifier((IBeeGenome) genome0, (IBeeGenome) genome1));
|
|
||||||
}
|
|
||||||
|
|
||||||
return chance;
|
|
||||||
}
|
|
||||||
|
|
||||||
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 isSecret()
|
|
||||||
{
|
|
||||||
return isSecret;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,179 +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 IBranch branch;
|
|
||||||
private HashMap products;
|
|
||||||
private HashMap specialty;
|
|
||||||
private IAllele genomeTemplate[];
|
|
||||||
|
|
||||||
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IBranch parentBranch, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
|
|
||||||
{
|
|
||||||
this(speciesName, speciesDescription, genusName, parentBranch, 0, firstColour, secondColour, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant);
|
|
||||||
}
|
|
||||||
|
|
||||||
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IBranch parentBranch, 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.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 IBranch getBranch()
|
|
||||||
{
|
|
||||||
return 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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +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 ThaumcraftPlant;
|
|
||||||
|
|
||||||
public BlockManager() { }
|
|
||||||
|
|
||||||
public static void setupBlocks(Configuration config)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package thaumicbees.block;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import thaumicbees.item.types.PlankType;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockWood;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class BlockPlanks extends Block
|
||||||
|
{
|
||||||
|
public BlockPlanks(int id)
|
||||||
|
{
|
||||||
|
super(id, Material.wood);
|
||||||
|
this.setHardness(2.5f);
|
||||||
|
this.setResistance(6.0f);
|
||||||
|
this.setBlockName("tb.planks");
|
||||||
|
this.setCreativeTab(CreativeTabs.tabBlock);
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
Block.setBurnProperties(id, 5, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBlockTextureFromSideAndMetadata(int side, int meta)
|
||||||
|
{
|
||||||
|
int tx = 256;
|
||||||
|
if (PlankType.getType(meta) != null)
|
||||||
|
{
|
||||||
|
tx = PlankType.getType(meta).textureIdx;
|
||||||
|
}
|
||||||
|
return tx;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int damageDropped(int meta)
|
||||||
|
{
|
||||||
|
return meta;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
@Override
|
||||||
|
public void getSubBlocks(int id, CreativeTabs tab, List itemsList)
|
||||||
|
{
|
||||||
|
for (PlankType type : PlankType.values())
|
||||||
|
{
|
||||||
|
itemsList.add(new ItemStack(this, 1, type.ordinal()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,68 @@
|
|||||||
|
package thaumicbees.block;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import thaumicbees.item.types.PlankType;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockHalfSlab;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class BlockWoodSlab extends BlockHalfSlab
|
||||||
|
{
|
||||||
|
|
||||||
|
public BlockWoodSlab(int id, boolean doubleSlab)
|
||||||
|
{
|
||||||
|
super(id, doubleSlab, Material.wood);
|
||||||
|
this.setHardness(2.5f);
|
||||||
|
this.setResistance(6.0f);
|
||||||
|
this.setBlockName("tb.slab.wood");
|
||||||
|
this.setCreativeTab(CreativeTabs.tabBlock);
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
this.setLightOpacity(doubleSlab ? 255 : 0);
|
||||||
|
Block.setBurnProperties(id, 5, 20);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getBlockTextureFromSideAndMetadata(int side, int meta)
|
||||||
|
{
|
||||||
|
int tx = 256;
|
||||||
|
if (PlankType.getType(meta & 7) != null)
|
||||||
|
{
|
||||||
|
tx = PlankType.getType(meta & 7).textureIdx;
|
||||||
|
}
|
||||||
|
return tx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int idDropped(int id, Random rand, int par3)
|
||||||
|
{
|
||||||
|
return Config.slabWoodHalf.blockID;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected ItemStack createStackedBlock(int meta)
|
||||||
|
{
|
||||||
|
return new ItemStack(Config.slabWoodHalf.blockID, 2, meta & 7);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getFullSlabName(int meta)
|
||||||
|
{
|
||||||
|
return this.getBlockName() + "." + PlankType.getType(meta).name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
@Override
|
||||||
|
public void getSubBlocks(int id, CreativeTabs tab, List itemsList)
|
||||||
|
{
|
||||||
|
for (PlankType type : PlankType.values())
|
||||||
|
{
|
||||||
|
itemsList.add(new ItemStack(this, 1, type.ordinal()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import forestry.api.apiculture.IArmorApiarist;
|
||||||
|
|
||||||
|
public class ItemArmorApiarist extends Item implements IArmorApiarist
|
||||||
|
{
|
||||||
|
|
||||||
|
public ItemArmorApiarist(int par1)
|
||||||
|
{
|
||||||
|
super(par1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getNumberPiecesWorn(EntityPlayer player)
|
||||||
|
{
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
if (wearsHelmet(player)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (wearsChest(player)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (wearsLegs(player)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (wearsBoots(player)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean wearsHelmet(EntityPlayer player)
|
||||||
|
{
|
||||||
|
ItemStack armorItem = player.inventory.armorInventory[3];
|
||||||
|
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean wearsChest(EntityPlayer player)
|
||||||
|
{
|
||||||
|
ItemStack armorItem = player.inventory.armorInventory[2];
|
||||||
|
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean wearsLegs(EntityPlayer player)
|
||||||
|
{
|
||||||
|
ItemStack armorItem = player.inventory.armorInventory[1];
|
||||||
|
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean wearsBoots(EntityPlayer player)
|
||||||
|
{
|
||||||
|
ItemStack armorItem = player.inventory.armorInventory[0];
|
||||||
|
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
|
import forestry.api.recipes.RecipeManagers;
|
||||||
|
import thaumicbees.item.types.CapsuleType;
|
||||||
|
import thaumicbees.item.types.LiquidType;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
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.MovingObjectPosition;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.liquids.LiquidContainerData;
|
||||||
|
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||||
|
import net.minecraftforge.liquids.LiquidDictionary;
|
||||||
|
import net.minecraftforge.liquids.LiquidStack;
|
||||||
|
|
||||||
|
public class ItemCapsule extends Item
|
||||||
|
{
|
||||||
|
private CapsuleType capsuleType;
|
||||||
|
|
||||||
|
public ItemCapsule(CapsuleType type, int itemId, int maxStackSize)
|
||||||
|
{
|
||||||
|
super(itemId);
|
||||||
|
this.capsuleType = type;
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_LIQUIDS_IMAGE);
|
||||||
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
|
this.setHasSubtypes(true);
|
||||||
|
this.setMaxStackSize(maxStackSize);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CapsuleType getType()
|
||||||
|
{
|
||||||
|
return this.capsuleType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getItemDisplayName(ItemStack itemStack)
|
||||||
|
{
|
||||||
|
return LiquidType.values()[itemStack.getItemDamage()].getDisplayName() + " " + this.capsuleType.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getCapsuleForLiquid(LiquidType l)
|
||||||
|
{
|
||||||
|
return new ItemStack(this, 1, l.ordinal());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubItems(int par1, CreativeTabs tab, List itemList)
|
||||||
|
{
|
||||||
|
for (LiquidType l : LiquidType.values())
|
||||||
|
{
|
||||||
|
if (l.available)
|
||||||
|
{
|
||||||
|
itemList.add(new ItemStack(this, 1, l.ordinal()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean requiresMultipleRenderPasses()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public int getIconFromDamageForRenderPass(int metadata, int pass)
|
||||||
|
{
|
||||||
|
int index = 0;
|
||||||
|
if (pass == 0)
|
||||||
|
{
|
||||||
|
index = LiquidType.values()[metadata].iconIdx;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
index = capsuleType.iconIdx;
|
||||||
|
}
|
||||||
|
return index;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getRenderPasses(int metadata)
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,45 +2,23 @@ package thaumicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import thaumicbees.item.ItemPollen.PollenType;
|
import thaumicbees.item.types.CombType;
|
||||||
import thaumicbees.main.CommonProxy;
|
import thaumicbees.main.CommonProxy;
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemComb extends Item
|
public class ItemComb extends Item
|
||||||
{
|
{
|
||||||
public enum CombType
|
|
||||||
{
|
|
||||||
OCCULT("Occult Comb", 0x6e1c6d, 0xff8fff),
|
|
||||||
OTHERWORLDLY("Otherworldy Comb", 0x000056, 0x765cc1),
|
|
||||||
PAPERY("Papery Comb", 0x503900, 0xbd9a30),
|
|
||||||
STARK("Stark Comb", 0xB0B0BC, 0x6e6e79),
|
|
||||||
AIRY("Airy Comb", 0xffff7e, 0x717600),
|
|
||||||
FIREY("Firey Comb", 0xff3C01, 0x740002),
|
|
||||||
WATERY("Watery Comb", 0x0090ff, 0x00308c),
|
|
||||||
EARTHY("Earthy Comb", 0x00a000, 0x005100),
|
|
||||||
;
|
|
||||||
|
|
||||||
private CombType(String pName, int colourA, int colourB)
|
|
||||||
{
|
|
||||||
this.name = pName;
|
|
||||||
this.combColour[0] = colourA;
|
|
||||||
this.combColour[1] = colourB;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final String name;
|
|
||||||
public int[] combColour = new int[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemComb(int itemID)
|
public ItemComb(int itemID)
|
||||||
{
|
{
|
||||||
super(itemID);
|
super(itemID);
|
||||||
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
||||||
this.setCreativeTab(CreativeTabs.tabMaterials);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -58,10 +36,12 @@ public class ItemComb extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (CombType type : CombType.values())
|
for (CombType type : CombType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
if (type.showInList)
|
||||||
|
{
|
||||||
|
list.add(this.getStackForType(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,41 +53,43 @@ public class ItemComb extends Item
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderPasses(int metadata)
|
public int getRenderPasses(int meta)
|
||||||
{
|
{
|
||||||
return 2;
|
int passes = 2;
|
||||||
|
return passes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getIconIndex(ItemStack stack, int pass)
|
public int getIconIndex(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
|
int idx = 107;
|
||||||
// 107, 108 are the base forestry honeycomb textures.
|
// 107, 108 are the base forestry honeycomb textures.
|
||||||
return 107 + pass;
|
if (pass >= 1)
|
||||||
|
{
|
||||||
|
idx = 108;
|
||||||
|
}
|
||||||
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
int colour = 0xffffff;
|
int meta = Math.max(0, Math.min(CombType.values().length - 1, stack.getItemDamage()));
|
||||||
int meta = stack.getItemDamage();
|
int colour = CombType.values()[meta].combColour[0];
|
||||||
if (meta >= 0 && meta < CombType.values().length)
|
|
||||||
|
if (pass >= 1)
|
||||||
{
|
{
|
||||||
colour = CombType.values()[meta].combColour[pass % 2];
|
colour = CombType.values()[meta].combColour[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemDisplayName(ItemStack stack)
|
public String getItemDisplayName(ItemStack stack)
|
||||||
{
|
{
|
||||||
String result = "";
|
return CombType.values()[stack.getItemDamage()].getName();
|
||||||
int meta = stack.getItemDamage();
|
|
||||||
if (meta >= 0 && meta < CombType.values().length)
|
|
||||||
{
|
|
||||||
result = CombType.values()[meta].name;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,38 +2,25 @@ package thaumicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import thaumicbees.item.ItemPollen.PollenType;
|
import thaumicbees.item.types.DropType;
|
||||||
|
import thaumicbees.item.types.PropolisType;
|
||||||
import thaumicbees.main.CommonProxy;
|
import thaumicbees.main.CommonProxy;
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemDrop extends Item
|
public class ItemDrop extends Item
|
||||||
{
|
{
|
||||||
public enum DropType
|
|
||||||
{
|
|
||||||
ENCHANTED("Enchanting Drop", 0x6e1c6d, 0xff8fff),
|
|
||||||
;
|
|
||||||
|
|
||||||
private DropType(String pName, int colourA, int colourB)
|
|
||||||
{
|
|
||||||
this.name = pName;
|
|
||||||
this.combColour[0] = colourA;
|
|
||||||
this.combColour[1] = colourB;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final String name;
|
|
||||||
public int[] combColour = new int[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemDrop(int itemID)
|
public ItemDrop(int itemID)
|
||||||
{
|
{
|
||||||
super(itemID);
|
super(itemID);
|
||||||
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
||||||
this.setCreativeTab(CreativeTabs.tabMaterials);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,7 +38,6 @@ public class ItemDrop extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (DropType type : DropType.values())
|
for (DropType type : DropType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
@@ -74,33 +60,34 @@ public class ItemDrop extends Item
|
|||||||
@Override
|
@Override
|
||||||
public int getIconIndex(ItemStack stack, int pass)
|
public int getIconIndex(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
|
int idx = 109;
|
||||||
// 109, 110 are the base forestry drop textures.
|
// 109, 110 are the base forestry drop textures.
|
||||||
return 109 + pass;
|
if (pass >= 1)
|
||||||
|
{
|
||||||
|
idx = 110;
|
||||||
|
}
|
||||||
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
int colour = 0xffffff;
|
int meta = Math.max(0, Math.min(DropType.values().length - 1, stack.getItemDamage()));
|
||||||
int meta = stack.getItemDamage();
|
int colour = DropType.values()[meta].combColour[0];
|
||||||
if (meta >= 0 && meta < DropType.values().length)
|
|
||||||
|
if (pass >= 1)
|
||||||
{
|
{
|
||||||
colour = DropType.values()[meta].combColour[pass % 2];
|
colour = DropType.values()[meta].combColour[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemDisplayName(ItemStack stack)
|
public String getItemDisplayName(ItemStack stack)
|
||||||
{
|
{
|
||||||
String result = "";
|
return DropType.values()[stack.getItemDamage()].getName();
|
||||||
int meta = stack.getItemDamage();
|
|
||||||
if (meta >= 0 && meta < DropType.values().length)
|
|
||||||
{
|
|
||||||
result = DropType.values()[meta].name;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,165 @@
|
|||||||
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import thaumcraft.api.AuraNode;
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.item.types.HiveFrameType;
|
||||||
|
import thaumicbees.item.types.LiquidType;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import forestry.api.apiculture.IBee;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import forestry.api.apiculture.IHiveFrame;
|
||||||
|
|
||||||
|
public class ItemMagicHiveFrame extends Item implements IHiveFrame
|
||||||
|
{
|
||||||
|
private HiveFrameType type;
|
||||||
|
|
||||||
|
public ItemMagicHiveFrame(int itemID, HiveFrameType frameType)
|
||||||
|
{
|
||||||
|
super(itemID);
|
||||||
|
this.type = frameType;
|
||||||
|
this.setMaxDamage(this.type.maxDamage);
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
this.setIconIndex(this.type.iconIdx);
|
||||||
|
this.setMaxStackSize(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getItemDisplayName(ItemStack itemStack)
|
||||||
|
{
|
||||||
|
return this.type.getName();
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------- IHiveFrame functions -----------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear)
|
||||||
|
{
|
||||||
|
return this.doWear(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), frame, wear);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doFluxEffect(World w, int x, int y, int z)
|
||||||
|
{
|
||||||
|
if (this.type.flux != null && w.rand.nextInt(5) <= 1)
|
||||||
|
{
|
||||||
|
ThaumcraftApi.addFluxToClosest(w, x, y, z, this.type.flux);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private ItemStack doWear(World w, int x, int y, int z, ItemStack frame, int wear)
|
||||||
|
{
|
||||||
|
int damage = wear;
|
||||||
|
int fluxMod = 1;
|
||||||
|
|
||||||
|
// This throttles back the amount of aura consumed by the frame by storing a smidge of data on the item stack.
|
||||||
|
if (this.type.auraPerUse > 0)
|
||||||
|
{
|
||||||
|
NBTTagCompound tag;
|
||||||
|
if (frame.hasTagCompound())
|
||||||
|
{
|
||||||
|
tag = frame.getTagCompound();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tag = new NBTTagCompound();
|
||||||
|
tag.setByte("wearTicks", (byte)0);
|
||||||
|
frame.setTagCompound(tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
int wearTicks = tag.getByte("wearTicks") + 1;
|
||||||
|
|
||||||
|
if (wearTicks == this.type.wearTicksPerAura)
|
||||||
|
{
|
||||||
|
// Attempt to use aura for the frame.
|
||||||
|
if (!ThaumcraftApi.decreaseClosestAura(w, x, y, z, this.type.auraPerUse, true))
|
||||||
|
{
|
||||||
|
// Insufficient aura, or no nearby node.
|
||||||
|
damage = wear + this.type.auraPerUse * this.type.wearTicksPerAura;
|
||||||
|
fluxMod = 1 + w.rand.nextInt(this.type.wearTicksPerAura);
|
||||||
|
}
|
||||||
|
wearTicks = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
tag.setByte("wearTicks", (byte)wearTicks);
|
||||||
|
}
|
||||||
|
|
||||||
|
frame.setItemDamage(frame.getItemDamage() + damage);
|
||||||
|
|
||||||
|
for (int i = 0; i < fluxMod; ++i)
|
||||||
|
{
|
||||||
|
this.doFluxEffect(w, x, y, z);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (frame.getItemDamage() >= frame.getMaxDamage())
|
||||||
|
{
|
||||||
|
// Break the frame.
|
||||||
|
frame = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getTerritoryModifier(IBeeGenome genome)
|
||||||
|
{
|
||||||
|
return this.type.territoryMod;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate)
|
||||||
|
{
|
||||||
|
return this.type.mutationMod;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate)
|
||||||
|
{
|
||||||
|
return this.type.lifespanMod;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getProductionModifier(IBeeGenome genome)
|
||||||
|
{
|
||||||
|
return this.type.productionMod;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getFloweringModifier(IBeeGenome genome)
|
||||||
|
{
|
||||||
|
return this.type.floweringMod;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSealed()
|
||||||
|
{
|
||||||
|
return this.type.isSealed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSelfLighted()
|
||||||
|
{
|
||||||
|
return this.type.isLit;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isSunlightSimulated()
|
||||||
|
{
|
||||||
|
return this.type.isSunlit;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isHellish()
|
||||||
|
{
|
||||||
|
return this.type.isHellish;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
package thaumicbees.item;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
import thaumicbees.item.ItemComb.CombType;
|
|
||||||
import thaumicbees.item.ItemMiscResources.ResourceType;
|
|
||||||
import thaumicbees.item.ItemPropolis.PropolisType;
|
|
||||||
import thaumicbees.item.ItemWax.WaxType;
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.common.Configuration;
|
|
||||||
import net.minecraftforge.common.Property;
|
|
||||||
import net.minecraftforge.liquids.LiquidStack;
|
|
||||||
import forestry.api.core.ItemInterface;
|
|
||||||
import forestry.api.recipes.*;
|
|
||||||
|
|
||||||
public class ItemManager
|
|
||||||
{
|
|
||||||
public static ItemComb combs;
|
|
||||||
public static ItemWax wax;
|
|
||||||
public static ItemPropolis propolis;
|
|
||||||
public static ItemDrop drops;
|
|
||||||
public static ItemMiscResources miscResources;
|
|
||||||
|
|
||||||
//----- Thaumcraft Items -------------------
|
|
||||||
public static ItemStack quicksilver;
|
|
||||||
public static ItemStack amber;
|
|
||||||
public static ItemStack fragment;
|
|
||||||
public static ItemStack airShard;
|
|
||||||
public static ItemStack fireShard;
|
|
||||||
public static ItemStack waterShard;
|
|
||||||
public static ItemStack earthShard;
|
|
||||||
public static ItemStack magicShard;
|
|
||||||
public static ItemStack dullShard;
|
|
||||||
public static ItemStack essentiaBottle;
|
|
||||||
|
|
||||||
public ItemManager() { }
|
|
||||||
|
|
||||||
public static void setupItems(Configuration configFile)
|
|
||||||
{
|
|
||||||
int itemIDBase = 26090;
|
|
||||||
|
|
||||||
Property p = configFile.getItem("combs", itemIDBase++);
|
|
||||||
ItemManager.combs= new ItemComb(p.getInt());
|
|
||||||
ItemManager.wax = new ItemWax(configFile.getItem("wax", itemIDBase++).getInt());
|
|
||||||
ItemManager.propolis = new ItemPropolis(configFile.getItem("propolis", itemIDBase++).getInt());
|
|
||||||
ItemManager.drops = new ItemDrop(configFile.getItem("drop", itemIDBase++).getInt());
|
|
||||||
ItemManager.miscResources = new ItemMiscResources(configFile.getItem("miscResources", itemIDBase++).getInt());
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setupCrafting()
|
|
||||||
{
|
|
||||||
ItemStack output = ItemManager.essentiaBottle.copy();
|
|
||||||
output.stackSize = 8;
|
|
||||||
GameRegistry.addRecipe(output, new Object[]
|
|
||||||
{
|
|
||||||
" C ", "GPG", "PGP",
|
|
||||||
'G', ItemManager.wax,
|
|
||||||
'C', Item.clay,
|
|
||||||
'P', Block.thinGlass
|
|
||||||
});
|
|
||||||
output = ItemManager.essentiaBottle.copy();
|
|
||||||
output.stackSize = 4;
|
|
||||||
GameRegistry.addRecipe(output, new Object[]
|
|
||||||
{
|
|
||||||
" W ", "W W", " W ",
|
|
||||||
'W', ItemManager.wax
|
|
||||||
});
|
|
||||||
|
|
||||||
output = ItemManager.fragment.copy();
|
|
||||||
GameRegistry.addShapelessRecipe(output, new Object[]
|
|
||||||
{
|
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT)
|
|
||||||
});
|
|
||||||
|
|
||||||
// 20 is the 'average' time to centrifuge a comb.
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OCCULT),
|
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
|
||||||
new int[] { 100, 60 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OTHERWORLDLY),
|
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
|
||||||
new int[] { 60, 100 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.PAPERY),
|
|
||||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
|
|
||||||
new int[] { 80, 20, 5 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.STARK),
|
|
||||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.STARK) },
|
|
||||||
new int[] { 10, 95, 5 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.AIRY),
|
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.AIR) },
|
|
||||||
new int[] { 100, 65 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.FIREY),
|
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
|
||||||
new int[] { 100, 65 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.WATERY),
|
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.WATER)},
|
|
||||||
new int[] { 100, 65 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.EARTHY),
|
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.EARTH) },
|
|
||||||
new int[] { 100, 65 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.STARK),
|
|
||||||
new ItemStack[] {ItemManager.dullShard},
|
|
||||||
new int[] { 25 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.AIR),
|
|
||||||
new ItemStack[] {ItemManager.airShard},
|
|
||||||
new int[] { 25 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.FIRE),
|
|
||||||
new ItemStack[] {ItemManager.fireShard},
|
|
||||||
new int[] { 25 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.WATER),
|
|
||||||
new ItemStack[] {ItemManager.waterShard},
|
|
||||||
new int[] { 25 });
|
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.EARTH),
|
|
||||||
new ItemStack[] {ItemManager.earthShard},
|
|
||||||
new int[] { 25 });
|
|
||||||
|
|
||||||
// Squeezer recipes
|
|
||||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
|
||||||
new LiquidStack(Block.lavaStill, 250), ItemManager.fireShard, 15);
|
|
||||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.WATER) },
|
|
||||||
new LiquidStack(Block.waterStill, 1000), ItemManager.waterShard, 25);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -4,8 +4,8 @@ import java.util.List;
|
|||||||
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import thaumicbees.item.ItemPropolis.PropolisType;
|
import forestry.api.core.Tabs;
|
||||||
import thaumicbees.item.ItemWax.WaxType;
|
import thaumicbees.item.types.ResourceType;
|
||||||
import thaumicbees.main.CommonProxy;
|
import thaumicbees.main.CommonProxy;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@@ -13,25 +13,11 @@ import net.minecraft.item.ItemStack;
|
|||||||
|
|
||||||
public class ItemMiscResources extends Item
|
public class ItemMiscResources extends Item
|
||||||
{
|
{
|
||||||
public enum ResourceType
|
|
||||||
{
|
|
||||||
KNOWLEDGE_FRAGMENT("Lore Fragment", 2),
|
|
||||||
;
|
|
||||||
|
|
||||||
private ResourceType(String n, int i)
|
|
||||||
{
|
|
||||||
this.name = n;
|
|
||||||
this.iconIdx = i;
|
|
||||||
}
|
|
||||||
public String name;
|
|
||||||
public int iconIdx;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemMiscResources(int ID)
|
public ItemMiscResources(int ID)
|
||||||
{
|
{
|
||||||
super(ID);
|
super(ID);
|
||||||
this.setTextureFile(CommonProxy.TCBEES_ITEMSPNG);
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
this.setCreativeTab(CreativeTabs.tabMaterials);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,10 +35,12 @@ public class ItemMiscResources extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (ResourceType type : ResourceType.values())
|
for (ResourceType type : ResourceType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
if (type.showInList)
|
||||||
|
{
|
||||||
|
list.add(this.getStackForType(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,13 +59,7 @@ public class ItemMiscResources extends Item
|
|||||||
@Override
|
@Override
|
||||||
public String getItemDisplayName(ItemStack stack)
|
public String getItemDisplayName(ItemStack stack)
|
||||||
{
|
{
|
||||||
String result = "";
|
return ResourceType.values()[stack.getItemDamage()].getName();
|
||||||
int meta = stack.getItemDamage();
|
|
||||||
if (meta >= 0 && meta < ResourceType.values().length)
|
|
||||||
{
|
|
||||||
result = ResourceType.values()[meta].name;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,38 +2,23 @@ package thaumicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import thaumicbees.item.types.PollenType;
|
||||||
import thaumicbees.main.CommonProxy;
|
import thaumicbees.main.CommonProxy;
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemPollen extends Item
|
public class ItemPollen extends Item
|
||||||
{
|
{
|
||||||
public enum PollenType
|
|
||||||
{
|
|
||||||
UNUSUAL("Unusual Pollen", 0x742700, 0xdbad40),
|
|
||||||
FIBEROUS("Fiberous Pollen", 0x503900, 0xbd9a30),
|
|
||||||
;
|
|
||||||
|
|
||||||
private PollenType(String pName, int colourA, int colourB)
|
|
||||||
{
|
|
||||||
this.name = pName;
|
|
||||||
this.combColour[0] = colourA;
|
|
||||||
this.combColour[1] = colourB;
|
|
||||||
}
|
|
||||||
|
|
||||||
public final String name;
|
|
||||||
public int[] combColour = new int[2];
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemPollen(int itemID)
|
public ItemPollen(int itemID)
|
||||||
{
|
{
|
||||||
super(itemID);
|
super(itemID);
|
||||||
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
||||||
this.setCreativeTab(CreativeTabs.tabMaterials);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
}
|
}
|
||||||
public ItemStack getStackForType(PollenType type)
|
public ItemStack getStackForType(PollenType type)
|
||||||
@@ -50,7 +35,6 @@ public class ItemPollen extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (PollenType type : PollenType.values())
|
for (PollenType type : PollenType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
@@ -73,33 +57,34 @@ public class ItemPollen extends Item
|
|||||||
@Override
|
@Override
|
||||||
public int getIconIndex(ItemStack stack, int pass)
|
public int getIconIndex(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
// 107, 108 are the base forestry honeycomb textures.
|
int idx = 45;
|
||||||
return 107 + pass;
|
// 45, 46 are the base forestry pollen textures.
|
||||||
|
if (pass >= 1)
|
||||||
|
{
|
||||||
|
idx = 46;
|
||||||
|
}
|
||||||
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
int colour = 0xffffff;
|
int meta = Math.max(0, Math.min(PollenType.values().length - 1, stack.getItemDamage()));
|
||||||
int meta = stack.getItemDamage();
|
int colour = PollenType.values()[meta].combColour[0];
|
||||||
if (meta >= 0 && meta < PollenType.values().length)
|
|
||||||
|
if (pass >= 1)
|
||||||
{
|
{
|
||||||
colour = PollenType.values()[meta].combColour[pass % 2];
|
colour = PollenType.values()[meta].combColour[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getItemDisplayName(ItemStack stack)
|
public String getItemDisplayName(ItemStack stack)
|
||||||
{
|
{
|
||||||
String result = "";
|
return PollenType.values()[stack.getItemDamage()].getName();
|
||||||
int meta = stack.getItemDamage();
|
|
||||||
if (meta >= 0 && meta < PollenType.values().length)
|
|
||||||
{
|
|
||||||
result = PollenType.values()[meta].name;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,40 +2,22 @@ package thaumicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import thaumicbees.item.ItemPollen.PollenType;
|
import thaumicbees.item.types.PropolisType;
|
||||||
import thaumicbees.item.ItemWax.WaxType;
|
|
||||||
import thaumicbees.main.CommonProxy;
|
import thaumicbees.main.CommonProxy;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemPropolis extends Item
|
public class ItemPropolis extends Item
|
||||||
{
|
{
|
||||||
public enum PropolisType
|
|
||||||
{
|
|
||||||
STARK("Dull Propolis", 0xBBBBBB),
|
|
||||||
AIR("Air Propolis", 0xA19E10),
|
|
||||||
FIRE("Firey Propolis", 0x95132F),
|
|
||||||
WATER("Watery Propolis", 0x1054A1),
|
|
||||||
EARTH("Earthen Propolis", 0x00a000),
|
|
||||||
;
|
|
||||||
|
|
||||||
private PropolisType(String pName, int overlayColour)
|
|
||||||
{
|
|
||||||
this.name = pName;
|
|
||||||
this.colour = overlayColour;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String name;
|
|
||||||
public int colour;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemPropolis(int id)
|
public ItemPropolis(int id)
|
||||||
{
|
{
|
||||||
super(id);
|
super(id);
|
||||||
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
this.setTextureFile(CommonProxy.FORESTRY_GFX_ITEMS);
|
||||||
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
this.setIconIndex(98);
|
this.setIconIndex(98);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
}
|
}
|
||||||
@@ -54,7 +36,6 @@ public class ItemPropolis extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (PropolisType type : PropolisType.values())
|
for (PropolisType type : PropolisType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
@@ -76,13 +57,7 @@ public class ItemPropolis extends Item
|
|||||||
@Override
|
@Override
|
||||||
public String getItemDisplayName(ItemStack stack)
|
public String getItemDisplayName(ItemStack stack)
|
||||||
{
|
{
|
||||||
String result = "";
|
return PropolisType.values()[stack.getItemDamage()].getName();
|
||||||
int meta = stack.getItemDamage();
|
|
||||||
if (meta >= 0 && meta < PropolisType.values().length)
|
|
||||||
{
|
|
||||||
result = PropolisType.values()[meta].name;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class ItemSolidFlux extends Item
|
||||||
|
{
|
||||||
|
public ItemSolidFlux(int itemId)
|
||||||
|
{
|
||||||
|
super(itemId);
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
this.setIconIndex(18);
|
||||||
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
|
this.setHasSubtypes(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public void getSubItems(int par1, CreativeTabs tab, List list)
|
||||||
|
{
|
||||||
|
for (EnumTag tag : EnumTag.values())
|
||||||
|
{
|
||||||
|
if (tag == EnumTag.UNKNOWN)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
list.add(new ItemStack(this.itemID, 1, tag.id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getItemDisplayName(ItemStack stack)
|
||||||
|
{
|
||||||
|
return String.format(LocalizationManager.getLocalizedString("tb.resource.crystalFlux"), EnumTag.get(stack.getItemDamage()).name);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
|
{
|
||||||
|
return EnumTag.get(stack.getItemDamage()).color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import thaumcraft.api.IVisRepairable;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
import forestry.api.arboriculture.IToolGrafter;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ForgeHooks;
|
||||||
|
|
||||||
|
public class ItemThaumiumGrafter extends Item implements IVisRepairable, IToolGrafter
|
||||||
|
{
|
||||||
|
|
||||||
|
public ItemThaumiumGrafter(int id)
|
||||||
|
{
|
||||||
|
super(id);
|
||||||
|
this.setCreativeTab(forestry.api.core.Tabs.tabArboriculture);
|
||||||
|
this.setMaxDamage(15);
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
this.setIconIndex(21);
|
||||||
|
this.setItemName("tb.thaumiumGrafter");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getSaplingModifier(ItemStack stack, World world, int x, int y, int z)
|
||||||
|
{
|
||||||
|
return 100f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getStrVsBlock(ItemStack itemStack, Block block)
|
||||||
|
{
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getStrVsBlock(ItemStack itemStack, Block block, int metadata)
|
||||||
|
{
|
||||||
|
return ForgeHooks.isToolEffective(itemStack, block, metadata) ? 4.8f : getStrVsBlock(itemStack, block);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockDestroyed(ItemStack itemstack, World world, int id, int x, int y, int z, EntityLiving entityliving) {
|
||||||
|
itemstack.damageItem(1, entityliving);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the enchantability factor of the item, most of the time is based on material.
|
||||||
|
*/
|
||||||
|
public int getItemEnchantability()
|
||||||
|
{
|
||||||
|
return ThaumcraftApi.toolMatThaumium.getEnchantability();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the name for this tool's material.
|
||||||
|
*/
|
||||||
|
public String getToolMaterialName()
|
||||||
|
{
|
||||||
|
return ThaumcraftApi.toolMatThaumium.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether this item is repairable in an anvil.
|
||||||
|
*/
|
||||||
|
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||||
|
{
|
||||||
|
return ThaumcraftApi.toolMatThaumium.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doRepair(ItemStack stack, Entity e)
|
||||||
|
{
|
||||||
|
if (stack.getItemDamage() > 0)
|
||||||
|
{
|
||||||
|
if (ThaumcraftApi.decreaseClosestAura(e.worldObj, e.posX, e.posY, e.posZ, 1, true))
|
||||||
|
{
|
||||||
|
stack.damageItem(-1, (EntityLiving)e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,81 @@
|
|||||||
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import thaumcraft.api.IVisRepairable;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.item.ItemTool;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.ForgeHooks;
|
||||||
|
|
||||||
|
public class ItemThaumiumScoop extends Item implements IVisRepairable
|
||||||
|
{
|
||||||
|
public ItemThaumiumScoop(int itemID)
|
||||||
|
{
|
||||||
|
super(itemID);
|
||||||
|
this.setMaxStackSize(1);
|
||||||
|
this.setMaxDamage(30);
|
||||||
|
this.setIconIndex(20);
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
this.setItemName("tb.thaumiumScoop");
|
||||||
|
this.setCreativeTab(forestry.api.core.Tabs.tabApiculture);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getStrVsBlock(ItemStack itemStack, Block block)
|
||||||
|
{
|
||||||
|
return 1f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float getStrVsBlock(ItemStack itemStack, Block block, int metadata)
|
||||||
|
{
|
||||||
|
return ForgeHooks.isToolEffective(itemStack, block, metadata) ? 4.8f : getStrVsBlock(itemStack, block);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onBlockDestroyed(ItemStack itemstack, World world, int i, int j, int k, int l, EntityLiving entityliving) {
|
||||||
|
itemstack.damageItem(1, entityliving);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the enchantability factor of the item, most of the time is based on material.
|
||||||
|
*/
|
||||||
|
public int getItemEnchantability()
|
||||||
|
{
|
||||||
|
return ThaumcraftApi.toolMatThaumium.getEnchantability();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the name for this tool's material.
|
||||||
|
*/
|
||||||
|
public String getToolMaterialName()
|
||||||
|
{
|
||||||
|
return ThaumcraftApi.toolMatThaumium.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether this item is repairable in an anvil.
|
||||||
|
*/
|
||||||
|
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||||
|
{
|
||||||
|
return ThaumcraftApi.toolMatThaumium.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doRepair(ItemStack stack, Entity e)
|
||||||
|
{
|
||||||
|
if (stack.getItemDamage() > 0)
|
||||||
|
{
|
||||||
|
if (ThaumcraftApi.decreaseClosestAura(e.worldObj, e.posX, e.posY, e.posZ, 1, true))
|
||||||
|
{
|
||||||
|
stack.damageItem(-1, (EntityLiving)e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,41 +2,23 @@ package thaumicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import thaumicbees.item.ItemComb.CombType;
|
import thaumicbees.item.types.WaxType;
|
||||||
import thaumicbees.item.ItemDrop.DropType;
|
|
||||||
import thaumicbees.item.ItemPollen.PollenType;
|
|
||||||
import thaumicbees.main.CommonProxy;
|
import thaumicbees.main.CommonProxy;
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import forestry.api.core.Tabs;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
public class ItemWax extends Item
|
public class ItemWax extends Item
|
||||||
{
|
{
|
||||||
public enum WaxType
|
|
||||||
{
|
|
||||||
MAGIC("Magic Wax", false, 0xd242df),
|
|
||||||
;
|
|
||||||
|
|
||||||
private WaxType(String n, boolean sp, int c)
|
|
||||||
{
|
|
||||||
this.name = n;
|
|
||||||
this.sparkly = sp;
|
|
||||||
this.colour = c;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String name;
|
|
||||||
public boolean sparkly;
|
|
||||||
public int colour;
|
|
||||||
}
|
|
||||||
|
|
||||||
public ItemWax(int itemID)
|
public ItemWax(int itemID)
|
||||||
{
|
{
|
||||||
super(itemID);
|
super(itemID);
|
||||||
this.setTextureFile(CommonProxy.TCBEES_ITEMSPNG);
|
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
this.setCreativeTab(CreativeTabs.tabMisc);
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
this.setHasSubtypes(true);
|
this.setHasSubtypes(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +48,6 @@ public class ItemWax extends Item
|
|||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public void getSubItems(int id, CreativeTabs tabs, List list)
|
public void getSubItems(int id, CreativeTabs tabs, List list)
|
||||||
{
|
{
|
||||||
super.getSubItems(id, tabs, list);
|
|
||||||
for (WaxType type : WaxType.values())
|
for (WaxType type : WaxType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
list.add(this.getStackForType(type));
|
||||||
@@ -89,12 +70,6 @@ public class ItemWax extends Item
|
|||||||
@Override
|
@Override
|
||||||
public String getItemDisplayName(ItemStack stack)
|
public String getItemDisplayName(ItemStack stack)
|
||||||
{
|
{
|
||||||
String result = "";
|
return WaxType.values()[stack.getItemDamage()].getName();
|
||||||
int meta = stack.getItemDamage();
|
|
||||||
if (meta >= 0 && meta < WaxType.values().length)
|
|
||||||
{
|
|
||||||
result = WaxType.values()[meta].name;
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public enum CapsuleType
|
||||||
|
{
|
||||||
|
MAGIC("magic", 2000, 0),
|
||||||
|
VOID("void", 8000, 1),
|
||||||
|
;
|
||||||
|
private String name;
|
||||||
|
public int capacity;
|
||||||
|
public int iconIdx;
|
||||||
|
|
||||||
|
private CapsuleType(String n, int c, int idx)
|
||||||
|
{
|
||||||
|
this.name = n;
|
||||||
|
this.capacity = c;
|
||||||
|
this.iconIdx = idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.capsule." + name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public enum CombType
|
||||||
|
{
|
||||||
|
OCCULT("occult", 0x6e1c6d, 0xff8fff, true),
|
||||||
|
OTHERWORLDLY("otherworldly", 0x000056, 0x765cc1, true),
|
||||||
|
PAPERY("paper", 0x503900, 0xbd9a30, true),
|
||||||
|
STARK("stark", 0xB0B0BC, 0x6e6e79, false),
|
||||||
|
AIRY("air", 0xffff7e, 0x717600, false),
|
||||||
|
FIREY("fire", 0xff3C01, 0x740002, false),
|
||||||
|
WATERY("water", 0x0090ff, 0x00308c, false),
|
||||||
|
EARTHY("earth", 0x00a000, 0x005100, false),
|
||||||
|
INFUSED("magic", 0xaa32fc, 0x7A489E, false),
|
||||||
|
INTELLECT("aware", 0x618fff, 0xb0092e9, false),
|
||||||
|
SKULKING("furtive", 0x545454, 0xcda6cd, true),
|
||||||
|
;
|
||||||
|
|
||||||
|
private CombType(String pName, int colourA, int colourB, boolean show)
|
||||||
|
{
|
||||||
|
this.name = pName;
|
||||||
|
this.combColour = new int[2];
|
||||||
|
this.combColour[0] = colourA;
|
||||||
|
this.combColour[1] = colourB;
|
||||||
|
|
||||||
|
this.showInList = show;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
public int[] combColour;
|
||||||
|
public boolean showInList;
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.comb." + this.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public enum DropType
|
||||||
|
{
|
||||||
|
ENCHANTED("enchanting", 0x6e1c6d, 0xff8fff),
|
||||||
|
INTELLECT("intellect", 0x25914D, 0x18E072),
|
||||||
|
;
|
||||||
|
|
||||||
|
private DropType(String pName, int colourA, int colourB)
|
||||||
|
{
|
||||||
|
this.name = pName;
|
||||||
|
this.combColour[0] = colourA;
|
||||||
|
this.combColour[1] = colourB;
|
||||||
|
}
|
||||||
|
|
||||||
|
private final String name;
|
||||||
|
public int[] combColour = new int[2];
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.drop." + this.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
|
||||||
|
public enum HiveFrameType
|
||||||
|
{
|
||||||
|
MAGIC("magic", 32, 240, 1f, 1f, 1f, 2f, 2, 5,
|
||||||
|
null),
|
||||||
|
RESILIENT("resillient", 33, 840, 1f, 1f, 1f, 2f, 2, 5,
|
||||||
|
new ObjectTags().add(EnumTag.ARMOR, 1)),
|
||||||
|
GENTLE("gentle", 34, 200, 1f, 0.7f, 1.5f, 1.4f, 1, 5,
|
||||||
|
new ObjectTags().add(EnumTag.HEAL, 1).add(EnumTag.LIFE, 1)),
|
||||||
|
METABOLIC("metabolic", 35, 120, 1f, 1.8f, 1f, 1.2f, 5, 5,
|
||||||
|
new ObjectTags().add(EnumTag.EXCHANGE, 1).add(EnumTag.MOTION, 1)),
|
||||||
|
NECROTIC("necrotic", 36, 290, 1f, 1f, 0.3f, 0.75f, 1, 5,
|
||||||
|
new ObjectTags().add(EnumTag.DEATH, 3).add(EnumTag.POISON, 2)),
|
||||||
|
TEMPORAL("temporal", 37, 300, 1f, 1f, 2.5f, 1f, 1, 5,
|
||||||
|
new ObjectTags().add(EnumTag.TIME, 5)),
|
||||||
|
;
|
||||||
|
|
||||||
|
private HiveFrameType(String name, int icon, int damage,
|
||||||
|
float territory, float mutation, float lifespan, float production,
|
||||||
|
int auraUse, int wearTicks, ObjectTags fluxTags)
|
||||||
|
{
|
||||||
|
this(name, icon, damage, territory, mutation, lifespan, production, 1f, false, false, false, false, auraUse, wearTicks, fluxTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
private HiveFrameType(String name, int icon, int damage,
|
||||||
|
float territory, float mutation, float lifespan, float production, float flowering,
|
||||||
|
boolean sealed, boolean lit, boolean sunlit, boolean hellish,
|
||||||
|
int auraUse, int wearTicks, ObjectTags fluxTags)
|
||||||
|
{
|
||||||
|
this.frameName = name;
|
||||||
|
this.iconIdx = icon;
|
||||||
|
this.maxDamage = damage;
|
||||||
|
|
||||||
|
this.territoryMod = territory;
|
||||||
|
this.mutationMod = mutation;
|
||||||
|
this.lifespanMod = lifespan;
|
||||||
|
this.productionMod = production;
|
||||||
|
this.floweringMod = flowering;
|
||||||
|
this.isSealed = sealed;
|
||||||
|
this.isLit = lit;
|
||||||
|
this.isSunlit = sunlit;
|
||||||
|
this.isHellish = hellish;
|
||||||
|
|
||||||
|
this.auraPerUse = auraUse;
|
||||||
|
this.flux = fluxTags;
|
||||||
|
this.wearTicksPerAura = wearTicks;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String frameName;
|
||||||
|
public int iconIdx;
|
||||||
|
public int maxDamage;
|
||||||
|
|
||||||
|
public float territoryMod;
|
||||||
|
public float mutationMod;
|
||||||
|
public float lifespanMod;
|
||||||
|
public float productionMod;
|
||||||
|
public float floweringMod;
|
||||||
|
public boolean isSealed;
|
||||||
|
public boolean isLit;
|
||||||
|
public boolean isSunlit;
|
||||||
|
public boolean isHellish;
|
||||||
|
|
||||||
|
public ObjectTags flux;
|
||||||
|
public int auraPerUse;
|
||||||
|
public int wearTicksPerAura;
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.frame." + this.frameName);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
import net.minecraftforge.liquids.LiquidDictionary;
|
||||||
|
|
||||||
|
public enum LiquidType
|
||||||
|
{
|
||||||
|
// Incidentally, Item meta is the liquid ID.
|
||||||
|
|
||||||
|
// Args are: forgeLiquidID, Display Name, Icon idx
|
||||||
|
EMPTY("", 16),
|
||||||
|
|
||||||
|
// Vanilla
|
||||||
|
WATER("water", 17),
|
||||||
|
LAVA("lava", 18),
|
||||||
|
|
||||||
|
// Forestry
|
||||||
|
BIOMASS("biomass", 19),
|
||||||
|
BIOFUEL("biofuel", 20),
|
||||||
|
|
||||||
|
// Buildcraft
|
||||||
|
OIL("Oil", 21),
|
||||||
|
FUEL("Fuel", 22),
|
||||||
|
|
||||||
|
// More Forestry
|
||||||
|
SEEDOIL("seedoil", 23),
|
||||||
|
HONEY("honey", 24),
|
||||||
|
JUICE("juice", 25),
|
||||||
|
CRUSHEDICE("ice", 26),
|
||||||
|
MILK("milk", 27),
|
||||||
|
|
||||||
|
// ExtraBees liquids
|
||||||
|
ACID("acid", 28),
|
||||||
|
POISON("poison", 29),
|
||||||
|
LIQUIDNITROGEN("liquidNitrogen", 30),
|
||||||
|
DNA("liquidDNA", 31),
|
||||||
|
|
||||||
|
// Railcraft
|
||||||
|
CREOSOTEOIL("Creosote Oil", 32),
|
||||||
|
STEAM("Steam", 33),
|
||||||
|
;
|
||||||
|
public String liquidID;
|
||||||
|
public int iconIdx;
|
||||||
|
public boolean available = false;
|
||||||
|
|
||||||
|
private LiquidType(String l, int idx)
|
||||||
|
{
|
||||||
|
this.liquidID = l;
|
||||||
|
this.iconIdx = idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDisplayName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.liquid." + liquidID);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
public enum PlankType
|
||||||
|
{
|
||||||
|
GREATWOOD("greatwood", 48),
|
||||||
|
SILVERWOOD("silverwood", 49),
|
||||||
|
;
|
||||||
|
|
||||||
|
public String name;
|
||||||
|
public int textureIdx;
|
||||||
|
private static String[] nameList;
|
||||||
|
|
||||||
|
private PlankType(String n, int idx)
|
||||||
|
{
|
||||||
|
this.name = n;
|
||||||
|
this.textureIdx = idx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static PlankType getType(int meta)
|
||||||
|
{
|
||||||
|
PlankType type = null;
|
||||||
|
|
||||||
|
if (meta >= 0 && meta <= values().length)
|
||||||
|
{
|
||||||
|
type = values()[meta];
|
||||||
|
}
|
||||||
|
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String[] getAllNames()
|
||||||
|
{
|
||||||
|
return (nameList == null) ? nameList = generateNames() : nameList;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static String[] generateNames()
|
||||||
|
{
|
||||||
|
String[] names = new String[values().length];
|
||||||
|
for (int i = 0; i < names.length; ++i)
|
||||||
|
{
|
||||||
|
names[i] = values()[i].name;
|
||||||
|
}
|
||||||
|
return names;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public enum PollenType
|
||||||
|
{
|
||||||
|
UNUSUAL("unusual", 0xA03059, 0xD8417B),
|
||||||
|
PHASED("phased", 0x456BA5, 0x4974B4),
|
||||||
|
;
|
||||||
|
|
||||||
|
private PollenType(String pName, int colourA, int colourB)
|
||||||
|
{
|
||||||
|
this.name = pName;
|
||||||
|
this.combColour[0] = colourA;
|
||||||
|
this.combColour[1] = colourB;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
public int[] combColour = new int[2];
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.pollen." + this.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public enum PropolisType
|
||||||
|
{
|
||||||
|
STARK("dull", 0xBBBBBB),
|
||||||
|
AIR("air", 0xA19E10),
|
||||||
|
FIRE("fire", 0x95132F),
|
||||||
|
WATER("water", 0x1054A1),
|
||||||
|
EARTH("earth", 0x00a000),
|
||||||
|
INFUSED("magic", 0xaa32fc),
|
||||||
|
;
|
||||||
|
|
||||||
|
private PropolisType(String pName, int overlayColour)
|
||||||
|
{
|
||||||
|
this.name = pName;
|
||||||
|
this.colour = overlayColour;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
public int colour;
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.propolis." + this.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public enum ResourceType
|
||||||
|
{
|
||||||
|
LORE_FRAGMENT("fragment", 2, true),
|
||||||
|
AROMATIC_LUMP("lump", 3, true),
|
||||||
|
EXTENDED_FERTILIZER("fertilizer", 4, true),
|
||||||
|
|
||||||
|
// Dummy items for Thaumanomicon research icons.
|
||||||
|
// These won't ever actually exist in-game, and so
|
||||||
|
RESEARCH_StartNode("Start Node", 241, false),
|
||||||
|
RESEARCH_BeeInfusion("Bee Infusion", 240, false),
|
||||||
|
;
|
||||||
|
|
||||||
|
private ResourceType(String n, int i, boolean show)
|
||||||
|
{
|
||||||
|
this.name = n;
|
||||||
|
this.iconIdx = i;
|
||||||
|
this.showInList = show;
|
||||||
|
}
|
||||||
|
private String name;
|
||||||
|
public int iconIdx;
|
||||||
|
public boolean showInList;
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.resource." + this.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public enum WaxType
|
||||||
|
{
|
||||||
|
MAGIC("magic", false, 0xd242df),
|
||||||
|
;
|
||||||
|
|
||||||
|
private WaxType(String n, boolean sp, int c)
|
||||||
|
{
|
||||||
|
this.name = n;
|
||||||
|
this.sparkly = sp;
|
||||||
|
this.colour = c;
|
||||||
|
}
|
||||||
|
|
||||||
|
private String name;
|
||||||
|
public boolean sparkly;
|
||||||
|
public int colour;
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.wax." + this.name);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
package thaumicbees.main;
|
package thaumicbees.main;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
import thaumicbees.main.render.BeeRenderEffect;
|
import thaumicbees.main.render.BeeRenderEffect;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.client.MinecraftForgeClient;
|
import net.minecraftforge.client.MinecraftForgeClient;
|
||||||
@@ -16,30 +18,45 @@ public class ClientProxy extends CommonProxy
|
|||||||
public void preloadTextures()
|
public void preloadTextures()
|
||||||
{
|
{
|
||||||
// Preload the TCBees items file
|
// Preload the TCBees items file
|
||||||
MinecraftForgeClient.preloadTexture(TCBEES_ITEMSPNG);
|
MinecraftForgeClient.preloadTexture(TCBEES_ITEMS_IMAGE);
|
||||||
|
MinecraftForgeClient.preloadTexture(TCBEES_LIQUIDS_IMAGE);
|
||||||
|
|
||||||
|
Field f;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
|
||||||
|
ThaumicBees.getConfig().DrawParticleEffects = f.getBoolean(null);
|
||||||
|
|
||||||
|
f = Class.forName("forestry.core.config.Defaults").getField("TEXTURE_PARTICLES_BEE");
|
||||||
|
thaumicbees.main.CommonProxy.FORESTRY_GFX_BEEEFFECTS = (String)f.get(null);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawBeeEffects(World world, double xPos, double yPos, double zPos, int colour, int rangeX, int rangeY, int rangeZ)
|
public void drawBeeEffects(World world, double xPos, double yPos, double zPos, int colour, int rangeX, int rangeY, int rangeZ)
|
||||||
{
|
{
|
||||||
// drawParticleEffects flag pulled from Forestry after configs
|
// drawParticleEffects flag pulled from Forestry after configs
|
||||||
if (ThaumicBees.object.configFlags.drawParticleEffects)
|
if (ThaumicBees.getConfig().DrawParticleEffects)
|
||||||
{
|
{
|
||||||
double spawnX = xPos;
|
double spawnX;
|
||||||
double spawnY = yPos;
|
double spawnY;
|
||||||
double spawnZ = zPos;
|
double spawnZ;
|
||||||
|
|
||||||
if (world.rand.nextBoolean())
|
if (world.rand.nextBoolean())
|
||||||
{
|
{
|
||||||
spawnX += 0.5;
|
spawnX = xPos + 0.5;
|
||||||
spawnY += 0.5;
|
spawnY = yPos + 0.75;
|
||||||
spawnZ += 0.5;
|
spawnZ = zPos + 0.5;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spawnX += world.rand.nextInt(rangeX * 2) - rangeX;
|
spawnX = xPos + world.rand.nextInt(rangeX * 2) - rangeX;
|
||||||
spawnY += world.rand.nextInt(rangeY);
|
spawnY = yPos + world.rand.nextInt(rangeY);
|
||||||
spawnZ += world.rand.nextInt(rangeZ * 2) - rangeY;
|
spawnZ = zPos + world.rand.nextInt(rangeZ * 2) - rangeZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getClientInstance().effectRenderer.addEffect(new BeeRenderEffect(world, spawnX, spawnY, spawnZ, 0f, 0f, 0f, colour));
|
this.getClientInstance().effectRenderer.addEffect(new BeeRenderEffect(world, spawnX, spawnY, spawnZ, 0f, 0f, 0f, colour));
|
||||||
|
|||||||
@@ -8,12 +8,14 @@ public class CommonProxy
|
|||||||
{
|
{
|
||||||
public static final String TCBEES_GFX = "/gfx/thaumicbees/";
|
public static final String TCBEES_GFX = "/gfx/thaumicbees/";
|
||||||
public static final String TCBEES_RESEARCH = "/research/thaumicbees/";
|
public static final String TCBEES_RESEARCH = "/research/thaumicbees/";
|
||||||
public static final String TCBEES_ITEMS = TCBEES_GFX + "items/";
|
public static final String TCBEES_LOCDIR = "/lang/thaumicbees/";
|
||||||
|
public static final String TCBEES_ITEM_GFX = TCBEES_GFX + "items/";
|
||||||
|
|
||||||
public static String FORESTRY_GFX_ITEMS;
|
public static String FORESTRY_GFX_ITEMS;
|
||||||
public static String FORESTRY_GFX_BEEEFFECTS;
|
public static String FORESTRY_GFX_BEEEFFECTS;
|
||||||
|
|
||||||
public static final String TCBEES_ITEMSPNG = TCBEES_ITEMS + "items.png";
|
public static final String TCBEES_ITEMS_IMAGE = TCBEES_ITEM_GFX + "items.png";
|
||||||
|
public static final String TCBEES_LIQUIDS_IMAGE = TCBEES_ITEM_GFX + "liquids.png";
|
||||||
|
|
||||||
public CommonProxy() { }
|
public CommonProxy() { }
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,274 @@
|
|||||||
|
package thaumicbees.main;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
|
||||||
|
import thaumicbees.block.BlockPlanks;
|
||||||
|
import thaumicbees.block.BlockWoodSlab;
|
||||||
|
import thaumicbees.item.ItemCapsule;
|
||||||
|
import thaumicbees.item.ItemComb;
|
||||||
|
import thaumicbees.item.ItemDrop;
|
||||||
|
import thaumicbees.item.ItemMagicHiveFrame;
|
||||||
|
import thaumicbees.item.ItemMiscResources;
|
||||||
|
import thaumicbees.item.ItemPollen;
|
||||||
|
import thaumicbees.item.ItemPropolis;
|
||||||
|
import thaumicbees.item.ItemThaumiumGrafter;
|
||||||
|
import thaumicbees.item.ItemThaumiumScoop;
|
||||||
|
import thaumicbees.item.ItemSolidFlux;
|
||||||
|
import thaumicbees.item.ItemWax;
|
||||||
|
import thaumicbees.item.types.CapsuleType;
|
||||||
|
import thaumicbees.item.types.HiveFrameType;
|
||||||
|
import thaumicbees.item.types.PlankType;
|
||||||
|
import thaumicbees.item.types.ResourceType;
|
||||||
|
import thaumicbees.main.utils.CompatabilityManager;
|
||||||
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||||
|
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
import thaumicbees.storage.BackpackDefinition;
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
import forestry.api.apiculture.BeeManager;
|
||||||
|
import forestry.api.storage.BackpackManager;
|
||||||
|
import forestry.api.storage.EnumBackpackType;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.BlockLog;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemFood;
|
||||||
|
import net.minecraft.item.ItemMultiTextureTile;
|
||||||
|
import net.minecraft.item.ItemSlab;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.potion.Potion;
|
||||||
|
import net.minecraft.tileentity.TileEntity;
|
||||||
|
import net.minecraftforge.common.Configuration;
|
||||||
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
import net.minecraftforge.common.Property;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class to hold some data related to mod state & functions.
|
||||||
|
* @author MysteriousAges
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class Config
|
||||||
|
{
|
||||||
|
public boolean DrawParticleEffects;
|
||||||
|
public boolean BeeInfusionsAdded;
|
||||||
|
public boolean ExtraBeesInstalled;
|
||||||
|
public boolean AddThaumcraftItemsToBackpacks;
|
||||||
|
public boolean SkipUpdateCheck;
|
||||||
|
public String ThaumaturgeExtraItems;
|
||||||
|
public int capsuleStackSizeMax;
|
||||||
|
|
||||||
|
public static BlockPlanks planksWood;
|
||||||
|
public static BlockWoodSlab slabWoodHalf;
|
||||||
|
public static BlockWoodSlab slabWoodFull;
|
||||||
|
|
||||||
|
public static ItemComb combs;
|
||||||
|
public static ItemWax wax;
|
||||||
|
public static ItemPropolis propolis;
|
||||||
|
public static ItemDrop drops;
|
||||||
|
public static ItemPollen pollen;
|
||||||
|
public static ItemSolidFlux solidFlux;
|
||||||
|
public static ItemMiscResources miscResources;
|
||||||
|
public static ItemFood jellyBaby;
|
||||||
|
public static ItemThaumiumScoop thaumiumScoop;
|
||||||
|
public static ItemThaumiumGrafter thaumiumGrafter;
|
||||||
|
|
||||||
|
//----- Liquid Capsules --------------------
|
||||||
|
public static ItemCapsule magicCapsule;
|
||||||
|
public static ItemCapsule voidCapsule;
|
||||||
|
|
||||||
|
//----- Apiary Frames ----------------------
|
||||||
|
public static ItemMagicHiveFrame hiveFrameMagic;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameResilient;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameGentle;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameMetabolic;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameNecrotic;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameTemporal;
|
||||||
|
|
||||||
|
//----- Backpacks ------------------------------------------
|
||||||
|
public static Item thaumaturgeBackpackT1;
|
||||||
|
public static Item thaumaturgeBackpackT2;
|
||||||
|
public static BackpackDefinition thaumaturgeBackpackDef;
|
||||||
|
|
||||||
|
//----- Forestry Blocks ------------------------------------
|
||||||
|
//----- Forestry Items -------------------------------------
|
||||||
|
public static Item fBeeComb;
|
||||||
|
public static Item fPollen;
|
||||||
|
public static Item fCraftingResource;
|
||||||
|
//----- Thaumcraft Blocks ----------------------------------
|
||||||
|
public static Block tcPlant;
|
||||||
|
public static Block tcCandle;
|
||||||
|
public static Block tcCrystal;
|
||||||
|
public static Block tcMarker;
|
||||||
|
public static Block tcJar;
|
||||||
|
public static Block tcLog;
|
||||||
|
public static Block tcLeaf;
|
||||||
|
public static Block tcWarded;
|
||||||
|
//----- Thaumcraft Items -----------------------------------
|
||||||
|
public static Item tcFilledJar;
|
||||||
|
public static Item tcMiscResource;
|
||||||
|
public static Item tcEssentiaBottle;
|
||||||
|
public static Item tcShard;
|
||||||
|
public static Item tcGolem;
|
||||||
|
public static Item tcWispEssence;
|
||||||
|
public static Item tcNuggets;
|
||||||
|
|
||||||
|
|
||||||
|
//----- Config State info ----------------------------------
|
||||||
|
private Configuration tbConfig;
|
||||||
|
|
||||||
|
public Config(File configFile)
|
||||||
|
{
|
||||||
|
this.tbConfig = new Configuration(configFile);
|
||||||
|
|
||||||
|
this.tbConfig.load();
|
||||||
|
this.doMiscConfig();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveConfigs()
|
||||||
|
{
|
||||||
|
this.tbConfig.save();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setupBlocks()
|
||||||
|
{
|
||||||
|
ThaumcraftHelper.getThaumcraftBlocks();
|
||||||
|
ForestryHelper.getForestryBlocks();
|
||||||
|
|
||||||
|
int blockIdBase = 1750;
|
||||||
|
|
||||||
|
planksWood = new BlockPlanks(tbConfig.getBlock("planksTC", blockIdBase++).getInt());
|
||||||
|
|
||||||
|
Item item = new ItemMultiTextureTile(planksWood.blockID - 256, planksWood, PlankType.getAllNames())
|
||||||
|
.setItemName(planksWood.getBlockName()).setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
Item.itemsList[planksWood.blockID] = item;
|
||||||
|
|
||||||
|
OreDictionary.registerOre("plankWood", new ItemStack(planksWood, 1, -1));
|
||||||
|
|
||||||
|
slabWoodFull = new BlockWoodSlab(tbConfig.getBlock("slabFull", blockIdBase++).getInt(), true);
|
||||||
|
slabWoodHalf = new BlockWoodSlab(tbConfig.getBlock("slabHalf", blockIdBase++).getInt(), false);
|
||||||
|
|
||||||
|
item = new ItemSlab(slabWoodHalf.blockID - 256, slabWoodHalf, slabWoodFull, false)
|
||||||
|
.setItemName(slabWoodHalf.getBlockName()).setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
Item.itemsList[slabWoodHalf.blockID] = item;
|
||||||
|
item = new ItemSlab(slabWoodFull.blockID - 256, slabWoodHalf, slabWoodFull, true)
|
||||||
|
.setItemName(slabWoodFull.getBlockName()).setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
|
||||||
|
Item.itemsList[slabWoodFull.blockID] = item;
|
||||||
|
|
||||||
|
OreDictionary.registerOre("slabWood", new ItemStack(slabWoodHalf, 1, -1));
|
||||||
|
|
||||||
|
blockIdBase++; // Stair
|
||||||
|
}
|
||||||
|
|
||||||
|
public void registerTileEntities()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setupItems()
|
||||||
|
{
|
||||||
|
ThaumcraftHelper.getThaumcraftItems();
|
||||||
|
ForestryHelper.getForestryItems();
|
||||||
|
|
||||||
|
int itemIDBase = 26090;
|
||||||
|
|
||||||
|
Property p = tbConfig.getItem("combs", itemIDBase++);
|
||||||
|
combs= new ItemComb(p.getInt());
|
||||||
|
OreDictionary.registerOre("beeComb", new ItemStack(combs, 1, -1));
|
||||||
|
|
||||||
|
wax = new ItemWax(tbConfig.getItem("wax", itemIDBase++).getInt());
|
||||||
|
propolis = new ItemPropolis(tbConfig.getItem("propolis", itemIDBase++).getInt());
|
||||||
|
drops = new ItemDrop(tbConfig.getItem("drop", itemIDBase++).getInt());
|
||||||
|
miscResources = new ItemMiscResources(tbConfig.getItem("miscResources", itemIDBase++).getInt());
|
||||||
|
|
||||||
|
|
||||||
|
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
|
||||||
|
BeeManager.inducers.put(miscResources.getStackForType(ResourceType.AROMATIC_LUMP), 80);
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 0x8700C6 = purpleish.
|
||||||
|
String backpackName = LocalizationManager.getLocalizedString("tb.backpack.thaumaturge");
|
||||||
|
BackpackDefinition def = new BackpackDefinition("thaumaturge", backpackName, 0x8700C6);
|
||||||
|
thaumaturgeBackpackT1 =
|
||||||
|
BackpackManager.backpackInterface.addBackpack(tbConfig.getItem("thaumaturgePack1", itemIDBase++).getInt(),
|
||||||
|
def, EnumBackpackType.T1);
|
||||||
|
thaumaturgeBackpackT2 =
|
||||||
|
BackpackManager.backpackInterface.addBackpack(tbConfig.getItem("thaumaturgePack2", itemIDBase++).getInt(),
|
||||||
|
def, EnumBackpackType.T2);
|
||||||
|
// Add additional items from configs to backpack.
|
||||||
|
if (ThaumicBees.getConfig().ThaumaturgeExtraItems.length() > 0)
|
||||||
|
{
|
||||||
|
FMLLog.info("Attempting to add extra items to Thaumaturge's backpack! If you get an error, check your ThaumicBees.conf.");
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ThaumicBees.getConfig().ThaumaturgeExtraItems);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
FMLLog.severe("ThaumicBees encountered a problem during loading!");
|
||||||
|
throw new RuntimeException("Could not register backpacks via Forestry. Check your FML Client log and see if Forestry crashed silently.", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
magicCapsule = new ItemCapsule(CapsuleType.MAGIC, tbConfig.getItem("magicCapsule", itemIDBase++).getInt(), this.capsuleStackSizeMax);
|
||||||
|
|
||||||
|
pollen = new ItemPollen(tbConfig.getItem("pollen", itemIDBase++).getInt());
|
||||||
|
solidFlux = new ItemSolidFlux(tbConfig.getItem("fluxCrystal", itemIDBase++).getInt());
|
||||||
|
|
||||||
|
hiveFrameMagic = new ItemMagicHiveFrame(tbConfig.getItem("frameMagic", itemIDBase++).getInt(), HiveFrameType.MAGIC);
|
||||||
|
hiveFrameResilient = new ItemMagicHiveFrame(tbConfig.getItem("frameResilient", itemIDBase++).getInt(), HiveFrameType.RESILIENT);
|
||||||
|
hiveFrameGentle = new ItemMagicHiveFrame(tbConfig.getItem("frameGentle", itemIDBase++).getInt(), HiveFrameType.GENTLE);
|
||||||
|
hiveFrameMetabolic = new ItemMagicHiveFrame(tbConfig.getItem("frameMetabolic", itemIDBase++).getInt(), HiveFrameType.METABOLIC);
|
||||||
|
hiveFrameNecrotic = new ItemMagicHiveFrame(tbConfig.getItem("frameNecrotic", itemIDBase++).getInt(), HiveFrameType.NECROTIC);
|
||||||
|
hiveFrameTemporal = new ItemMagicHiveFrame(tbConfig.getItem("frameTemporal", itemIDBase++).getInt(), HiveFrameType.TEMPORAL);
|
||||||
|
// Future frames, so they all are clumped together.
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
|
||||||
|
// Jelly babies for Dr. Whoniversary.
|
||||||
|
jellyBaby = new ItemFood(tbConfig.getItem("jellyBabies", itemIDBase++).getInt(), 1, false).setAlwaysEdible()
|
||||||
|
.setPotionEffect(Potion.moveSpeed.id, 5, 1, 1f);
|
||||||
|
jellyBaby.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE).setIconIndex(19).setItemName("jellyBabies");
|
||||||
|
|
||||||
|
voidCapsule = new ItemCapsule(CapsuleType.VOID, tbConfig.getItem("voidCapsule", itemIDBase++).getInt(), this.capsuleStackSizeMax);
|
||||||
|
|
||||||
|
thaumiumScoop = new ItemThaumiumScoop(tbConfig.getItem("thaumiumScoop", itemIDBase++).getInt());
|
||||||
|
MinecraftForge.setToolClass(thaumiumScoop, "scoop", 3);
|
||||||
|
|
||||||
|
thaumiumGrafter = new ItemThaumiumGrafter(tbConfig.getItem("thaumiumGrafter", itemIDBase++).getInt());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void doMiscConfig()
|
||||||
|
{
|
||||||
|
Property p;
|
||||||
|
|
||||||
|
p = tbConfig.get("general", "backpack.thaumaturge.additionalItems", "");
|
||||||
|
p.comment = "Add additional items to the Thaumaturge's Backpack." +
|
||||||
|
"\n Format is the same as Forestry's: id:meta;id;id:meta (etc)";
|
||||||
|
this.ThaumaturgeExtraItems = p.value;
|
||||||
|
|
||||||
|
p = tbConfig.get("general", "backpack.forestry.addThaumcraftItems", true);
|
||||||
|
p.comment = "Set to true if you want ThaumicBees to add several Thaumcraft blocks & items to Forestry backpacks." +
|
||||||
|
"\n Set to false to disable.";
|
||||||
|
this.AddThaumcraftItemsToBackpacks = p.getBoolean(true);
|
||||||
|
|
||||||
|
p = tbConfig.get("general", "capsuleStackSize", 64);
|
||||||
|
p.comment = "Allows you to edit the stack size of the capsules in ThaumicBees if using GregTech, \n" +
|
||||||
|
"or the reduced capsule size in Forestry & Railcraft. Default: 64";
|
||||||
|
this.capsuleStackSizeMax = p.getInt();
|
||||||
|
|
||||||
|
p = tbConfig.get("general", "disableVersionCheck", false);
|
||||||
|
p.comment = "Set to true to stop ThaumicBees from checking for updates.";
|
||||||
|
this.SkipUpdateCheck = p.getBoolean(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
package thaumicbees.main;
|
|
||||||
|
|
||||||
public class ConfigFlags
|
|
||||||
{
|
|
||||||
public boolean drawParticleEffects;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
package thaumicbees.main;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
|
|
||||||
import thaumcraft.api.EnumTag;
|
|
||||||
import thaumcraft.api.ObjectTags;
|
|
||||||
import thaumcraft.api.ThaumcraftApi;
|
|
||||||
import thaumicbees.block.BlockManager;
|
|
||||||
import thaumicbees.item.ItemManager;
|
|
||||||
import thaumicbees.item.ItemWax.WaxType;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemBlock;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.common.Property;
|
|
||||||
import net.minecraftforge.common.Configuration;
|
|
||||||
|
|
||||||
public class ThaumcraftCompat
|
|
||||||
{
|
|
||||||
private static final int blockMetaSilverleaf = 2;
|
|
||||||
private static final int blockMetaCinderpearl = 3;
|
|
||||||
|
|
||||||
private static int itemResourceID;
|
|
||||||
private static final int itemResourceQuicksilverMeta = 3;
|
|
||||||
private static final int itemResourceAmberMeta = 6;
|
|
||||||
private static final int itemResourceFragmentMeta = 9;
|
|
||||||
|
|
||||||
private static int itemShardID;
|
|
||||||
private static final int itemShardAirMeta = 0;
|
|
||||||
private static final int itemShardFireMeta = 1;
|
|
||||||
private static final int itemShardWaterMeta = 2;
|
|
||||||
private static final int itemShardEarthMeta = 3;
|
|
||||||
private static final int itemShardMagicMeta = 4;
|
|
||||||
private static final int itemShardDullMeta = 5;
|
|
||||||
|
|
||||||
private static int itemEssentiaBottle;
|
|
||||||
|
|
||||||
public static void init()
|
|
||||||
{
|
|
||||||
Configuration tcConfig = new Configuration(new File("./config/Thaumcraft.cfg"));
|
|
||||||
Property p;
|
|
||||||
|
|
||||||
tcConfig.load();
|
|
||||||
|
|
||||||
// Load blocks out of the Thaumcraft config to get their IDs;
|
|
||||||
p = tcConfig.getBlock("BlockCustomPlant", 2403);
|
|
||||||
BlockManager.ThaumcraftPlant = Block.blocksList[p.getInt()];
|
|
||||||
|
|
||||||
// Load items out of the Thaumcraft config to get their IDs.
|
|
||||||
p = tcConfig.getItem("ItemEssence", 25005);
|
|
||||||
itemEssentiaBottle = p.getInt() + 256;
|
|
||||||
ItemManager.essentiaBottle = new ItemStack(itemEssentiaBottle, 1, 0);
|
|
||||||
p = tcConfig.getItem("ItemResource", 25007);
|
|
||||||
itemResourceID = p.getInt() + 256;
|
|
||||||
ItemManager.quicksilver = new ItemStack(itemResourceID, 1, itemResourceQuicksilverMeta);
|
|
||||||
ItemManager.amber = new ItemStack(itemResourceID, 1, itemResourceAmberMeta);
|
|
||||||
ItemManager.fragment = new ItemStack(itemResourceID, 1, itemResourceFragmentMeta);
|
|
||||||
p = tcConfig.getItem("ItemShard", 25008);
|
|
||||||
itemShardID = p.getInt() + 256;
|
|
||||||
ItemManager.airShard = new ItemStack(itemShardID, 1, itemShardAirMeta);
|
|
||||||
ItemManager.fireShard = new ItemStack(itemShardID, 1, itemShardFireMeta);
|
|
||||||
ItemManager.waterShard = new ItemStack(itemShardID, 1, itemShardWaterMeta);
|
|
||||||
ItemManager.earthShard = new ItemStack(itemShardID, 1, itemShardEarthMeta);
|
|
||||||
ItemManager.magicShard = new ItemStack(itemShardID, 1, itemShardMagicMeta);
|
|
||||||
ItemManager.dullShard = new ItemStack(itemShardID, 1, itemShardDullMeta);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setupResearch()
|
|
||||||
{
|
|
||||||
//ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "/research.xml");
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void setupAspects()
|
|
||||||
{
|
|
||||||
ObjectTags tags;
|
|
||||||
|
|
||||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.wax.shiftedIndex, WaxType.MAGIC.ordinal(), tags);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,32 +1,23 @@
|
|||||||
package thaumicbees.main;
|
package thaumicbees.main;
|
||||||
|
|
||||||
import cpw.mods.fml.common.Mod;
|
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
|
||||||
import cpw.mods.fml.common.event.*;
|
|
||||||
import forestry.api.apiculture.EnumBeeType;
|
|
||||||
import forestry.api.core.ItemInterface;
|
|
||||||
|
|
||||||
import java.io.PrintStream;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
|
|
||||||
import net.minecraft.item.Item;
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.common.Property;
|
|
||||||
import net.minecraftforge.event.EventBus;
|
|
||||||
import net.minecraftforge.event.ForgeSubscribe;
|
import net.minecraftforge.event.ForgeSubscribe;
|
||||||
import net.minecraftforge.event.world.WorldEvent;
|
import thaumicbees.main.utils.CompatabilityManager;
|
||||||
import thaumcraft.api.*;
|
import thaumicbees.main.utils.CraftingManager;
|
||||||
import thaumicbees.bees.ThaumicBeesPlugin;
|
import thaumicbees.main.utils.LocalizationManager;
|
||||||
import thaumicbees.bees.genetics.BeeSpecies;
|
import thaumicbees.main.utils.VersionInfo;
|
||||||
import thaumicbees.block.BlockManager;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
import thaumicbees.item.ItemComb;
|
import cpw.mods.fml.common.Mod;
|
||||||
import thaumicbees.item.ItemWax;
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
import thaumicbees.item.ItemManager;
|
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||||
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
|
import forestry.api.core.ItemInterface;
|
||||||
|
|
||||||
@Mod(
|
@Mod(
|
||||||
modid="ThaumicBees",
|
modid="ThaumicBees",
|
||||||
|
name="Thaumic Bees",
|
||||||
useMetadata=true,
|
useMetadata=true,
|
||||||
acceptedMinecraftVersions=VersionInfo.MCVersion,
|
acceptedMinecraftVersions=VersionInfo.MCVersion,
|
||||||
version=VersionInfo.Version,
|
version=VersionInfo.Version,
|
||||||
@@ -40,57 +31,79 @@ public class ThaumicBees
|
|||||||
|
|
||||||
@SidedProxy(serverSide="thaumicbees.main.CommonProxy", clientSide="thaumicbees.main.ClientProxy")
|
@SidedProxy(serverSide="thaumicbees.main.CommonProxy", clientSide="thaumicbees.main.ClientProxy")
|
||||||
public static CommonProxy proxy;
|
public static CommonProxy proxy;
|
||||||
|
|
||||||
private boolean ThaumcraftRecipesAdded;
|
private String configsPath;
|
||||||
private Configuration config;
|
private Config modConfig;
|
||||||
public ConfigFlags configFlags;
|
|
||||||
|
|
||||||
public ThaumicBees()
|
public ThaumicBees()
|
||||||
{
|
{
|
||||||
ThaumcraftRecipesAdded = false;
|
|
||||||
this.configFlags = new ConfigFlags();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.PreInit
|
@Mod.PreInit
|
||||||
public void preInit(FMLPreInitializationEvent event)
|
public void preInit(FMLPreInitializationEvent event)
|
||||||
{
|
{
|
||||||
this.config = new Configuration(event.getSuggestedConfigurationFile());
|
LocalizationManager.setupLocalizationInfo();
|
||||||
|
|
||||||
|
this.configsPath = event.getModConfigurationDirectory().getAbsolutePath();
|
||||||
|
this.modConfig = new Config(event.getSuggestedConfigurationFile());
|
||||||
|
|
||||||
|
CompatabilityManager.registerResearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.Init
|
@Mod.Init
|
||||||
public void init(FMLInitializationEvent event)
|
public void init(FMLInitializationEvent event)
|
||||||
{
|
{
|
||||||
// Give ThaumcraftCompat a chance to set itself up.
|
// Check on ExtraBees & enable content. =D
|
||||||
ThaumcraftCompat.init();
|
this.modConfig.ExtraBeesInstalled = cpw.mods.fml.common.Loader.isModLoaded("ExtraBees");
|
||||||
|
|
||||||
this.proxy.preloadTextures();
|
this.proxy.preloadTextures();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
FMLLog.info("[ThaumicBees] Attempting to get Forestry's item graphics file...");
|
||||||
|
// Grab Forestry graphics file path
|
||||||
|
proxy.FORESTRY_GFX_ITEMS = ItemInterface.getItem("beeComb").getItem().getTextureFile();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
FMLLog.severe("ThaumicBees encountered a problem while loading!");
|
||||||
|
throw new RuntimeException("Could not get the Forestry item texture file! Did Forestry load correctly?", e);
|
||||||
|
}
|
||||||
|
|
||||||
// Grab Forestry graphics file path
|
this.modConfig.setupBlocks();
|
||||||
proxy.FORESTRY_GFX_ITEMS = ItemInterface.getItem("beeComb").getItem().getTextureFile();
|
this.modConfig.registerTileEntities();
|
||||||
|
this.modConfig.setupItems();
|
||||||
|
|
||||||
this.config.load();
|
CompatabilityManager.setupBackpacks();
|
||||||
BlockManager.setupBlocks(this.config);
|
|
||||||
ItemManager.setupItems(this.config);
|
|
||||||
this.config.save();
|
|
||||||
|
|
||||||
ItemManager.setupCrafting();
|
|
||||||
|
|
||||||
ThaumcraftCompat.setupResearch();
|
|
||||||
ThaumcraftCompat.setupAspects();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.PostInit
|
@Mod.PostInit
|
||||||
public void postInit(FMLPostInitializationEvent event)
|
public void postInit(FMLPostInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
this.setupBees();
|
||||||
|
this.modConfig.saveConfigs();
|
||||||
|
|
||||||
|
CompatabilityManager.setupItemAspects();
|
||||||
|
|
||||||
|
// Vanilla, Forestry & Thaumcraft crafting setup
|
||||||
|
CraftingManager.setupCrafting();
|
||||||
|
|
||||||
|
// Forestry has init'd by this point.
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
|
|
||||||
|
CompatabilityManager.setupResearch();
|
||||||
|
|
||||||
|
VersionInfo.doVersionCheck();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ForgeSubscribe
|
public static Config getConfig()
|
||||||
public void worldLoad(net.minecraftforge.event.world.WorldEvent.Load event)
|
|
||||||
{
|
{
|
||||||
if (!ThaumcraftRecipesAdded)
|
return object.modConfig;
|
||||||
{
|
}
|
||||||
ThaumicBeesPlugin.setupBeeInfusions(event.world);
|
|
||||||
ThaumcraftRecipesAdded = true;
|
private void setupBees()
|
||||||
}
|
{
|
||||||
|
thaumicbees.bees.Allele.setupAdditionalAlleles();
|
||||||
|
thaumicbees.bees.BeeSpecies.setupBeeSpecies();
|
||||||
|
thaumicbees.bees.BeeMutation.setupMutations();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package thaumicbees.main;
|
|
||||||
|
|
||||||
public class Vector3
|
|
||||||
{
|
|
||||||
public int x;
|
|
||||||
public int y;
|
|
||||||
public int z;
|
|
||||||
|
|
||||||
public Vector3()
|
|
||||||
{
|
|
||||||
x = y = z = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
package thaumicbees.main;
|
|
||||||
|
|
||||||
public class VersionInfo
|
|
||||||
{
|
|
||||||
|
|
||||||
public static final String Version = "@VERSION@";
|
|
||||||
public static final String MCVersion = "@MCVERSION@";
|
|
||||||
public static final String Build = "@BUILD_NUMBER@";
|
|
||||||
|
|
||||||
public static final String Depends = "required-after:Forestry@[1.6.4.2,);required-after:Thaumcraft@[3.0.1c,)";
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,523 @@
|
|||||||
|
package thaumicbees.main.utils;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ItemApi;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumcraft.api.research.ResearchItem;
|
||||||
|
import thaumcraft.api.research.ResearchList;
|
||||||
|
import thaumicbees.bees.Allele;
|
||||||
|
import thaumicbees.bees.BeeGenomeManager;
|
||||||
|
import thaumicbees.item.ItemComb;
|
||||||
|
import thaumicbees.item.ItemMiscResources;
|
||||||
|
import thaumicbees.item.types.CombType;
|
||||||
|
import thaumicbees.item.types.DropType;
|
||||||
|
import thaumicbees.item.types.LiquidType;
|
||||||
|
import thaumicbees.item.types.PollenType;
|
||||||
|
import thaumicbees.item.types.PropolisType;
|
||||||
|
import thaumicbees.item.types.ResourceType;
|
||||||
|
import thaumicbees.item.types.WaxType;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
import thaumicbees.main.utils.compat.ExtraBeesHelper;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper;
|
||||||
|
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper.CircuitBoard;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper.Comb;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper.CraftingMaterial;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper.Pollen;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper.Propolis;
|
||||||
|
import thaumicbees.main.utils.compat.ForestryHelper.Tube;
|
||||||
|
import thaumicbees.main.utils.compat.ThaumcraftHelper.MiscResource;
|
||||||
|
import thaumicbees.storage.BackpackDefinition;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
|
import forestry.api.core.BlockInterface;
|
||||||
|
import forestry.api.core.ItemInterface;
|
||||||
|
import forestry.api.storage.BackpackManager;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.Property;
|
||||||
|
import net.minecraftforge.common.Configuration;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
|
||||||
|
public class CompatabilityManager
|
||||||
|
{
|
||||||
|
public static ItemStack getExtraBeeItem(String field)
|
||||||
|
{
|
||||||
|
ItemStack value = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Class src = Class.forName("binnie.extrabees.core.ExtraBeeItem");
|
||||||
|
Field f = src.getDeclaredField(field);
|
||||||
|
|
||||||
|
Item i = (Item) f.get(null);
|
||||||
|
value = new ItemStack(i);
|
||||||
|
}
|
||||||
|
catch (Exception e) { }
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupBackpacks()
|
||||||
|
{
|
||||||
|
if (ThaumicBees.getConfig().AddThaumcraftItemsToBackpacks)
|
||||||
|
{
|
||||||
|
// Add all shards and Thaumium to miner's backpack
|
||||||
|
String ids = Config.tcShard.itemID + ":" + -1 + ";"
|
||||||
|
+ Config.tcMiscResource.itemID + ":" + ThaumcraftHelper.MiscResource.THAUMIUM.ordinal();
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "miner@" + ids);
|
||||||
|
|
||||||
|
// All resources go into Thaumaturge's backpack
|
||||||
|
ids = Config.tcMiscResource.itemID + ":" + -1 + ";"
|
||||||
|
+ Config.tcShard.itemID + ":" + -1 + ";"
|
||||||
|
+ Config.tcFilledJar.itemID + ":" + -1 + ";"
|
||||||
|
+ Config.tcCrystal.blockID + ":" + -1 + ";"
|
||||||
|
+ Config.tcJar.blockID + ":" + -1 + ";"
|
||||||
|
+ Config.tcGolem.itemID + ":" + -1 + ";"
|
||||||
|
+ Config.solidFlux.itemID + ":" + -1;
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ids);
|
||||||
|
|
||||||
|
// Add some plants & saplings to Forester's
|
||||||
|
ids = Config.tcPlant.blockID + ":" + "-1" + ";"
|
||||||
|
+ Config.tcLeaf.blockID + ":" + -1 + ";"
|
||||||
|
+ Config.tcLog.blockID + ":" + "-1";
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "forester@" + ids);
|
||||||
|
|
||||||
|
// Add Wisp & brains to Hunter's
|
||||||
|
ids = Config.tcWispEssence.itemID + ":" + -1 + ";"
|
||||||
|
+ Config.tcMiscResource.itemID + ":" + ThaumcraftHelper.MiscResource.ZOMBIE_BRAIN.ordinal();
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "hunter@" + ids);
|
||||||
|
|
||||||
|
// Add Marker, warded stone, candle to builder
|
||||||
|
ids = Config.tcCandle.blockID + ":" + -1 + ";"
|
||||||
|
+ Config.tcMarker.blockID + ":" + -1 + ";"
|
||||||
|
+ Config.tcWarded.blockID + ":" + -1;
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "builder@" + ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupItemAspects()
|
||||||
|
{
|
||||||
|
setupItemAspectsThaumicBees();
|
||||||
|
setupItemAspectsForestry();
|
||||||
|
if (ThaumicBees.getConfig().ExtraBeesInstalled)
|
||||||
|
{
|
||||||
|
setupItemAspectsExtraBees();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupItemAspectsThaumicBees()
|
||||||
|
{
|
||||||
|
ObjectTags tags;
|
||||||
|
ItemStack itemStack;
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.planksWood.blockID, -1, tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.wax.itemID, WaxType.MAGIC.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.drops.itemID, DropType.ENCHANTED.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.drops.itemID, DropType.INTELLECT.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.pollen.itemID, PollenType.UNUSUAL.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.TIME, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.pollen.itemID, PollenType.PHASED.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, -1, tags);
|
||||||
|
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.STARK.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.WIND, 3);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.AIR.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.FIRE, 3);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.FIRE.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.WATER, 3);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.WATER.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.EARTH, 3);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.EARTH.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.INFUSED.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.miscResources.itemID, ResourceType.LORE_FRAGMENT.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, -1, tags);
|
||||||
|
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OCCULT.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OTHERWORLDLY.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.STARK.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.INFUSED.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2).add(EnumTag.MOTION, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.AIRY.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2).add(EnumTag.POWER, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.FIREY.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2).add(EnumTag.COLD, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.WATERY.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.combs.itemID, -1).add(EnumTag.MAGIC, 2).add(EnumTag.ROCK, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.EARTHY.ordinal(), tags);
|
||||||
|
|
||||||
|
// Tagging capsules.
|
||||||
|
tags = new ObjectTags().add(EnumTag.VOID, 2).add(EnumTag.MAGIC, 2);
|
||||||
|
ThaumcraftApi.registerComplexObjectTag(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal())
|
||||||
|
.add(EnumTag.WATER, 8);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, LiquidType.WATER.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal())
|
||||||
|
.add(EnumTag.FIRE, 12).add(EnumTag.ROCK, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, LiquidType.LAVA.ordinal(), tags);
|
||||||
|
|
||||||
|
for (EnumTag tag : EnumTag.values())
|
||||||
|
{
|
||||||
|
if (tag == EnumTag.UNKNOWN)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
tags = new ObjectTags().add(tag, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(Config.solidFlux.itemID, tag.id, tags);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupItemAspectsForestry()
|
||||||
|
{
|
||||||
|
ObjectTags tags;
|
||||||
|
ItemStack itemStack;
|
||||||
|
|
||||||
|
itemStack = BlockInterface.getBlock("candle");
|
||||||
|
tags = new ObjectTags().add(EnumTag.LIGHT, 1).add(EnumTag.CONTROL, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = BlockInterface.getBlock("glass");
|
||||||
|
tags = new ObjectTags(Block.glass.blockID, 0);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
|
||||||
|
// Pulsating propolis
|
||||||
|
itemStack = ItemInterface.getItem("propolis");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.ELDRITCH, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Propolis.PULSATING.ordinal(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("pollen");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FLOWER, 1).add(EnumTag.PLANT, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Pollen.NORMAL.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(itemStack.itemID, ForestryHelper.Pollen.NORMAL.ordinal()).add(EnumTag.COLD, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Pollen.CRYSTALLINE.ordinal(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("craftingMaterial");
|
||||||
|
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.PULSATING_MESH.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.SILK_WISP.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 4).add(EnumTag.CLOTH, 5);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.WOVEN_SILK.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.COLD, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.ICE_SHARD.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.VALUABLE, 1).add(EnumTag.PLANT, 1).add(EnumTag.INSECT, 2)
|
||||||
|
.add(EnumTag.CONTROL, 2).add(EnumTag.WOOD, 5);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.SCENTED_PANELING.ordinal(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("beealyzer");
|
||||||
|
tags = new ObjectTags().add(EnumTag.VALUABLE, 3).add(EnumTag.MECHANISM, 3).add(EnumTag.METAL, 19)
|
||||||
|
.add(EnumTag.POWER, 8).add(EnumTag.TOOL, 18);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("treealyzer");
|
||||||
|
tags = new ObjectTags().add(EnumTag.POWER, 3).add(EnumTag.PURE, 3).add(EnumTag.LIFE, 6)
|
||||||
|
.add(EnumTag.TOOL, 12).add(EnumTag.METAL, 19);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("apatite");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CRYSTAL, 2).add(EnumTag.POWER, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("impregnatedCasing");
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 56).add(EnumTag.EXCHANGE, 8);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("stickImpregnated");
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 6).add(EnumTag.EXCHANGE, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("peat");
|
||||||
|
tags = new ObjectTags().add(EnumTag.POWER, 2).add(EnumTag.PLANT, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("ash");
|
||||||
|
tags = new ObjectTags().add(EnumTag.DESTRUCTION, 1).add(EnumTag.EXCHANGE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("honeyDrop");
|
||||||
|
tags = new ObjectTags().add(EnumTag.EXCHANGE, 2).add(EnumTag.LIFE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("honeydew");
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("royalJelly");
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.POWER, 1).add(EnumTag.VALUABLE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("honeyPot");
|
||||||
|
tags = new ObjectTags().add(EnumTag.LIFE, 2);
|
||||||
|
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("ambrosia");
|
||||||
|
tags = new ObjectTags().add(EnumTag.HEAL, 4);
|
||||||
|
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("beeswax");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("refractoryWax");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FIRE, 3);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("phosphor");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FIRE, 2).add(EnumTag.DESTRUCTION, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("waxCapsule");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("waxCapsuleWater");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("refractoryEmpty");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("refractoryWater");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("refractoryLava");
|
||||||
|
tags = new ObjectTags().add(EnumTag.VOID, 1).add(EnumTag.FIRE, 7).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("canEmpty");
|
||||||
|
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("canWater");
|
||||||
|
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("canLava");
|
||||||
|
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.FIRE, 6).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("beeComb");
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.FIRE, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.SIMMERING.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.COLD, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.FROZEN.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.CROP, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.WHEATEN.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.FUNGUS, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.MOSSY.ordinal(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("ambrosia");
|
||||||
|
tags = new ObjectTags().add(EnumTag.LIFE, 2).add(EnumTag.HEAL, 4);
|
||||||
|
|
||||||
|
// Forestry's wood
|
||||||
|
itemStack = BlockInterface.getBlock("log1");
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 8);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
itemStack = BlockInterface.getBlock("log2"); // Same tags
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
itemStack = BlockInterface.getBlock("log3"); // Same tags.
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
itemStack = BlockInterface.getBlock("log4"); // Still same tags.
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("sapling");
|
||||||
|
tags = new ObjectTags().add(EnumTag.PLANT, 4).add(EnumTag.WOOD, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
|
||||||
|
// BEES!
|
||||||
|
itemStack = ItemInterface.getItem("beeDroneGE");
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.FLIGHT, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // All drones
|
||||||
|
|
||||||
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.VALUABLE, 4); // Get drone tags & add valuable
|
||||||
|
itemStack = ItemInterface.getItem("beePrincessGE");
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // All princesses.
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.VALUABLE, 8).add(EnumTag.INSECT, 2).add(EnumTag.FLIGHT, 4);
|
||||||
|
itemStack = ItemInterface.getItem("beeQueenGE");
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); //All queens.
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("circuitboards");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CRYSTAL, 2).add(EnumTag.METAL, 5).add(EnumTag.MECHANISM, 10)
|
||||||
|
.add(EnumTag.POWER, 10);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.BASIC.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 14)
|
||||||
|
.add(EnumTag.CONTROL, 2).add(EnumTag.EXCHANGE, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.ENHANCED.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 14);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.REFINED.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 19)
|
||||||
|
.add(EnumTag.VALUABLE, 10);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.INTRICATE.ordinal(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("tubes");
|
||||||
|
tags = new ObjectTags(ItemInterface.getItem("ingotCopper").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
//ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.COPPER.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(ItemInterface.getItem("ingotTin").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
//ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.TIN.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(ItemInterface.getItem("ingotBronze").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
//ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.BRONZE.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Item.ingotIron.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.IRON.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Item.ingotGold.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.GOLD.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Item.diamond.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.DIAMOND.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Block.obsidian.blockID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.OBSIDIAN.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Item.blazePowder.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.BLAZE.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.MOTION, 2).add(EnumTag.CONTROL, 2).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.RUBBER.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Item.emerald.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.EMERALD.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(ItemInterface.getItem("apatite").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.APATITE.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(Item.dyePowder.itemID, 4).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.LAPIS.ordinal(), tags);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupItemAspectsExtraBees()
|
||||||
|
{
|
||||||
|
ItemStack itemStack;
|
||||||
|
ObjectTags tags;
|
||||||
|
|
||||||
|
try // One try block suffices. If we can't get one item, it's probably safe to assume we can't get any others.
|
||||||
|
{
|
||||||
|
itemStack = getExtraBeeItem("comb");
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.POWER, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.OIL.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.COAL.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.FUEL.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.ALCOHOL.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.REDSTONE.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.URANIUM.ordinal(), tags);
|
||||||
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.POISON, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, ExtraBeesHelper.CombType.VENOMOUS.ordinal(), tags);
|
||||||
|
|
||||||
|
itemStack = getExtraBeeItem("propolis");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
|
||||||
|
itemStack = getExtraBeeItem("honeyDrop");
|
||||||
|
tags = new ObjectTags().add(EnumTag.EXCHANGE, 2).add(EnumTag.LIFE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
|
||||||
|
}
|
||||||
|
catch (NullPointerException e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupItemAspectsOreDict()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupResearch()
|
||||||
|
{
|
||||||
|
ObjectTags tags;
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 10).add(EnumTag.PLANT, 10).add(EnumTag.INSECT, 10);
|
||||||
|
ResearchItem startNode = new ResearchItem("TBSTARTNODE", tags, 10, 1, Config.miscResources.getStackForType(ResourceType.RESEARCH_StartNode))
|
||||||
|
.setParents(ResearchList.getResearch("UTFT"))
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 9).add(EnumTag.MAGIC, 4).add(EnumTag.FLUX, 4);
|
||||||
|
ResearchItem starkHint = new ResearchItem("STARKHINT", tags, 5, 2, ItemInterface.getItem("beeQueenGE"))
|
||||||
|
.setParents(startNode)
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 15).add(EnumTag.MAGIC, 5).add(EnumTag.WATER, 5).add(EnumTag.EARTH, 5)
|
||||||
|
.add(EnumTag.WIND, 5).add(EnumTag.FIRE, 5);
|
||||||
|
ResearchItem beeInfusion = new ResearchItem("BEEINFUSION", tags, 5, 3, Config.miscResources.getStackForType(ResourceType.RESEARCH_BeeInfusion))
|
||||||
|
.setParents(starkHint).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.CROP, 20).add(EnumTag.EARTH, 20).add(EnumTag.WATER, 5);
|
||||||
|
ResearchItem fertilizer = new ResearchItem("FERTILIZER", tags, 16, 0, ItemInterface.getItem("apatite"))
|
||||||
|
.setParents(startNode)
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.TOOL, 6).add(EnumTag.INSECT, 15).add(EnumTag.BEAST, 2)
|
||||||
|
.add(EnumTag.MAGIC, 5);
|
||||||
|
ResearchItem magicFrame = new ResearchItem("HIVEFRAME", tags, 10, -2, Config.hiveFrameMagic)
|
||||||
|
.setParents(startNode)
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6)
|
||||||
|
.add(EnumTag.MAGIC, 8);
|
||||||
|
ResearchItem magicFrame2 = new ResearchItem("HIVEFRAME2", tags, 8, -2, Config.hiveFrameResilient)
|
||||||
|
.setParents(magicFrame).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 5).add(EnumTag.EXCHANGE, 6)
|
||||||
|
.add(EnumTag.HEAL, 2).add(EnumTag.FLOWER, 6);
|
||||||
|
ResearchItem gentleFrame = new ResearchItem("HIVEFRAMEGENTLE", tags, 12, -2, Config.hiveFrameGentle)
|
||||||
|
.setParents(magicFrame).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 6).add(EnumTag.EXCHANGE, 8)
|
||||||
|
.add(EnumTag.MAGIC, 8).add(EnumTag.MOTION, 4).add(EnumTag.FLESH, 4);
|
||||||
|
ResearchItem metabolicFrame = new ResearchItem("HIVEFRAMEMETA", tags, 9, -3, Config.hiveFrameMetabolic)
|
||||||
|
.setParents(magicFrame).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.DEATH, 15).add(EnumTag.EXCHANGE, 6)
|
||||||
|
.add(EnumTag.MAGIC, 8).add(EnumTag.POISON, 6);
|
||||||
|
ResearchItem necroticFrame = new ResearchItem("HIVEFRAMENECRO", tags, 11, -3, Config.hiveFrameNecrotic)
|
||||||
|
.setParents(magicFrame).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.TIME, 4);
|
||||||
|
ResearchItem temporalFrame = new ResearchItem("HIVEFRAMETIME", tags, 9, -5, Config.hiveFrameTemporal)
|
||||||
|
.setParents(magicFrame).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.VOID, 15).add(EnumTag.CRYSTAL, 8).add(EnumTag.ELDRITCH, 8).add(EnumTag.EXCHANGE, 15);
|
||||||
|
ResearchItem voidCapsule = new ResearchItem("VOIDCAPSULE", tags, 10, 9, Config.voidCapsule)
|
||||||
|
.setParents(startNode, ResearchList.getResearch("PORTABLEHOLE")).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 8).add(EnumTag.INSECT, 10).add(EnumTag.TOOL, 6).add(EnumTag.MAGIC, 6);
|
||||||
|
ResearchItem scoop = new ResearchItem("THAUMIUMSCOOP", tags, 0, -3, Config.thaumiumScoop)
|
||||||
|
.setParents(ResearchList.getResearch("THAUMIUM"))
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 16).add(EnumTag.PLANT, 20).add(EnumTag.TOOL, 6).add(EnumTag.MAGIC, 6);
|
||||||
|
ResearchItem grafter = new ResearchItem("THAUMIUMGRAFTER", tags, 0, -4, Config.thaumiumGrafter)
|
||||||
|
.setParents(scoop)
|
||||||
|
.registerResearchItem();
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerResearch()
|
||||||
|
{
|
||||||
|
ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "research.xml");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,453 @@
|
|||||||
|
package thaumicbees.main.utils;
|
||||||
|
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.bees.Allele;
|
||||||
|
import thaumicbees.bees.BeeGenomeManager;
|
||||||
|
import thaumicbees.bees.BeeSpecies;
|
||||||
|
import thaumicbees.item.ItemCapsule;
|
||||||
|
import thaumicbees.item.types.CombType;
|
||||||
|
import thaumicbees.item.types.DropType;
|
||||||
|
import thaumicbees.item.types.HiveFrameType;
|
||||||
|
import thaumicbees.item.types.LiquidType;
|
||||||
|
import thaumicbees.item.types.PlankType;
|
||||||
|
import thaumicbees.item.types.PropolisType;
|
||||||
|
import thaumicbees.item.types.ResourceType;
|
||||||
|
import thaumicbees.item.types.WaxType;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
import thaumicbees.main.utils.compat.ShapelessBeeInfusionCraftingRecipe;
|
||||||
|
import thaumicbees.main.utils.compat.ThaumcraftHelper;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import forestry.api.apiculture.BeeManager;
|
||||||
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
|
import forestry.api.core.BlockInterface;
|
||||||
|
import forestry.api.core.ItemInterface;
|
||||||
|
import forestry.api.recipes.RecipeManagers;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.liquids.LiquidContainerData;
|
||||||
|
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||||
|
import net.minecraftforge.liquids.LiquidDictionary;
|
||||||
|
import net.minecraftforge.liquids.LiquidStack;
|
||||||
|
|
||||||
|
public class CraftingManager
|
||||||
|
{
|
||||||
|
public static void setupCrafting()
|
||||||
|
{
|
||||||
|
// Broken up into seperate sections to make things a bit easier to find.
|
||||||
|
setupVanillaCrafting();
|
||||||
|
setupCentrifugeRecipes();
|
||||||
|
setupSqueezerRecipes();
|
||||||
|
setupCarpenterRecipes();
|
||||||
|
setupThaumcraftCrafting();
|
||||||
|
|
||||||
|
registerLiquidContainer(Config.magicCapsule);
|
||||||
|
registerLiquidContainer(Config.voidCapsule);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupVanillaCrafting()
|
||||||
|
{
|
||||||
|
ItemStack input;
|
||||||
|
ItemStack output;
|
||||||
|
|
||||||
|
// Slabs
|
||||||
|
for (int i = 0; i < PlankType.values().length; ++i)
|
||||||
|
{
|
||||||
|
input = new ItemStack(Config.planksWood, 1, i);
|
||||||
|
output = new ItemStack(Config.slabWoodHalf, 6, i);
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"PPP",
|
||||||
|
'P', input
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// Essentia bottles
|
||||||
|
output = new ItemStack(Config.tcEssentiaBottle);
|
||||||
|
output.stackSize = 8;
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
" C ", "GPG", "PGP",
|
||||||
|
'G', Config.wax,
|
||||||
|
'C', Item.clay,
|
||||||
|
'P', Block.thinGlass
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.tcEssentiaBottle);
|
||||||
|
output.stackSize = 4;
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
" W ", "W W", " W ",
|
||||||
|
'W', Config.wax
|
||||||
|
});
|
||||||
|
|
||||||
|
// Magic capsules
|
||||||
|
output = new ItemStack(Config.magicCapsule); output.stackSize = 4;
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"WWW",
|
||||||
|
'W', Config.wax.getStackForType(WaxType.MAGIC)
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.KNOWLEDGE_FRAGMENT.ordinal());
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"FF", "FF",
|
||||||
|
'F', Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT)
|
||||||
|
});
|
||||||
|
|
||||||
|
// T1 Thaumaturge's backpack
|
||||||
|
GameRegistry.addRecipe(new ItemStack(Config.thaumaturgeBackpackT1), new Object[] {
|
||||||
|
"SWS", "NCN", "SWS",
|
||||||
|
'S', Item.silk,
|
||||||
|
'W', Block.cloth,
|
||||||
|
'N', new ItemStack(Config.tcMiscResource.itemID, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()),
|
||||||
|
'C', Block.chest
|
||||||
|
});
|
||||||
|
|
||||||
|
// Concentrated Fertilizer -> Forestry fertilizer
|
||||||
|
input = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
|
||||||
|
output = ItemInterface.getItem("fertilizerCompound");
|
||||||
|
output.stackSize = 6;
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
" S ", " F ", " S ",
|
||||||
|
'F', input,
|
||||||
|
'S', Block.sand
|
||||||
|
});
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
" ", "SFS", " ",
|
||||||
|
'F', input,
|
||||||
|
'S', Block.sand
|
||||||
|
});
|
||||||
|
|
||||||
|
output = output.copy();
|
||||||
|
output.stackSize = 12;
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"aaa", "aFa", "aaa",
|
||||||
|
'F', input,
|
||||||
|
'a', ItemInterface.getItem("ash")
|
||||||
|
});
|
||||||
|
|
||||||
|
// "bottling" Intellect drops
|
||||||
|
GameRegistry.addRecipe(new ItemStack(Item.expBottle), new Object[] {
|
||||||
|
"DDD", "DBD", "DDD",
|
||||||
|
'D', Config.drops.getStackForType(DropType.INTELLECT),
|
||||||
|
'B', Item.glassBottle
|
||||||
|
});
|
||||||
|
|
||||||
|
// "bottling" Crystal aspects.
|
||||||
|
for (EnumTag tag : EnumTag.values())
|
||||||
|
{
|
||||||
|
if (tag != EnumTag.UNKNOWN)
|
||||||
|
{
|
||||||
|
output = new ItemStack(Config.tcEssentiaBottle, 1, tag.id + 1);
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"ccc", "cxc", "ccc",
|
||||||
|
'c', new ItemStack(Config.solidFlux, 1, tag.id),
|
||||||
|
'x', Config.tcEssentiaBottle
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupCentrifugeRecipes()
|
||||||
|
{
|
||||||
|
// 20 is the 'average' time to centrifuge a comb.
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.OCCULT),
|
||||||
|
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||||
|
new int[] { 100, 60 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.OTHERWORLDLY),
|
||||||
|
new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||||
|
new int[] { 50, 20, 100 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.PAPERY),
|
||||||
|
new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
|
||||||
|
new int[] { 80, 20, 5 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.STARK),
|
||||||
|
new ItemStack[] {ItemInterface.getItem("beeswax"), Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.STARK) },
|
||||||
|
new int[] { 10, 95, 15 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.AIRY),
|
||||||
|
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.AIR) },
|
||||||
|
new int[] { 100, 65 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.FIREY),
|
||||||
|
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.FIRE) },
|
||||||
|
new int[] { 100, 65 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.WATERY),
|
||||||
|
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.WATER)},
|
||||||
|
new int[] { 100, 65 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.EARTHY),
|
||||||
|
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.EARTH) },
|
||||||
|
new int[] { 100, 65 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(25, Config.combs.getStackForType(CombType.INFUSED),
|
||||||
|
new ItemStack[] {Config.wax.getStackForType(WaxType.MAGIC), Config.wax.getStackForType(WaxType.MAGIC), Config.propolis.getStackForType(PropolisType.INFUSED) },
|
||||||
|
new int[] { 100, 50, 65 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.INTELLECT),
|
||||||
|
new ItemStack[] { Config.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeydew"), Config.drops.getStackForType(DropType.INTELLECT) },
|
||||||
|
new int[] { 90, 40, 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(20, Config.combs.getStackForType(CombType.SKULKING),
|
||||||
|
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemInterface.getItem("propolis"), ItemInterface.getItem("honeydew") },
|
||||||
|
new int[] { 90, 20, 35 });
|
||||||
|
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.STARK),
|
||||||
|
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.DULL.ordinal())},
|
||||||
|
new int[] { 13 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.AIR),
|
||||||
|
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.FIRE),
|
||||||
|
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.WATER),
|
||||||
|
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.EARTH),
|
||||||
|
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, Config.propolis.getStackForType(PropolisType.INFUSED),
|
||||||
|
new ItemStack[] {new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupSqueezerRecipes()
|
||||||
|
{
|
||||||
|
// Squeezer recipes
|
||||||
|
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {Config.propolis.getStackForType(PropolisType.FIRE) },
|
||||||
|
new LiquidStack(Block.lavaStill, 250),
|
||||||
|
new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()), 18);
|
||||||
|
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {Config.propolis.getStackForType(PropolisType.WATER) },
|
||||||
|
new LiquidStack(Block.waterStill, 500),
|
||||||
|
new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()), 18);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupCarpenterRecipes()
|
||||||
|
{
|
||||||
|
ItemStack input;
|
||||||
|
ItemStack output;
|
||||||
|
|
||||||
|
// Carpenter recipes
|
||||||
|
input = ItemInterface.getItem("craftingMaterial");
|
||||||
|
input.setItemDamage(3); // Set to Silk Mesh
|
||||||
|
output = new ItemStack(Config.thaumaturgeBackpackT2);
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(200, new LiquidStack(Block.waterStill.blockID, 1000), null, output, new Object[] {
|
||||||
|
"WXW", "WTW", "WWW",
|
||||||
|
'X', Item.diamond,
|
||||||
|
'W', input,
|
||||||
|
'T', new ItemStack(Config.thaumaturgeBackpackT1)
|
||||||
|
});
|
||||||
|
|
||||||
|
output = BlockInterface.getBlock("candle");
|
||||||
|
output.stackSize = 24;
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||||
|
" S ", "WWW", "WWW",
|
||||||
|
'W', Config.wax,
|
||||||
|
'S', Item.silk
|
||||||
|
});
|
||||||
|
|
||||||
|
output = BlockInterface.getBlock("candle");
|
||||||
|
output.stackSize = 6;
|
||||||
|
input = ItemInterface.getItem("craftingMaterial");
|
||||||
|
input.setItemDamage(2); // Set to Silk Wisp
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||||
|
"WSW",
|
||||||
|
'W', Config.wax,
|
||||||
|
'S', input
|
||||||
|
});
|
||||||
|
|
||||||
|
output = Config.miscResources.getStackForType(ResourceType.AROMATIC_LUMP, 2);
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||||
|
" P ", "JDJ", " P ",
|
||||||
|
'P', ItemInterface.getItem("pollen"),
|
||||||
|
'J', ItemInterface.getItem("royalJelly"),
|
||||||
|
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||||
|
});
|
||||||
|
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||||
|
" J ", "PDP", " J ",
|
||||||
|
'P', ItemInterface.getItem("pollen"),
|
||||||
|
'J', ItemInterface.getItem("royalJelly"),
|
||||||
|
'D', Config.drops.getStackForType(DropType.ENCHANTED)
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.planksWood, 4, 0);
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(8, new LiquidStack(Block.waterStill, 500), null, output, new Object[] {
|
||||||
|
"B",
|
||||||
|
'B', new ItemStack(Config.tcLog, 1, 0)
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.planksWood, 6, 1);
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(8, new LiquidStack(Block.waterStill, 500), null, output, new Object[] {
|
||||||
|
"B",
|
||||||
|
'B', new ItemStack(Config.tcLog, 1, 1)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void setupThaumcraftCrafting()
|
||||||
|
{
|
||||||
|
ItemStack input;
|
||||||
|
ItemStack output;
|
||||||
|
|
||||||
|
ThaumcraftApi.addArcaneCraftingRecipe("THAUMIUMSCOOP", "THAUMIUMSCOOP", 45, new ItemStack(Config.thaumiumScoop), new Object[] {
|
||||||
|
"sWs", "sTs", " T ",
|
||||||
|
's', Item.stick,
|
||||||
|
'W', Block.cloth,
|
||||||
|
'T', new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.THAUMIUM.ordinal())
|
||||||
|
});
|
||||||
|
|
||||||
|
ThaumcraftApi.addArcaneCraftingRecipe("THAUMIUMGRAFTER", "THAUMIUMGRAFTER", 160, new ItemStack(Config.thaumiumGrafter), new Object[] {
|
||||||
|
" T", " T ", "s ",
|
||||||
|
's', Item.stick,
|
||||||
|
'T', new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.THAUMIUM.ordinal())
|
||||||
|
});
|
||||||
|
|
||||||
|
output = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
|
||||||
|
input = ItemInterface.getItem("apatite");
|
||||||
|
ObjectTags tags = (new ObjectTags()).add(EnumTag.CROP, 12);
|
||||||
|
output.stackSize = 2;
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("FERTILIZER", "FERTILIZER", 5, tags, output, new Object[] {
|
||||||
|
input
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.hiveFrameMagic);
|
||||||
|
input = ItemInterface.getItem("frameUntreated");
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8);
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAME", "FRAMEMAGIC", 50, tags, output, new Object[] {
|
||||||
|
input
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.hiveFrameResilient);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 12).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12);
|
||||||
|
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAME2", "FRAMERESILIENT", 50, tags, output, new Object[] {
|
||||||
|
" i ", "ifi", " i ",
|
||||||
|
'f', Config.hiveFrameMagic,
|
||||||
|
'i', Item.ingotIron
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.hiveFrameGentle);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.HEAL, 12);
|
||||||
|
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMEGENTLE", "FRAMEGENTLE", 50, tags, output, new Object[] {
|
||||||
|
"www", "wFw", "www",
|
||||||
|
'F', input,
|
||||||
|
'w', ItemInterface.getItem("beeswax")
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.hiveFrameMetabolic);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.LIFE, 8).add(EnumTag.MOTION, 8)
|
||||||
|
.add(EnumTag.EXCHANGE, 8);
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAMEMETA", "FRAMEMETABOLIC", 50, tags, output, new Object[] {
|
||||||
|
Item.magmaCream,
|
||||||
|
input
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.hiveFrameNecrotic);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12).add(EnumTag.DEATH, 16)
|
||||||
|
.add(EnumTag.POISON, 1);
|
||||||
|
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMENECRO", "FRAMENECROTIC", 50, tags, output, new Object[] {
|
||||||
|
" S ", "SxS", " S ",
|
||||||
|
'S', Item.rottenFlesh,
|
||||||
|
'x', input
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(Config.hiveFrameTemporal);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.TIME, 2);
|
||||||
|
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMETIME", "FRAMETIME", 50, tags, output, new Object[] {
|
||||||
|
"tSt", "SFS", "tSt",
|
||||||
|
't', Item.stick,
|
||||||
|
'S', Block.sand,
|
||||||
|
'F', input
|
||||||
|
});
|
||||||
|
|
||||||
|
output = Config.voidCapsule.getCapsuleForLiquid(LiquidType.EMPTY);
|
||||||
|
output.stackSize = 4;
|
||||||
|
tags = new ObjectTags().add(EnumTag.VOID, 16).add(EnumTag.ELDRITCH, 4).add(EnumTag.EXCHANGE, 8);
|
||||||
|
ThaumcraftApi.addInfusionCraftingRecipe("VOIDCAPSULE", "VOIDCAPSULE", 10, tags, output, new Object[] {
|
||||||
|
" G ", "GPG", "TGT",
|
||||||
|
'G', Block.thinGlass,
|
||||||
|
'P', Item.enderPearl,
|
||||||
|
'T', Item.ingotIron
|
||||||
|
});
|
||||||
|
|
||||||
|
ItemStack drone = BeeGenomeManager.getBeeNBTForSpecies(BeeSpecies.STARK, EnumBeeType.DRONE);
|
||||||
|
ItemStack princess = BeeGenomeManager.getBeeNBTForSpecies(BeeSpecies.STARK, EnumBeeType.PRINCESS);
|
||||||
|
|
||||||
|
String researchKey = "BEEINFUSION";
|
||||||
|
|
||||||
|
tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 24);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION1", BeeSpecies.AIR.getBeeItem(EnumBeeType.DRONE),
|
||||||
|
new ItemStack[] { drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal())},
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION2", BeeSpecies.AIR.getBeeItem(EnumBeeType.PRINCESS),
|
||||||
|
new ItemStack[] { princess , new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
|
||||||
|
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 24);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION3", BeeSpecies.FIRE.getBeeItem(EnumBeeType.DRONE), new Object[]
|
||||||
|
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION4", BeeSpecies.FIRE.getBeeItem(EnumBeeType.PRINCESS), new Object[]
|
||||||
|
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
|
||||||
|
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 24);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION5", BeeSpecies.WATER.getBeeItem(EnumBeeType.DRONE), new Object[]
|
||||||
|
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION6", BeeSpecies.WATER.getBeeItem(EnumBeeType.PRINCESS), new Object[]
|
||||||
|
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
|
||||||
|
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 24);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION7", BeeSpecies.EARTH.getBeeItem(EnumBeeType.DRONE), new Object[]
|
||||||
|
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION8", BeeSpecies.EARTH.getBeeItem(EnumBeeType.PRINCESS), new Object[]
|
||||||
|
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 40).add(EnumTag.FLUX, 24);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION9", BeeSpecies.INFUSED.getBeeItem(EnumBeeType.DRONE), new Object[]
|
||||||
|
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION0", BeeSpecies.INFUSED.getBeeItem(EnumBeeType.PRINCESS), new Object[]
|
||||||
|
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
|
||||||
|
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void registerLiquidContainer(ItemCapsule baseCapsule)
|
||||||
|
{
|
||||||
|
ItemStack empty = new ItemStack(baseCapsule, 1, 0);
|
||||||
|
ItemStack filled;
|
||||||
|
LiquidStack liquid = null;
|
||||||
|
|
||||||
|
for (LiquidType liquidType : LiquidType.values())
|
||||||
|
{
|
||||||
|
switch (liquidType)
|
||||||
|
{
|
||||||
|
case EMPTY:
|
||||||
|
liquid = null;
|
||||||
|
break;
|
||||||
|
case WATER:
|
||||||
|
liquid = new LiquidStack(Block.waterStill, baseCapsule.getType().capacity);
|
||||||
|
break;
|
||||||
|
case LAVA:
|
||||||
|
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
liquid = LiquidDictionary.getLiquid(liquidType.liquidID, baseCapsule.getType().capacity);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (liquid != null)
|
||||||
|
{
|
||||||
|
filled = new ItemStack(baseCapsule, 1, liquidType.ordinal());
|
||||||
|
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
||||||
|
|
||||||
|
// Register with Squeezer/Bottler
|
||||||
|
RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled);
|
||||||
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] {filled} , liquid,
|
||||||
|
Config.wax.getStackForType(WaxType.MAGIC), 20);
|
||||||
|
liquidType.available = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Empty will be set to unavailable. Obviously, it always is.
|
||||||
|
LiquidType.EMPTY.available = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package thaumicbees.main.utils;
|
||||||
|
|
||||||
|
import net.minecraft.util.StringTranslate;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public class LocalizationManager
|
||||||
|
{
|
||||||
|
private enum Locale
|
||||||
|
{
|
||||||
|
en_US("en_US"),
|
||||||
|
;
|
||||||
|
public String locale;
|
||||||
|
|
||||||
|
private Locale(String loc)
|
||||||
|
{
|
||||||
|
this.locale = loc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupLocalizationInfo()
|
||||||
|
{
|
||||||
|
for (Locale l : Locale.values())
|
||||||
|
{
|
||||||
|
LanguageRegistry.instance().loadLocalization(CommonProxy.TCBEES_LOCDIR + l.locale + ".xml", l.locale, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String getLocalizedString(String key)
|
||||||
|
{
|
||||||
|
String result = LanguageRegistry.instance().getStringLocalization(key);
|
||||||
|
if (result.isEmpty())
|
||||||
|
{
|
||||||
|
result = LanguageRegistry.instance().getStringLocalization(key, "en_US");
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package thaumicbees.main.utils;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to abstract the moon phase from the world time a bit.
|
||||||
|
*/
|
||||||
|
public enum MoonPhase
|
||||||
|
{
|
||||||
|
FULL("full"),
|
||||||
|
WANING_GIBBOUS("gibbousWaning"),
|
||||||
|
WANING_HALF("halfWaning"),
|
||||||
|
WANING_CRESCENT("crescentWaning"),
|
||||||
|
NEW("new"),
|
||||||
|
WAXING_CRESCENT("crecentWaxing"),
|
||||||
|
WAXING_HALF("halfWaxing"),
|
||||||
|
WAXING_GIBBOUS("gibbousWaxing");
|
||||||
|
|
||||||
|
private String phaseName;
|
||||||
|
private MoonPhase(String name)
|
||||||
|
{
|
||||||
|
this.phaseName = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBetween(MoonPhase first, MoonPhase second)
|
||||||
|
{
|
||||||
|
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 String getName()
|
||||||
|
{
|
||||||
|
return LocalizationManager.getLocalizedString("tb.moon." + this.phaseName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MoonPhase getMoonPhase(World w)
|
||||||
|
{
|
||||||
|
return MoonPhase.values()[(int)((w.getWorldTime() - 0) / 24000L) % 8];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,102 @@
|
|||||||
|
package thaumicbees.main.utils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.EnumSet;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import cpw.mods.fml.common.IScheduledTickHandler;
|
||||||
|
import cpw.mods.fml.common.TickType;
|
||||||
|
|
||||||
|
public class TickHandlerVersion implements IScheduledTickHandler
|
||||||
|
{
|
||||||
|
|
||||||
|
public static TickHandlerVersion instance = new TickHandlerVersion();
|
||||||
|
|
||||||
|
private static ArrayList<VersionInfo> modVersionInfo = new ArrayList();
|
||||||
|
private static boolean initialized;
|
||||||
|
private static boolean sent;
|
||||||
|
private static int modIndex = 0;
|
||||||
|
|
||||||
|
public static boolean initialize()
|
||||||
|
{
|
||||||
|
if (initialized)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
initialized = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isInitialized()
|
||||||
|
{
|
||||||
|
return initialized;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean registerModVersionInfo(VersionInfo info)
|
||||||
|
{
|
||||||
|
if (modVersionInfo.contains(info))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
modVersionInfo.add(info);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tickStart(EnumSet<TickType> type, Object... tickData)
|
||||||
|
{
|
||||||
|
if (sent)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (modIndex < modVersionInfo.size())
|
||||||
|
{
|
||||||
|
VersionInfo anInfo = modVersionInfo.get(modIndex);
|
||||||
|
|
||||||
|
if (anInfo.isNewVersionAvailable())
|
||||||
|
{
|
||||||
|
EntityPlayer player = (EntityPlayer) tickData[0];
|
||||||
|
player.sendChatToPlayer("[" + anInfo.modName + "] A new version is available: " + anInfo.getLatestVersion());
|
||||||
|
player.sendChatToPlayer(anInfo.getVersionDescription());
|
||||||
|
}
|
||||||
|
modIndex += 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sent = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tickEnd(EnumSet<TickType> type, Object... tickData)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public EnumSet<TickType> ticks()
|
||||||
|
{
|
||||||
|
if (TickHandlerVersion.sent)
|
||||||
|
{
|
||||||
|
return EnumSet.noneOf(TickType.class);
|
||||||
|
}
|
||||||
|
return EnumSet.of(TickType.PLAYER);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getLabel()
|
||||||
|
{
|
||||||
|
return "thaumicbees.version";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int nextTickSpacing()
|
||||||
|
{
|
||||||
|
if (!sent)
|
||||||
|
{
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
return 72000;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,246 @@
|
|||||||
|
package thaumicbees.main.utils;
|
||||||
|
|
||||||
|
import java.io.BufferedReader;
|
||||||
|
import java.io.InputStreamReader;
|
||||||
|
import java.net.HttpURLConnection;
|
||||||
|
import java.net.URL;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
import java.util.logging.Logger;
|
||||||
|
|
||||||
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
import cpw.mods.fml.common.registry.TickRegistry;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Using some of the VersionInfo code from cofh. (Thanks, Lemming!)
|
||||||
|
* @author MysteriousAges
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class VersionInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
public static final String Version = "@MODVERSION@";
|
||||||
|
public static final String MCVersion = "@MCVERSION@";
|
||||||
|
public static final String Build = "@BUILD_NUMBER@";
|
||||||
|
public static final String VersionURL = "http://bit.ly/thaumicbeeversion";
|
||||||
|
|
||||||
|
public static final String Logo = "/gfx/thaumicbees/logo.png";
|
||||||
|
|
||||||
|
public static final String Depends = "required-after:Forestry;required-after:Thaumcraft@[3.0.3,);after:ExtraBees";
|
||||||
|
|
||||||
|
boolean criticalUpdate;
|
||||||
|
boolean newVersion;
|
||||||
|
boolean newMinecraftVersion;
|
||||||
|
boolean versionCheckComplete;
|
||||||
|
|
||||||
|
String latestModVersion;
|
||||||
|
String latestMCVersion = MCVersion;
|
||||||
|
String description = "";
|
||||||
|
|
||||||
|
String modName;
|
||||||
|
String modVersion;
|
||||||
|
String releaseURL;
|
||||||
|
Logger modLogger = FMLLog.getLogger();
|
||||||
|
|
||||||
|
public static int[] parseVersion(String rawVersion)
|
||||||
|
{
|
||||||
|
ArrayList<Integer> versionTokens = new ArrayList<Integer>();
|
||||||
|
String[] tokens = rawVersion.trim().split("\\.");
|
||||||
|
|
||||||
|
for (int i = 0; i < tokens.length; ++i)
|
||||||
|
{
|
||||||
|
if (tokens[i].matches("[0-9]+[a-z]"))
|
||||||
|
{
|
||||||
|
String numberString = tokens[i].substring(0, tokens[i].length()-1);
|
||||||
|
versionTokens.add(Integer.valueOf(numberString));
|
||||||
|
versionTokens.add(Character.getNumericValue(tokens[i].charAt(tokens[i].length()-1)));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
versionTokens.add(Integer.valueOf(tokens[i]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int[] value = new int[versionTokens.size()];
|
||||||
|
for (int i = 0; i < value.length; ++i)
|
||||||
|
{
|
||||||
|
value[i] = versionTokens.get(i).intValue();
|
||||||
|
}
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* VERSION COMPARISON */
|
||||||
|
public static boolean beforeTargetVersion(String version, String target)
|
||||||
|
{
|
||||||
|
boolean result = false;
|
||||||
|
int[] versionTokens = parseVersion(version);
|
||||||
|
int[] targetTokens = parseVersion(target);
|
||||||
|
|
||||||
|
for (int i = 0; i < versionTokens.length; ++i)
|
||||||
|
{
|
||||||
|
if (versionTokens[i] < targetTokens[i])
|
||||||
|
{
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
else if (versionTokens[i] > targetTokens[i])
|
||||||
|
{
|
||||||
|
result = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean afterTargetVersion(String version, String target)
|
||||||
|
{
|
||||||
|
boolean result = false;
|
||||||
|
int[] versionTokens = parseVersion(version);
|
||||||
|
int[] targetTokens = parseVersion(target);
|
||||||
|
|
||||||
|
for (int i = 0; i < versionTokens.length; ++i)
|
||||||
|
{
|
||||||
|
if (versionTokens[i] > targetTokens[i])
|
||||||
|
{
|
||||||
|
result = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VersionInfo(String name, String version, String url)
|
||||||
|
{
|
||||||
|
modName = name;
|
||||||
|
modVersion = latestModVersion = version;
|
||||||
|
releaseURL = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public VersionInfo(String name, String version, String url, Logger logger)
|
||||||
|
{
|
||||||
|
modName = name;
|
||||||
|
modVersion = latestModVersion = version;
|
||||||
|
releaseURL = url;
|
||||||
|
modLogger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void checkForNewVersion()
|
||||||
|
{
|
||||||
|
Thread versionCheckThread = new VersionCheckThread();
|
||||||
|
versionCheckThread.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCurrentVersion()
|
||||||
|
{
|
||||||
|
return modVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLatestVersion()
|
||||||
|
{
|
||||||
|
return latestModVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLatestMCVersion()
|
||||||
|
{
|
||||||
|
return latestMCVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersionDescription()
|
||||||
|
{
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isCriticalUpdate()
|
||||||
|
{
|
||||||
|
return criticalUpdate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isNewVersionAvailable()
|
||||||
|
{
|
||||||
|
return newVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isMinecraftOutdated()
|
||||||
|
{
|
||||||
|
return newMinecraftVersion;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isVersionCheckComplete()
|
||||||
|
{
|
||||||
|
return versionCheckComplete;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* VERSION CHECK THREAD CLASS */
|
||||||
|
private class VersionCheckThread extends Thread
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public void run()
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
String location = VersionURL;
|
||||||
|
|
||||||
|
HttpURLConnection connection = null;
|
||||||
|
|
||||||
|
// Used to "dereference" any location headers we may get.
|
||||||
|
while (location != null && !location.isEmpty())
|
||||||
|
{
|
||||||
|
URL url = new URL(location);
|
||||||
|
connection = (HttpURLConnection) url.openConnection();
|
||||||
|
connection.setRequestProperty("User-Agent",
|
||||||
|
"Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.60 Safari/537.17");
|
||||||
|
connection.connect();
|
||||||
|
location = connection.getHeaderField("Location");
|
||||||
|
}
|
||||||
|
|
||||||
|
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()));
|
||||||
|
latestModVersion = reader.readLine();
|
||||||
|
criticalUpdate = Boolean.parseBoolean(reader.readLine());
|
||||||
|
latestMCVersion = reader.readLine();
|
||||||
|
description = reader.readLine();
|
||||||
|
reader.close();
|
||||||
|
|
||||||
|
if (beforeTargetVersion(modVersion, latestModVersion))
|
||||||
|
{
|
||||||
|
modLogger.log(Level.INFO, "An updated version of " + modName + " is available: " + latestModVersion + ".");
|
||||||
|
newVersion = true;
|
||||||
|
if (criticalUpdate)
|
||||||
|
{
|
||||||
|
modLogger.log(Level.INFO, "This update has been marked as CRITICAL and will ignore notification suppression.");
|
||||||
|
}
|
||||||
|
if (beforeTargetVersion(MCVersion, latestMCVersion))
|
||||||
|
{
|
||||||
|
newMinecraftVersion = true;
|
||||||
|
modLogger.log(Level.INFO, "This update is for Minecraft " + latestMCVersion + ".");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
modLogger.log(Level.WARNING, "Version Check Failed: " + e.getMessage());
|
||||||
|
}
|
||||||
|
versionCheckComplete = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void doVersionCheck()
|
||||||
|
{
|
||||||
|
if (!ThaumicBees.getConfig().SkipUpdateCheck)
|
||||||
|
{
|
||||||
|
VersionInfo main = new VersionInfo("ThaumicBees", Version, VersionURL);
|
||||||
|
TickHandlerVersion.registerModVersionInfo(main);
|
||||||
|
TickHandlerVersion.initialize();
|
||||||
|
TickRegistry.registerScheduledTickHandler(TickHandlerVersion.instance, Side.CLIENT);
|
||||||
|
|
||||||
|
VersionCheckThread thread = main.new VersionCheckThread();
|
||||||
|
thread.start();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
package thaumicbees.main.utils.compat;
|
||||||
|
|
||||||
|
public class ExtraBeesHelper
|
||||||
|
{
|
||||||
|
|
||||||
|
public enum CombType
|
||||||
|
{
|
||||||
|
BARREN,
|
||||||
|
ROTTEN,
|
||||||
|
BONE,
|
||||||
|
OIL,
|
||||||
|
COAL,
|
||||||
|
FUEL,
|
||||||
|
WATER,
|
||||||
|
MILK,
|
||||||
|
FRUIT,
|
||||||
|
SEED,
|
||||||
|
ALCOHOL,
|
||||||
|
STONE,
|
||||||
|
REDSTONE,
|
||||||
|
RESIN,
|
||||||
|
IC2,
|
||||||
|
IRON,
|
||||||
|
GOLD,
|
||||||
|
COPPER,
|
||||||
|
TIN,
|
||||||
|
SILVER,
|
||||||
|
BRONZE,
|
||||||
|
URANIUM,
|
||||||
|
CLAY,
|
||||||
|
OLD,
|
||||||
|
FUNGAL,
|
||||||
|
CREOSOTE,
|
||||||
|
LATEX,
|
||||||
|
ACIDIC,
|
||||||
|
VENOMOUS,
|
||||||
|
SLIME,
|
||||||
|
BLAZE,
|
||||||
|
COFFEE,
|
||||||
|
GLACIAL,
|
||||||
|
MINT,
|
||||||
|
CITRUS,
|
||||||
|
PEAT,
|
||||||
|
SHADOW,
|
||||||
|
LEAD,
|
||||||
|
BRASS,
|
||||||
|
ELECTRUM,
|
||||||
|
ZINC,
|
||||||
|
TITANIUM,
|
||||||
|
TUNGSTEN,
|
||||||
|
STEEL,
|
||||||
|
IRIDIUM,
|
||||||
|
PLATINUM,
|
||||||
|
LAPIS,
|
||||||
|
SODALITE,
|
||||||
|
PYRITE,
|
||||||
|
BAUXITE,
|
||||||
|
CINNABAR,
|
||||||
|
SPHALERITE,
|
||||||
|
EMERALD,
|
||||||
|
RUBY,
|
||||||
|
SAPPHIRE,
|
||||||
|
OLIVINE,
|
||||||
|
DIAMOND,
|
||||||
|
RED,
|
||||||
|
YELLOW,
|
||||||
|
BLUE,
|
||||||
|
GREEN,
|
||||||
|
BLACK,
|
||||||
|
WHITE,
|
||||||
|
BROWN,
|
||||||
|
ORANGE,
|
||||||
|
CYAN,
|
||||||
|
PURPLE,
|
||||||
|
GRAY,
|
||||||
|
LIGHTBLUE,
|
||||||
|
PINK,
|
||||||
|
LIMEGREEN,
|
||||||
|
MAGENTA,
|
||||||
|
LIGHTGRAY,
|
||||||
|
NICKEL,
|
||||||
|
INVAR,
|
||||||
|
GLOWSTONE,
|
||||||
|
SALTPETER,
|
||||||
|
PULP,
|
||||||
|
MULCH,
|
||||||
|
COMPOST,
|
||||||
|
SAWDUST,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,137 @@
|
|||||||
|
package thaumicbees.main.utils.compat;
|
||||||
|
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import forestry.api.core.EnumHumidity;
|
||||||
|
import forestry.api.core.EnumTemperature;
|
||||||
|
import forestry.api.core.ItemInterface;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
|
||||||
|
public class ForestryHelper
|
||||||
|
{
|
||||||
|
public static void getForestryBlocks()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void getForestryItems()
|
||||||
|
{
|
||||||
|
Config.fBeeComb = Item.itemsList[ItemInterface.getItem("beeComb").itemID];
|
||||||
|
Config.fPollen = Item.itemsList[ItemInterface.getItem("pollen").itemID];
|
||||||
|
Config.fCraftingResource = Item.itemsList[ItemInterface.getItem("craftingMaterial").itemID];
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CraftingMaterial
|
||||||
|
{
|
||||||
|
PULSATING_DUST, // unused
|
||||||
|
PULSATING_MESH,
|
||||||
|
SILK_WISP,
|
||||||
|
WOVEN_SILK,
|
||||||
|
DISSIPATION_CHARGE,
|
||||||
|
ICE_SHARD,
|
||||||
|
SCENTED_PANELING,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Comb
|
||||||
|
{
|
||||||
|
HONEY,
|
||||||
|
COCOA,
|
||||||
|
SIMMERING,
|
||||||
|
STRINGY,
|
||||||
|
FROZEN,
|
||||||
|
DRIPPING,
|
||||||
|
SILKY,
|
||||||
|
PARCHED,
|
||||||
|
MYSTERIOUS,
|
||||||
|
IRRADIATED,
|
||||||
|
POWDERY,
|
||||||
|
REDDENED,
|
||||||
|
DARKENED,
|
||||||
|
OMEGA,
|
||||||
|
WHEATEN,
|
||||||
|
MOSSY,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Propolis
|
||||||
|
{
|
||||||
|
NORMAL,
|
||||||
|
STICKY, // Unused.
|
||||||
|
PULSATING,
|
||||||
|
SILKY,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Pollen
|
||||||
|
{
|
||||||
|
NORMAL,
|
||||||
|
CRYSTALLINE,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum CircuitBoard
|
||||||
|
{
|
||||||
|
BASIC,
|
||||||
|
ENHANCED,
|
||||||
|
REFINED,
|
||||||
|
INTRICATE,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Tube
|
||||||
|
{
|
||||||
|
COPPER,
|
||||||
|
TIN,
|
||||||
|
BRONZE,
|
||||||
|
IRON,
|
||||||
|
GOLD,
|
||||||
|
DIAMOND,
|
||||||
|
OBSIDIAN,
|
||||||
|
BLAZE,
|
||||||
|
RUBBER,
|
||||||
|
EMERALD,
|
||||||
|
APATITE,
|
||||||
|
LAPIS,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static EnumTemperature getEnumTemperatureFromValue(float rawTemp)
|
||||||
|
{
|
||||||
|
EnumTemperature value = EnumTemperature.ICY;
|
||||||
|
|
||||||
|
if (rawTemp >= 2.0f)
|
||||||
|
{
|
||||||
|
value = EnumTemperature.HOT;
|
||||||
|
}
|
||||||
|
else if (rawTemp >= 1.2f)
|
||||||
|
{
|
||||||
|
value = EnumTemperature.WARM;
|
||||||
|
}
|
||||||
|
else if (rawTemp >= 0.2f)
|
||||||
|
{
|
||||||
|
value = EnumTemperature.NORMAL;
|
||||||
|
}
|
||||||
|
else if (rawTemp >= 0.05f)
|
||||||
|
{
|
||||||
|
value = EnumTemperature.COLD;
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static EnumHumidity getEnumHumidityFromValue(float rawHumidity)
|
||||||
|
{
|
||||||
|
EnumHumidity value = EnumHumidity.ARID;
|
||||||
|
|
||||||
|
if (rawHumidity >= 0.9f)
|
||||||
|
{
|
||||||
|
value = EnumHumidity.DAMP;
|
||||||
|
}
|
||||||
|
else if (rawHumidity >= 0.3f)
|
||||||
|
{
|
||||||
|
value = EnumHumidity.NORMAL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
+158
@@ -0,0 +1,158 @@
|
|||||||
|
package thaumicbees.main.utils.compat;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
|
import forestry.api.genetics.IAllele;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
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.NBTBase;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumcraft.api.ThaumcraftApiHelper;
|
||||||
|
import thaumcraft.api.crafting.ShapelessInfusionCraftingRecipes;
|
||||||
|
import thaumcraft.api.research.ResearchList;
|
||||||
|
|
||||||
|
public class ShapelessBeeInfusionCraftingRecipe extends ShapelessInfusionCraftingRecipes
|
||||||
|
{
|
||||||
|
private String alleleId;
|
||||||
|
private byte alleleSlot;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates & adds a Crafting recipe to Thaumcraft for our Stark bee infusions.
|
||||||
|
*/
|
||||||
|
public static void createNewRecipe(String key, String researchKey, ItemStack output, Object[] input,
|
||||||
|
int auraCost, ObjectTags tags, IAllele allele, EnumBeeChromosome slot)
|
||||||
|
{
|
||||||
|
ArrayList<ItemStack> inputList = new ArrayList(input.length);
|
||||||
|
for (Object item : input)
|
||||||
|
{
|
||||||
|
if (item instanceof ItemStack)
|
||||||
|
{
|
||||||
|
inputList.add(((ItemStack) item).copy());
|
||||||
|
}
|
||||||
|
else if (item instanceof Item)
|
||||||
|
{
|
||||||
|
inputList.add(new ItemStack((Item)item));
|
||||||
|
}
|
||||||
|
else if (item instanceof Block)
|
||||||
|
{
|
||||||
|
inputList.add(new ItemStack((Block)item));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new RuntimeException("Invalid shapeless crafting recipe!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ThaumcraftApi.getCraftingRecipes().add(
|
||||||
|
new ShapelessBeeInfusionCraftingRecipe(key, output, inputList, auraCost, tags, allele, slot)
|
||||||
|
);
|
||||||
|
ResearchList.craftingRecipesForResearch.put(researchKey, Arrays.asList(ThaumcraftApi.getCraftingRecipes().size()-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
private ShapelessBeeInfusionCraftingRecipe(String key, ItemStack output, List<ItemStack> itemList, int cost, ObjectTags tags,
|
||||||
|
IAllele allele, EnumBeeChromosome slot)
|
||||||
|
{
|
||||||
|
super(key, output, itemList, cost, tags);
|
||||||
|
|
||||||
|
this.alleleId = allele.getUID();
|
||||||
|
this.alleleSlot = (byte)slot.ordinal();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean matches(IInventory craftingInventory, EntityPlayer player)
|
||||||
|
{
|
||||||
|
// We'll remove items from the list as they are found.
|
||||||
|
ArrayList<ItemStack> recipeItemsList = new ArrayList(this.recipeItems);
|
||||||
|
|
||||||
|
boolean invalidItemFound = false;
|
||||||
|
|
||||||
|
if (key.length() == 0 || (key.length() > 0 && ThaumcraftApiHelper.isResearchComplete(player.username, key)))
|
||||||
|
{
|
||||||
|
|
||||||
|
for (int i = 0; i < 3 && !invalidItemFound; ++i)
|
||||||
|
{
|
||||||
|
for (int j = 0; j < 3 && !invalidItemFound; ++j)
|
||||||
|
{
|
||||||
|
ItemStack itemStack = ThaumcraftApiHelper.getStackInRowAndColumn(craftingInventory, j, i);
|
||||||
|
|
||||||
|
if (itemStack != null)
|
||||||
|
{
|
||||||
|
Iterator<ItemStack> itr = recipeItemsList.iterator();
|
||||||
|
boolean currentItemInRecipe = false;
|
||||||
|
|
||||||
|
while (itr.hasNext())
|
||||||
|
{
|
||||||
|
ItemStack recipeItem = itr.next();
|
||||||
|
|
||||||
|
if (itemStack.itemID == recipeItem.itemID && (recipeItem.getItemDamage() == -1 || itemStack.getItemDamage() == recipeItem.getItemDamage()))
|
||||||
|
{
|
||||||
|
if (recipeItem.hasTagCompound())
|
||||||
|
{
|
||||||
|
currentItemInRecipe = this.hasMatchingChromosome(itemStack);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
currentItemInRecipe = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (currentItemInRecipe)
|
||||||
|
{
|
||||||
|
itr.remove();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!currentItemInRecipe)
|
||||||
|
{
|
||||||
|
invalidItemFound = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return recipeItemsList.isEmpty() && !invalidItemFound;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean hasMatchingChromosome(ItemStack itemStack)
|
||||||
|
{
|
||||||
|
boolean genesMatch = false;
|
||||||
|
|
||||||
|
NBTTagCompound compoundRoot = itemStack.getTagCompound();
|
||||||
|
if (compoundRoot.hasKey("Genome"))
|
||||||
|
{
|
||||||
|
NBTTagCompound genome = compoundRoot.getCompoundTag("Genome");
|
||||||
|
if (genome.hasKey("Chromosomes"))
|
||||||
|
{
|
||||||
|
NBTTagList chromosomes = genome.getTagList("Chromosomes");
|
||||||
|
|
||||||
|
for (int i = 0; i < chromosomes.tagCount() && !genesMatch; ++i)
|
||||||
|
{
|
||||||
|
NBTTagCompound genes = (NBTTagCompound)chromosomes.tagAt(i);
|
||||||
|
if (genes.hasKey("Slot") && genes.getByte("Slot") == this.alleleSlot)
|
||||||
|
{
|
||||||
|
if (genes.getString("UID0").equals(this.alleleId) && genes.getString("UID1").equals(this.alleleId))
|
||||||
|
{
|
||||||
|
genesMatch = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return genesMatch;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
package thaumicbees.main.utils.compat;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import thaumcraft.api.ItemApi;
|
||||||
|
import thaumicbees.main.Config;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
|
||||||
|
public class ThaumcraftHelper
|
||||||
|
{
|
||||||
|
public static void getThaumcraftBlocks()
|
||||||
|
{
|
||||||
|
Config.tcPlant = Block.blocksList[ItemApi.getItem("blockCustomPlant", 0).itemID];
|
||||||
|
Config.tcCandle = Block.blocksList[ItemApi.getItem("blockCandle", 0).itemID];
|
||||||
|
Config.tcCrystal = Block.blocksList[ItemApi.getItem("blockCrystal", 0).itemID];
|
||||||
|
Config.tcMarker = Block.blocksList[ItemApi.getItem("blockMarker", 0).itemID];
|
||||||
|
Config.tcJar = Block.blocksList[ItemApi.getItem("blockJar", 0).itemID];
|
||||||
|
Config.tcLog = Block.blocksList[ItemApi.getItem("blockMagicalLog", 0).itemID];
|
||||||
|
Config.tcLeaf = Block.blocksList[ItemApi.getItem("blockMagicalLeaves", 0).itemID];
|
||||||
|
Config.tcWarded = Block.blocksList[ItemApi.getItem("blockWarded", 0).itemID];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void getThaumcraftItems()
|
||||||
|
{
|
||||||
|
Config.tcFilledJar = Item.itemsList[ItemApi.getItem("itemJarFilled", 0).itemID];
|
||||||
|
Config.tcMiscResource = Item.itemsList[ItemApi.getItem("itemResource", 0).itemID];
|
||||||
|
Config.tcEssentiaBottle = Item.itemsList[ItemApi.getItem("itemEssence", 0).itemID];
|
||||||
|
Config.tcShard = Item.itemsList[ItemApi.getItem("itemShard", 0).itemID];
|
||||||
|
Config.tcGolem = Item.itemsList[ItemApi.getItem("itemGolemPlacer", 0).itemID];
|
||||||
|
Config.tcWispEssence = Item.itemsList[ItemApi.getItem("itemWispEssence", 0).itemID];
|
||||||
|
Config.tcNuggets = Item.itemsList[ItemApi.getItem("itemNugget", 0).itemID];
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum MiscResource
|
||||||
|
{
|
||||||
|
ALUMENTUM,
|
||||||
|
NITOR,
|
||||||
|
THAUMIUM,
|
||||||
|
QUICKSILVER,
|
||||||
|
MAGIC_TALLOW,
|
||||||
|
ZOMBIE_BRAIN,
|
||||||
|
AMBER,
|
||||||
|
ENCHANTED_FABRIC,
|
||||||
|
FLUX_FILTER,
|
||||||
|
KNOWLEDGE_FRAGMENT,
|
||||||
|
MIRRORED_GLASS,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum NuggetType
|
||||||
|
{
|
||||||
|
IRON,
|
||||||
|
COPPER,
|
||||||
|
TIN,
|
||||||
|
SILVER,
|
||||||
|
LEAD,
|
||||||
|
QUICKSILVER, _6,_7,_8,_9,_10,_11,_12,_13,_14,_15,
|
||||||
|
NATIVE_IRON,
|
||||||
|
NATIVE_COPPER,
|
||||||
|
NATIVE_TIN,
|
||||||
|
NATIVE_SILVER,
|
||||||
|
NATIVE_LEAD, _21,_22,_23,_24,_25,_26,_27,_28,_29,_30,
|
||||||
|
NATIVE_GOLD,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum ShardType
|
||||||
|
{
|
||||||
|
AIR,
|
||||||
|
FIRE,
|
||||||
|
WATER,
|
||||||
|
EARTH,
|
||||||
|
MAGIC,
|
||||||
|
DULL,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Entity
|
||||||
|
{
|
||||||
|
BRAINY_ZOMBIE("entBrainyZombie", "EntityBrainyZombie"),
|
||||||
|
GIANT_BRAINY_ZOMBIE("entGiantBrainyZombie", "EntityGiantBrainyZombie"),
|
||||||
|
WISP("entWisp", "EntityWisp"),
|
||||||
|
FIREBAT("entFirebat", "EntityFireBat"),
|
||||||
|
;
|
||||||
|
|
||||||
|
private static String packageName = "thaumcraft.common.entities.monster.";
|
||||||
|
|
||||||
|
public String entityID;
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
private Entity(String id, String clazz)
|
||||||
|
{
|
||||||
|
this.entityID = id;
|
||||||
|
this.className = clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClassName()
|
||||||
|
{
|
||||||
|
return packageName + this.className;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum BlockPlant
|
||||||
|
{
|
||||||
|
GREATWOOD_SAPLING,
|
||||||
|
SILVERWOOD_SAPLING,
|
||||||
|
SHIMMERLEAF,
|
||||||
|
CINDERPEARL;
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum TreeType
|
||||||
|
{
|
||||||
|
GREATWOOD,
|
||||||
|
SILVERWOOD,
|
||||||
|
;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package thaumicbees.storage;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import forestry.api.storage.IBackpackDefinition;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Backpack definition for Forestry.
|
||||||
|
* @author MysteriousAges
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class BackpackDefinition implements IBackpackDefinition
|
||||||
|
{
|
||||||
|
private ArrayList<ItemStack> items;
|
||||||
|
private String key;
|
||||||
|
private String name;
|
||||||
|
private int colour;
|
||||||
|
|
||||||
|
public BackpackDefinition(String backpackKey, String backpackName, int backpackColour)
|
||||||
|
{
|
||||||
|
items = new ArrayList<ItemStack>();
|
||||||
|
this.name = backpackName;
|
||||||
|
this.key = backpackKey;
|
||||||
|
this.colour = backpackColour;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKey()
|
||||||
|
{
|
||||||
|
return this.key;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getPrimaryColour()
|
||||||
|
{
|
||||||
|
return this.colour;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getSecondaryColour()
|
||||||
|
{
|
||||||
|
return 0xFFFFFF;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addValidItem(ItemStack validItem)
|
||||||
|
{
|
||||||
|
if (!this.items.contains(validItem))
|
||||||
|
{
|
||||||
|
this.items.add(validItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Collection<ItemStack> getValidItems(EntityPlayer player)
|
||||||
|
{
|
||||||
|
return this.items;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValidItem(EntityPlayer player, ItemStack itemStack)
|
||||||
|
{
|
||||||
|
boolean flag = false;
|
||||||
|
|
||||||
|
ItemStack stack;
|
||||||
|
for (int i = 0; i < this.items.size() && !flag; i++)
|
||||||
|
{
|
||||||
|
stack = this.items.get(i);
|
||||||
|
// If comparison stack has meta of -1
|
||||||
|
if (stack.itemID == itemStack.itemID)
|
||||||
|
{
|
||||||
|
flag = stack.getItemDamage() == -1 || stack.getItemDamage() == itemStack.getItemDamage();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in new issue
Block a user