mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Sat Dec 29 20:28:23 PST 2012
|
#Wed Jan 30 12:06:05 PST 2013
|
||||||
build.number=34
|
build.number=103
|
||||||
+24
-21
@@ -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.3.0"/>
|
||||||
|
|
||||||
<!-- 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,8 +71,7 @@
|
|||||||
<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="**/thaumicbees/**" />
|
<include name="**/thaumicbees/**" />
|
||||||
@@ -87,7 +88,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 +119,27 @@
|
|||||||
<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/**" />
|
|
||||||
|
<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 localizations (We have none yet.) -->
|
||||||
<copy todir="${classes.dir}/client">
|
<!--<copy todir="${classes.dir}/client">
|
||||||
<fileset dir="${lang.dir}">
|
<fileset dir="${lang.dir}">
|
||||||
<exclude name="README.md"/>
|
<exclude name="README.md"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
</copy>
|
</copy>-->
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<!-- Package the jars -->
|
<!-- Package the jars -->
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
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.
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 7.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.5 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
@@ -0,0 +1 @@
|
|||||||
|
storage.backpack.Thaumaturge=Thaumaturge's Backpack
|
||||||
@@ -2,8 +2,10 @@
|
|||||||
{
|
{
|
||||||
"modid": "ThaumicBees",
|
"modid": "ThaumicBees",
|
||||||
"name": "ThaumicBees",
|
"name": "ThaumicBees",
|
||||||
|
"url": "http://www.minecraftforum.net/topic/1623692-thaumicbees-beekeeping-is-magic/",
|
||||||
"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": "Thanks to Sengir and Azanor for awesome mods! Also thanks to Binnie and Florastar. (:",
|
||||||
|
"logoFile": "/gfx/thaumicbees/logo.png"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@@ -1,9 +1,96 @@
|
|||||||
<?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>
|
||||||
|
|
||||||
Lorem Ipsom something something.</page>
|
|
||||||
</research>
|
</research>
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
package forestry.plugins;
|
|
||||||
|
|
||||||
import thaumicbees.bees.ThaumicBeesPlugin;
|
|
||||||
|
|
||||||
public class PluginThaumicBees extends ThaumicBeesPlugin
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -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,113 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import thaumcraft.api.AuraNode;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.block.BlockManager;
|
||||||
|
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, BlockManager.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||||
|
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
||||||
|
flag = true;
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return "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,42 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
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(10) < 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 "Node Flux";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
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.block.BlockManager;
|
||||||
|
import thaumicbees.item.ItemManager;
|
||||||
|
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 "Node Purify";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
|
||||||
|
{
|
||||||
|
if (world.rand.nextInt(10) < 1)
|
||||||
|
{
|
||||||
|
AuraNode node = this.getNodeWithinRange(world, x, y, z);
|
||||||
|
if (node != null)
|
||||||
|
{
|
||||||
|
int aspectCount = node.flux.tags.size();
|
||||||
|
if (aspectCount > 0)
|
||||||
|
{
|
||||||
|
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
|
||||||
|
if (selectedTag != null)
|
||||||
|
{
|
||||||
|
node.flux.remove(selectedTag, 1);
|
||||||
|
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().add(selectedTag, -1), 0, 0, 0);
|
||||||
|
products = addItemToProducts(products, new ItemStack(ItemManager.solidFlux, 1, selectedTag.id));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return products;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -10,13 +10,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(BlockManager.tcPlant, 1, 2), new ItemStack(BlockManager.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) == BlockManager.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)
|
||||||
@@ -35,7 +35,7 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
|||||||
if (world.isAirBlock(x, y, z) && (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID))
|
if (world.isAirBlock(x, y, z) && (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID))
|
||||||
{
|
{
|
||||||
int rand = world.rand.nextInt(10);
|
int rand = world.rand.nextInt(10);
|
||||||
world.setBlockAndMetadataWithNotify(x, y, z, BlockManager.ThaumcraftPlant.blockID, (rand >= 5) ? 2 : 3);
|
world.setBlockAndMetadataWithNotify(x, y, z, BlockManager.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||||
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
||||||
flag = true;
|
flag = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to abstract the moon phase from the world time a bit.
|
||||||
|
*/
|
||||||
|
public enum MoonPhase
|
||||||
|
{
|
||||||
|
FULL,
|
||||||
|
WANING_GIBBOUS,
|
||||||
|
WANING_HALF,
|
||||||
|
WANING_CRESCENT,
|
||||||
|
NEW,
|
||||||
|
WAXING_CRESCENT,
|
||||||
|
WAXING_HALF,
|
||||||
|
WAXING_GIBBOUS;
|
||||||
|
|
||||||
|
public boolean isBetween(MoonPhase first, MoonPhase second)
|
||||||
|
{
|
||||||
|
boolean flag = false;
|
||||||
|
|
||||||
|
if (first.ordinal() <= second.ordinal())
|
||||||
|
{
|
||||||
|
// Straightforward.
|
||||||
|
flag = first.ordinal() <= this.ordinal() && this.ordinal() <= second.ordinal();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Wraps around the boundary.
|
||||||
|
flag = (first.ordinal() <= this.ordinal() && this.ordinal() <= WAXING_GIBBOUS.ordinal()) ||
|
||||||
|
(FULL.ordinal() <= this.ordinal() && this.ordinal() <= second.ordinal());
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MoonPhase getMoonPhase(World w)
|
||||||
|
{
|
||||||
|
return MoonPhase.values()[(int)(w.getWorldTime() / 24000L) % 8];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,423 @@
|
|||||||
|
package thaumicbees.bees;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.network.IGuiHandler;
|
||||||
|
import forestry.api.apiculture.*;
|
||||||
|
import forestry.api.core.*;
|
||||||
|
import forestry.api.genetics.AlleleManager;
|
||||||
|
import forestry.api.genetics.IClassification;
|
||||||
|
import forestry.api.genetics.IClassification.EnumClassLevel;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
|
import thaumcraft.api.EnumNodeType;
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.bees.genetics.Allele;
|
||||||
|
import thaumicbees.bees.genetics.AlleleEffectAuraNodeGrow;
|
||||||
|
import thaumicbees.bees.genetics.AlleleEffectCure;
|
||||||
|
import thaumicbees.bees.genetics.AlleleEffectPotion;
|
||||||
|
import thaumicbees.bees.genetics.AlleleEffectSpawnMob;
|
||||||
|
import thaumicbees.bees.genetics.AlleleEffectSpawnWisp;
|
||||||
|
import thaumicbees.bees.genetics.AlleleFlower;
|
||||||
|
import thaumicbees.bees.genetics.AlleleInteger;
|
||||||
|
import thaumicbees.bees.genetics.BeeGenomeManager;
|
||||||
|
import thaumicbees.bees.genetics.BeeMutation;
|
||||||
|
import thaumicbees.bees.genetics.BeeSpecies;
|
||||||
|
import thaumicbees.item.ItemComb;
|
||||||
|
import thaumicbees.item.ItemManager;
|
||||||
|
import thaumicbees.item.types.CombType;
|
||||||
|
import thaumicbees.item.types.DropType;
|
||||||
|
import thaumicbees.item.types.PollenType;
|
||||||
|
import thaumicbees.item.types.ResourceType;
|
||||||
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
import thaumicbees.thaumcraft.TCEntity;
|
||||||
|
import thaumicbees.thaumcraft.TCMiscResource;
|
||||||
|
import thaumicbees.thaumcraft.TCShardType;
|
||||||
|
import thaumicbees.thaumcraft.ThaumcraftCompat;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.command.ICommand;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.potion.Potion;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class TBBeeManager
|
||||||
|
{
|
||||||
|
private static int defaultBodyColour = 0xFF6E0D;
|
||||||
|
private static int malevolentBodyColour = 0xe15236;
|
||||||
|
private static boolean hideSpecies = true;
|
||||||
|
|
||||||
|
public void doInit()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Field f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
|
||||||
|
ThaumicBees.getInstanceConfig().DrawParticleEffects = f.getBoolean(null);
|
||||||
|
|
||||||
|
f = Class.forName("forestry.core.config.Defaults").getField("TEXTURE_PARTICLES_BEE");
|
||||||
|
thaumicbees.main.CommonProxy.FORESTRY_GFX_BEEEFFECTS = (String)f.get(null);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
// Could not get Forestry config value.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void postInit()
|
||||||
|
{
|
||||||
|
setupAdditionalAlleles();
|
||||||
|
setupBeeSpecies();
|
||||||
|
setupBeeMutations();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupAdditionalAlleles()
|
||||||
|
{
|
||||||
|
Allele.fertilityHighDominant = new AlleleInteger("fertilityHighDominant", 3, true);
|
||||||
|
|
||||||
|
Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true);
|
||||||
|
Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), false);
|
||||||
|
Allele.flowerAuraNode = new AlleleFlower("flowerAuraNode", new FlowerProviderAuraNode(), true);
|
||||||
|
Allele.flowerNodePurify = new AlleleFlower("flowerAuraNodePurify", new FlowerProviderAuraNodePurify(), false);
|
||||||
|
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", new FlowerProviderAuraNodeFlux(), false);
|
||||||
|
|
||||||
|
Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false);
|
||||||
|
Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", "Mining", Potion.digSpeed, 7, false);
|
||||||
|
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", "Swiftness", Potion.moveSpeed, 5, false);
|
||||||
|
|
||||||
|
Allele.nodeGen = new AlleleEffectAuraNodeGrow("effectNodeGeneration", "Nodeify", false, 800);
|
||||||
|
|
||||||
|
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, "Brainy", TCEntity.BRAINY_ZOMBIE.entityID);
|
||||||
|
Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
|
||||||
|
|
||||||
|
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, "Batty", TCEntity.FIREBAT.entityID);
|
||||||
|
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||||
|
|
||||||
|
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, "Wispy", TCEntity.WISP.entityID);
|
||||||
|
Allele.spawnWisp.setThrottle(1800);
|
||||||
|
|
||||||
|
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghastly", "Ghast");
|
||||||
|
Allele.spawnGhast.setThrottle(2000).setChanceToSpawn(20).setMaxMobsInSpawnZone(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupBeeSpecies()
|
||||||
|
{
|
||||||
|
IBreedingManager breedingMgr = BeeManager.breedingManager;
|
||||||
|
ItemStack forestryItem;
|
||||||
|
|
||||||
|
IClassification familyBee = AlleleManager.alleleRegistry.getClassification("family.apidae");
|
||||||
|
IClassification occult = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "occult", "Arcanus");
|
||||||
|
occult.setParent(familyBee);
|
||||||
|
|
||||||
|
Allele.Esoteric = new BeeSpecies("Esoteric", "An unusual crossbreed which seems to have magical properties.|Apinomicon",
|
||||||
|
"secretiore", occult, 0,
|
||||||
|
0x001099, 0xcc763c, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Esoteric.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 20);
|
||||||
|
Allele.Esoteric.setGenome(BeeGenomeManager.getTemplateEsoteric());
|
||||||
|
occult.addMemberSpecies(Allele.Esoteric);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Esoteric.getGenome());
|
||||||
|
|
||||||
|
Allele.Mysterious = new BeeSpecies("Mysterious", "These bees have been to the end of the world and back, and their power has grown.|Apinomicon",
|
||||||
|
"mysticus", occult, 0,
|
||||||
|
0x762bc2, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Mysterious.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 25);
|
||||||
|
Allele.Mysterious.setGenome(BeeGenomeManager.getTemplateMysterious());
|
||||||
|
occult.addMemberSpecies(Allele.Mysterious);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Mysterious.getGenome());
|
||||||
|
|
||||||
|
Allele.Arcane = new BeeSpecies("Arcane", "\"Their produce is charged with magic.\"|Azanor, Master Thaumaturge",
|
||||||
|
"arcanus", occult, 0,
|
||||||
|
0xd242df, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, true);
|
||||||
|
Allele.Arcane.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 30);
|
||||||
|
Allele.Arcane.addSpecialty(ItemManager.drops.getStackForType(DropType.ENCHANTED, 1), 9);
|
||||||
|
Allele.Arcane.setGenome(BeeGenomeManager.getTemplateArcane());
|
||||||
|
occult.addMemberSpecies(Allele.Arcane);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Arcane.getGenome());
|
||||||
|
|
||||||
|
IClassification otherworldly = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "coeleste", "Coeleste");
|
||||||
|
otherworldly.setParent(familyBee);
|
||||||
|
|
||||||
|
Allele.Charmed = new BeeSpecies("Charmed", "Your first experiments in Thaumaturgical Apiculture have yielded fruit. Buzzing fruit.|Apinomicon",
|
||||||
|
"larvatus", otherworldly, 0,
|
||||||
|
0x48EEEC, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Charmed.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 20);
|
||||||
|
Allele.Charmed.setGenome(BeeGenomeManager.getTemplateCharmed());
|
||||||
|
otherworldly.addMemberSpecies(Allele.Charmed);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Charmed.getGenome());
|
||||||
|
|
||||||
|
Allele.Enchanted = new BeeSpecies("Enchanted", "Successive generations of Charmed bees have reinforced their connection to the unknown.|Apinomicon",
|
||||||
|
"cantatus", otherworldly, 0,
|
||||||
|
0x18e726, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Enchanted.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 30);
|
||||||
|
Allele.Enchanted.setGenome(BeeGenomeManager.getTemplateEnchanted());
|
||||||
|
otherworldly.addMemberSpecies(Allele.Enchanted);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Enchanted.getGenome());
|
||||||
|
|
||||||
|
Allele.Supernatural = new BeeSpecies("Supernatural", "These bees walk the line between this world and the unseen.|Apinomicon",
|
||||||
|
"coeleste", otherworldly, 0,
|
||||||
|
0x005614, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, true);
|
||||||
|
Allele.Supernatural.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 40);
|
||||||
|
Allele.Supernatural.addSpecialty(ItemManager.pollen.getStackForType(PollenType.UNUSUAL), 8);
|
||||||
|
Allele.Supernatural.setGenome(BeeGenomeManager.getTemplateSupernatural());
|
||||||
|
otherworldly.addMemberSpecies(Allele.Supernatural);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Supernatural.getGenome());
|
||||||
|
|
||||||
|
IClassification learned = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "docto", "Docto");
|
||||||
|
learned.setParent(familyBee);
|
||||||
|
|
||||||
|
Allele.Pupil = new BeeSpecies("Pupil", "\"What does that bee want with my paper?!|Yorae, Librarian",
|
||||||
|
"disciplina", learned, 0,
|
||||||
|
0xFFFF00, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Pupil.addProduct(ItemManager.combs.getStackForType(CombType.PAPERY), 20);
|
||||||
|
Allele.Pupil.setGenome(BeeGenomeManager.getTemplatePupil());
|
||||||
|
learned.addMemberSpecies(Allele.Pupil);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Pupil.getGenome());
|
||||||
|
|
||||||
|
Allele.Scholarly = new BeeSpecies("Scholarly", "\"I can't be sure, but I think they might be smarter than me...\"|Yorae, Librarian",
|
||||||
|
"studiosis", learned, 0,
|
||||||
|
0x6E0000, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Scholarly.addProduct(ItemManager.combs.getStackForType(CombType.PAPERY), 25);
|
||||||
|
Allele.Scholarly.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 2);
|
||||||
|
Allele.Scholarly.setGenome(BeeGenomeManager.getTemplateScholarly());
|
||||||
|
learned.addMemberSpecies(Allele.Scholarly);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Scholarly.getGenome());
|
||||||
|
|
||||||
|
Allele.Savant = new BeeSpecies("Savant", "lim(x^(i / pi)/ log(e * 7 - ln(32/x^-pi))). Solve for honey.|Note found on Yorae's desk",
|
||||||
|
"philologus", learned, 0,
|
||||||
|
0x6E1C6D, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||||
|
true, hideSpecies, true, false);
|
||||||
|
Allele.Savant.addProduct(ItemManager.combs.getStackForType(CombType.PAPERY), 40);
|
||||||
|
Allele.Savant.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 5);
|
||||||
|
Allele.Savant.setGenome(BeeGenomeManager.getTemplateSavant());
|
||||||
|
learned.addMemberSpecies(Allele.Savant);
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Savant.getGenome());
|
||||||
|
|
||||||
|
IClassification magical = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "thaumis", "Thaumis");
|
||||||
|
magical.setParent(familyBee);
|
||||||
|
|
||||||
|
Allele.Stark = new BeeSpecies("Stark", "\"These are unusually attracted to shards. This warrents further investigation.\"|Azanor, Master Thaumaturge",
|
||||||
|
"torridae", magical, 0,
|
||||||
|
0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, false);
|
||||||
|
Allele.Stark.addProduct(ItemManager.combs.getStackForType(CombType.STARK), 10);
|
||||||
|
Allele.Stark.setGenome(BeeGenomeManager.getTemplateStark());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Stark.getGenome());
|
||||||
|
|
||||||
|
|
||||||
|
Allele.Air = new BeeSpecies("Aura", "\"They work so fast it's breathtaking.\"|Sengir, Mad Apiarist",
|
||||||
|
"ventosa", magical, 0,
|
||||||
|
0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, true);
|
||||||
|
Allele.Air.addProduct(ItemManager.combs.getStackForType(CombType.AIRY), 9);
|
||||||
|
Allele.Air.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.QUICKSILVER.ordinal()), 2);
|
||||||
|
Allele.Air.setGenome(BeeGenomeManager.getTemplateAir());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Air.getGenome());
|
||||||
|
|
||||||
|
Allele.Fire = new BeeSpecies("Ignis", "Caution: Contents of hive extremely hot.|Warning label on Azanor's apiary",
|
||||||
|
"praefervidus", magical, 0,
|
||||||
|
0xE50B0B, 0x95132F, EnumTemperature.HOT, EnumHumidity.ARID,
|
||||||
|
true, hideSpecies, true, true);
|
||||||
|
Allele.Fire.addProduct(ItemManager.combs.getStackForType(CombType.FIREY), 15);
|
||||||
|
Allele.Fire.addSpecialty(new ItemStack(Item.blazePowder), 8);
|
||||||
|
Allele.Fire.setGenome(BeeGenomeManager.getTemplateFire());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Fire.getGenome());
|
||||||
|
|
||||||
|
// Grab the Crystalline Pollen
|
||||||
|
(forestryItem = ItemInterface.getItem("pollen")).setItemDamage(1);
|
||||||
|
|
||||||
|
Allele.Water = new BeeSpecies("Aqua", "\"I tried to breed them once, but that was a wash.\"|MysteriousAges, Apprentice Thaumaturge",
|
||||||
|
"umidus", magical, 0,
|
||||||
|
0x36CFD9, 0x1054A1, EnumTemperature.NORMAL, EnumHumidity.DAMP,
|
||||||
|
true, hideSpecies, true, true);
|
||||||
|
Allele.Water.addProduct(ItemManager.combs.getStackForType(CombType.WATERY), 20);
|
||||||
|
Allele.Water.addSpecialty(new ItemStack(Block.ice), 1).addSpecialty(forestryItem, 5);
|
||||||
|
Allele.Water.setGenome(BeeGenomeManager.getTemplateWater());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Water.getGenome());
|
||||||
|
|
||||||
|
Allele.Earth = new BeeSpecies("Solum", "\"You're really gonna dig these bees, but watch out - they bore quite easily.\"|MysteriousAges, Apprentice Comedian",
|
||||||
|
"sordida", magical, 0,
|
||||||
|
0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, true);
|
||||||
|
Allele.Earth.addProduct(ItemManager.combs.getStackForType(CombType.EARTHY), 30);
|
||||||
|
Allele.Earth.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.AMBER.ordinal()), 6);
|
||||||
|
Allele.Earth.setGenome(BeeGenomeManager.getTemplateEarth());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Earth.getGenome());
|
||||||
|
|
||||||
|
Allele.Infused = new BeeSpecies("Praecantatio", "Beekeeping is magic!|Apinomicon, Preface",
|
||||||
|
"azanorius", magical, 0,
|
||||||
|
0xaa32fc, 0x7A489E, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, true);
|
||||||
|
Allele.Infused.addProduct(ItemManager.combs.getStackForType(CombType.INFUSED), 20);
|
||||||
|
Allele.Infused.setGenome(BeeGenomeManager.getTemplateInfused());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Infused.getGenome());
|
||||||
|
|
||||||
|
IClassification aware = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "patibilis", "Patibilis");
|
||||||
|
aware.setParent(familyBee);
|
||||||
|
|
||||||
|
Allele.Aware = new BeeSpecies("Aware", "\"They can see into your soul!\"|Florastar, Expert Beekeeper",
|
||||||
|
"sensibilis", aware, 0,
|
||||||
|
0xb0092e9, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Aware.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 18);
|
||||||
|
Allele.Aware.setGenome(BeeGenomeManager.getTemplateAware());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Aware.getGenome());
|
||||||
|
|
||||||
|
Allele.Vis = new BeeSpecies("Vis", "\"They can feel changes in the aura, but are not yet able to affect it.\"|Azanor, research notes",
|
||||||
|
"arcanus saecula", aware, 0,
|
||||||
|
0x004c99, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Vis.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 25);
|
||||||
|
Allele.Vis.setGenome(BeeGenomeManager.getTemplateVis());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Vis.getGenome());
|
||||||
|
|
||||||
|
Allele.Pure = new BeeSpecies("Pure", "\"It's like a bee janitor!\"|MysteriousAges, Thaumaturge",
|
||||||
|
"arcanus puritatem", aware, 0,
|
||||||
|
0xb0092e9, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, false);
|
||||||
|
Allele.Pure.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 20);
|
||||||
|
Allele.Pure.setGenome(BeeGenomeManager.getTemplatePure());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Pure.getGenome());
|
||||||
|
|
||||||
|
Allele.Flux = new BeeSpecies("Flux", "\"I thought they would help clean up, but it only makes things worse!\"|Kreicus, Apprentice Thaumaturge",
|
||||||
|
"arcanus labe", aware, 0,
|
||||||
|
0x004c99, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, false);
|
||||||
|
Allele.Flux.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 20);
|
||||||
|
Allele.Flux.setGenome(BeeGenomeManager.getTemplateFlux());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Flux.getGenome());
|
||||||
|
|
||||||
|
Allele.Node = new BeeSpecies("Node", "Having undergone a freak mutation, these bees now attract magic to them.|Apinomicon",
|
||||||
|
"conficiens", aware, 0,
|
||||||
|
0xFFF266, 0xFF8CE9, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, false);
|
||||||
|
Allele.Node.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 20);
|
||||||
|
Allele.Node.setGenome(BeeGenomeManager.getTemplateNode());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Node.getGenome());
|
||||||
|
|
||||||
|
IClassification malevolent = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "malevolens", "Malevolens");
|
||||||
|
malevolent.setParent(familyBee);
|
||||||
|
|
||||||
|
Allele.Skulking = new BeeSpecies("Skulking", "These bees have become xenophobic and bad-tempered. Use caution.|Apinomicon",
|
||||||
|
"malevolens", malevolent, 0,
|
||||||
|
0x524827, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Skulking.addProduct(ItemManager.combs.getStackForType(CombType.SKULKING), 10);
|
||||||
|
Allele.Skulking.setGenome(BeeGenomeManager.getTemplateSkulking());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Skulking.getGenome());
|
||||||
|
|
||||||
|
Allele.Brainy = new BeeSpecies("Brainy", "Their combs may be fetid and foul-smelling, but their intelligence is well-developed.|Apinomicon",
|
||||||
|
"cerebrum", malevolent, 0,
|
||||||
|
0x83FF70, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Brainy.addProduct(ItemManager.combs.getStackForType(CombType.SKULKING), 10).addProduct(new ItemStack(Item.rottenFlesh), 6);
|
||||||
|
Allele.Brainy.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.ZOMBIE_BRAIN.ordinal()), 2);
|
||||||
|
Allele.Brainy.setGenome(BeeGenomeManager.getTemplateBrainy());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Brainy.getGenome());
|
||||||
|
|
||||||
|
// Grab the Silky Comb.
|
||||||
|
(forestryItem = ItemInterface.getItem("beeComb")).setItemDamage(6);
|
||||||
|
|
||||||
|
Allele.Gossamer = new BeeSpecies("Gossamer", "As they work, they seem to fade out from light for brief moments.|Apinomicon",
|
||||||
|
"perlucidus", malevolent, 0,
|
||||||
|
0x183f66, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Gossamer.addProduct(forestryItem, 15);
|
||||||
|
Allele.Gossamer.setGenome(BeeGenomeManager.getTemplateGossamer());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Gossamer.getGenome());
|
||||||
|
|
||||||
|
Allele.Wispy = new BeeSpecies("Wispy", "Their language is garbled and unintelligible. It is probable they are speaking to unnatural beings.|Apinomicon",
|
||||||
|
"umbrabilis", malevolent, 0,
|
||||||
|
0x9cb8d5, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Wispy.addProduct(forestryItem, 22);
|
||||||
|
// Get silk wisp
|
||||||
|
(forestryItem = ItemInterface.getItem("craftingMaterial")).setItemDamage(2);
|
||||||
|
Allele.Wispy.addSpecialty(forestryItem, 4);
|
||||||
|
Allele.Wispy.setGenome(BeeGenomeManager.getTemplateWispy());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Wispy.getGenome());
|
||||||
|
|
||||||
|
Allele.Batty = new BeeSpecies("Batty", "They tend to attract bats to their hives through means unknown.|Apinomicon",
|
||||||
|
"chiroptera", malevolent, 0,
|
||||||
|
0x27350d, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Batty.addProduct(ItemManager.combs.getStackForType(CombType.SKULKING), 10);
|
||||||
|
Allele.Batty.addSpecialty(new ItemStack(Item.gunpowder), 4);
|
||||||
|
Allele.Batty.setGenome(BeeGenomeManager.getTemplateBatty());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Batty.getGenome());
|
||||||
|
|
||||||
|
Allele.Ghastly = new BeeSpecies("Ghastly", "\"*sigh*... Really, Myst?\"|Taveria",
|
||||||
|
"pallens", malevolent, 0,
|
||||||
|
0xccccee, 0xbf877c, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Ghastly.addProduct(ItemManager.combs.getStackForType(CombType.SKULKING), 8);
|
||||||
|
Allele.Ghastly.addSpecialty(new ItemStack(Item.ghastTear), 2);
|
||||||
|
Allele.Ghastly.setGenome(BeeGenomeManager.getTemplateGhastly());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Ghastly.getGenome());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupBeeMutations()
|
||||||
|
{
|
||||||
|
// Mutations are registered with the BreedingManager in their constructor.
|
||||||
|
|
||||||
|
BeeMutation.Esoteric = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric, 10);
|
||||||
|
BeeMutation.Esoteric1 = new BeeMutation(Allele.getBaseSpecies("Heroic"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric, 25);
|
||||||
|
BeeMutation.Mysterious = new BeeMutation(Allele.Esoteric, Allele.getBaseSpecies("Ended"), Allele.Mysterious, 10);
|
||||||
|
BeeMutation.Arcane = new BeeMutation(Allele.Esoteric, Allele.Mysterious, Allele.Arcane, 8)
|
||||||
|
.setMoonPhaseBonus(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT, 1.5f);
|
||||||
|
BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Diligent"), Allele.getBaseSpecies("Valiant"), Allele.Charmed, 20);
|
||||||
|
BeeMutation.Enchanted = new BeeMutation(Allele.Charmed, Allele.getBaseSpecies("Valiant"), Allele.Enchanted, 8);
|
||||||
|
BeeMutation.Supernatural = new BeeMutation(Allele.Charmed, Allele.Enchanted, Allele.Supernatural, 10)
|
||||||
|
.setMoonPhaseBonus(MoonPhase.WAXING_GIBBOUS, MoonPhase.WANING_GIBBOUS, 1.5f);
|
||||||
|
BeeMutation.Pupil = new BeeMutation(Allele.Arcane, Allele.Enchanted, Allele.Pupil, 10);
|
||||||
|
BeeMutation.Scholarly = new BeeMutation(Allele.Pupil, Allele.Arcane, Allele.Scholarly, 8);
|
||||||
|
BeeMutation.Savant = new BeeMutation(Allele.Pupil, Allele.Scholarly, Allele.Savant, 6);
|
||||||
|
BeeMutation.Stark = new BeeMutation(Allele.Arcane, Allele.Supernatural, Allele.Stark, 8);
|
||||||
|
|
||||||
|
BeeMutation.Aware = new BeeMutation(Allele.getBaseSpecies("Demonic"), Allele.getBaseSpecies("Edenic"), Allele.Aware, 12);
|
||||||
|
BeeMutation.Vis = new BeeMutation(Allele.Aware, Allele.Arcane, Allele.Vis, 7)
|
||||||
|
.setAuraNodeRequired(40);
|
||||||
|
BeeMutation.Vis1 = new BeeMutation(Allele.Aware, Allele.Stark, Allele.Vis, 12)
|
||||||
|
.setAuraNodeRequired(80);
|
||||||
|
|
||||||
|
BeeMutation.Pure = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Pure, 5)
|
||||||
|
.setAuraNodeTypeRequired(5, EnumNodeType.PURE).setMoonPhaseBonus(MoonPhase.NEW, MoonPhase.NEW, 1.6f);
|
||||||
|
BeeMutation.Flux = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Flux, 5)
|
||||||
|
.setAuraNodeTypeRequired(30, EnumNodeType.UNSTABLE).setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 1.6f);
|
||||||
|
|
||||||
|
BeeMutation.Node = new BeeMutation(Allele.Vis, Allele.Vis, Allele.Node, 2)
|
||||||
|
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WANING_HALF, MoonPhase.WANING_HALF);
|
||||||
|
BeeMutation.Node1 = new BeeMutation(Allele.Vis, Allele.Vis, Allele.Node, 2)
|
||||||
|
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WAXING_HALF);
|
||||||
|
|
||||||
|
// Now we get into a little bit of branching...
|
||||||
|
if (ThaumicBees.getInstanceConfig().ExtraBeesInstalled)
|
||||||
|
{
|
||||||
|
BeeMutation.Skulking = new BeeMutation(Allele.Mysterious, Allele.getExtraSpecies("desolate"), Allele.Skulking, 10);
|
||||||
|
BeeMutation.Brainy = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("rotten"), Allele.Brainy, 12);
|
||||||
|
BeeMutation.Gossamer = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("ancient"), Allele.Gossamer, 10);
|
||||||
|
BeeMutation.Batty = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("rock"), Allele.Batty, 14);
|
||||||
|
BeeMutation.Ghastly = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("creeper"), Allele.Ghastly, 13);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BeeMutation.Skulking = new BeeMutation(Allele.Mysterious, Allele.getBaseSpecies("Modest"), Allele.Skulking, 10);
|
||||||
|
BeeMutation.Brainy = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Sinister"), Allele.Brainy, 10);
|
||||||
|
BeeMutation.Gossamer = new BeeMutation(Allele.Skulking, Allele.Supernatural, Allele.Gossamer, 10);
|
||||||
|
BeeMutation.Batty = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Frugal"), Allele.Batty, 11);
|
||||||
|
BeeMutation.Ghastly = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Austere"), Allele.Ghastly, 13);
|
||||||
|
}
|
||||||
|
BeeMutation.Gossamer.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.WANING_CRESCENT);
|
||||||
|
BeeMutation.Wispy = new BeeMutation(Allele.Gossamer, Allele.getBaseSpecies("Cultivated"), Allele.Wispy, 8);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -9,24 +9,51 @@ public class Allele implements IAllele
|
|||||||
public static BeeSpecies Esoteric;
|
public static BeeSpecies Esoteric;
|
||||||
public static BeeSpecies Mysterious;
|
public static BeeSpecies Mysterious;
|
||||||
public static BeeSpecies Arcane;
|
public static BeeSpecies Arcane;
|
||||||
|
|
||||||
public static BeeSpecies Charmed;
|
public static BeeSpecies Charmed;
|
||||||
public static BeeSpecies Enchanted;
|
public static BeeSpecies Enchanted;
|
||||||
public static BeeSpecies Supernatural;
|
public static BeeSpecies Supernatural;
|
||||||
|
|
||||||
public static BeeSpecies Pupil;
|
public static BeeSpecies Pupil;
|
||||||
public static BeeSpecies Scholarly;
|
public static BeeSpecies Scholarly;
|
||||||
public static BeeSpecies Savant;
|
public static BeeSpecies Savant;
|
||||||
|
|
||||||
public static BeeSpecies Stark;
|
public static BeeSpecies Stark;
|
||||||
public static BeeSpecies Air;
|
public static BeeSpecies Air;
|
||||||
public static BeeSpecies Water;
|
public static BeeSpecies Water;
|
||||||
public static BeeSpecies Earth;
|
public static BeeSpecies Earth;
|
||||||
public static BeeSpecies Fire;
|
public static BeeSpecies Fire;
|
||||||
|
public static BeeSpecies Infused;
|
||||||
|
|
||||||
|
public static BeeSpecies Aware;
|
||||||
|
public static BeeSpecies Vis;
|
||||||
|
public static BeeSpecies Pure;
|
||||||
|
public static BeeSpecies Flux;
|
||||||
|
public static BeeSpecies Node;
|
||||||
|
|
||||||
|
public static BeeSpecies Skulking;
|
||||||
|
public static BeeSpecies Brainy;
|
||||||
|
public static BeeSpecies Gossamer;
|
||||||
|
public static BeeSpecies Wispy;
|
||||||
|
public static BeeSpecies Batty;
|
||||||
|
public static BeeSpecies Ghastly;
|
||||||
|
|
||||||
|
public static AlleleInteger fertilityHighDominant;
|
||||||
|
|
||||||
public static AlleleFlower flowerBookshelf;
|
public static AlleleFlower flowerBookshelf;
|
||||||
public static AlleleFlower flowerThaumcraft;
|
public static AlleleFlower flowerThaumcraft;
|
||||||
|
public static AlleleFlower flowerAuraNode;
|
||||||
|
public static AlleleFlower flowerNodePurify;
|
||||||
|
public static AlleleFlower flowerNodeFluxify;
|
||||||
|
|
||||||
public static AlleleEffectCure cleansingEffect;
|
public static AlleleEffectCure cleansingEffect;
|
||||||
public static AlleleEffectPotion digSpeed;
|
public static AlleleEffectPotion digSpeed;
|
||||||
public static AlleleEffectPotion moveSpeed;
|
public static AlleleEffectPotion moveSpeed;
|
||||||
|
public static AlleleEffectSpawnMob spawnBrainyZombie;
|
||||||
|
public static AlleleEffectSpawnMob spawnWisp;
|
||||||
|
public static AlleleEffectSpawnMob spawnBats;
|
||||||
|
public static AlleleEffectSpawnMob spawnGhast;
|
||||||
|
public static AlleleEffectAuraNodeGrow nodeGen;
|
||||||
|
|
||||||
private String uid;
|
private String uid;
|
||||||
private boolean dominant;
|
private boolean dominant;
|
||||||
@@ -36,6 +63,11 @@ public class Allele implements IAllele
|
|||||||
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
|
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)
|
public static IAllele getBaseAllele(String name)
|
||||||
{
|
{
|
||||||
return AlleleManager.getAllele(name);
|
return AlleleManager.getAllele(name);
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package thaumicbees.bees.genetics;
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
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.ThaumicBees;
|
||||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
@@ -8,10 +14,12 @@ import forestry.api.genetics.IEffectData;
|
|||||||
|
|
||||||
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||||
{
|
{
|
||||||
|
protected String readableName;
|
||||||
|
|
||||||
public AlleleEffect(String id, boolean isDominant)
|
public AlleleEffect(String id, boolean isDominant, String identifier)
|
||||||
{
|
{
|
||||||
super(id, isDominant);
|
super(id, isDominant);
|
||||||
|
this.readableName = identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -24,7 +32,10 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
public abstract IEffectData validateStorage(IEffectData storedData);
|
public abstract IEffectData validateStorage(IEffectData storedData);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public abstract String getIdentifier();
|
public String getIdentifier()
|
||||||
|
{
|
||||||
|
return this.readableName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public abstract IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
public abstract IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||||
@@ -35,9 +46,9 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
int[] area = genome.getTerritory();
|
int[] area = genome.getTerritory();
|
||||||
float mod = housing.getTerritoryModifier(genome);
|
float mod = housing.getTerritoryModifier(genome);
|
||||||
// Check to make sure territory is at least 1 with housing modifications
|
// Check to make sure territory is at least 1 with housing modifications
|
||||||
area[0] = Math.min((int)(area[0] * mod), 1);
|
area[0] = Math.max((int)(area[0] * mod), 1);
|
||||||
area[1] = Math.min((int)(area[1] * mod), 1);
|
area[1] = Math.max((int)(area[1] * mod), 1);
|
||||||
area[2] = Math.min((int)(area[2] * mod), 1);
|
area[2] = Math.max((int)(area[2] * mod), 1);
|
||||||
|
|
||||||
ThaumicBees.proxy.drawBeeEffects(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(),
|
ThaumicBees.proxy.drawBeeEffects(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(),
|
||||||
genome.getPrimaryAsBee().getPrimaryColor(), area[0], area[1], area[2]);
|
genome.getPrimaryAsBee().getPrimaryColor(), area[0], area[1], area[2]);
|
||||||
@@ -56,4 +67,25 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
return -1;
|
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.genetics;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
import thaumcraft.api.AuraNode;
|
||||||
|
import thaumcraft.api.EnumNodeType;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import forestry.api.genetics.IEffectData;
|
||||||
|
|
||||||
|
public class AlleleEffectAuraNodeGrow extends AlleleEffect
|
||||||
|
{
|
||||||
|
|
||||||
|
private int throttle;
|
||||||
|
|
||||||
|
public AlleleEffectAuraNodeGrow(String id, String identifier, boolean isDominant, int timeout)
|
||||||
|
{
|
||||||
|
super(id, isDominant, identifier);
|
||||||
|
this.throttle = timeout;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData validateStorage(IEffectData storedData)
|
||||||
|
{
|
||||||
|
if (storedData == null)
|
||||||
|
{
|
||||||
|
storedData = new EffectData(1, 0, 0);
|
||||||
|
}
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
|
{
|
||||||
|
int value = storedData.getInteger(0);
|
||||||
|
if (value >= throttle)
|
||||||
|
{
|
||||||
|
World w = housing.getWorld();
|
||||||
|
if (w.rand.nextInt(20) < 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 * 3 / 4)
|
||||||
|
{
|
||||||
|
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.0125f;
|
||||||
|
y *= 0.0125f;
|
||||||
|
z *= 0.0125f;
|
||||||
|
|
||||||
|
ThaumcraftApi.queueNodeChanges(nodeId, node.level * -3 / 8, w.rand.nextInt(1), false, null, x, y, z);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
storedData.setInteger(0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
storedData.setInteger(0, value + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -2,7 +2,6 @@ package thaumicbees.bees.genetics;
|
|||||||
|
|
||||||
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;
|
||||||
@@ -22,7 +21,7 @@ public class AlleleEffectCure extends AlleleEffect
|
|||||||
|
|
||||||
public AlleleEffectCure(String id, boolean isDominant)
|
public AlleleEffectCure(String id, boolean isDominant)
|
||||||
{
|
{
|
||||||
super(id, isDominant);
|
super(id, isDominant, "Cleansing");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -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, String readableName, Potion potionApplied, int effectDuration, boolean isDominant)
|
||||||
{
|
{
|
||||||
super("effect" + name, isDominant);
|
super("effect" + name, isDominant, readableName);
|
||||||
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.genetics;
|
||||||
|
|
||||||
|
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 identifier, String mobToSpawn)
|
||||||
|
{
|
||||||
|
super(id, isDominant, identifier);
|
||||||
|
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,83 @@
|
|||||||
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
|
||||||
|
import thaumicbees.item.ItemArmorApiarist;
|
||||||
|
import thaumicbees.thaumcraft.TCEntity;
|
||||||
|
|
||||||
|
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 identifier, String mobToSpawn)
|
||||||
|
{
|
||||||
|
super(id, isDominant, identifier, 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(TCEntity.WISP.getClassName());
|
||||||
|
Field type = wispEntity.getDeclaredField("type");
|
||||||
|
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
FMLLog.info("ThaumicBees is using an invalid classname: " + TCEntity.WISP.getClassName()
|
||||||
|
+ " Please report this error in the thread if you see it.", (Object[])null);
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
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,7 +1,12 @@
|
|||||||
package thaumicbees.bees.genetics;
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraft.nbt.NBTTagList;
|
||||||
import forestry.api.apiculture.BeeManager;
|
import forestry.api.apiculture.BeeManager;
|
||||||
import forestry.api.apiculture.EnumBeeChromosome;
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
|
import forestry.api.core.ItemInterface;
|
||||||
import forestry.api.genetics.AlleleManager;
|
import forestry.api.genetics.AlleleManager;
|
||||||
import forestry.api.genetics.IAllele;
|
import forestry.api.genetics.IAllele;
|
||||||
|
|
||||||
@@ -73,7 +78,7 @@ public class BeeGenomeManager
|
|||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Arcane;
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Arcane;
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
|
||||||
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlower");
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringAverage");
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
@@ -84,7 +89,7 @@ public class BeeGenomeManager
|
|||||||
|
|
||||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
||||||
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlower");
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
@@ -125,7 +130,7 @@ public class BeeGenomeManager
|
|||||||
|
|
||||||
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||||
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanElongated");
|
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanElongated");
|
||||||
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp1");
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp2");
|
||||||
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerBookshelf;
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerBookshelf;
|
||||||
@@ -169,6 +174,7 @@ public class BeeGenomeManager
|
|||||||
IAllele[] genome = getTemplateBaseThaumic();
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerThaumcraft;
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerThaumcraft;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
@@ -178,6 +184,7 @@ public class BeeGenomeManager
|
|||||||
IAllele[] genome = getTemplateBaseElemental();
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Stark;
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Stark;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
@@ -237,10 +244,216 @@ public class BeeGenomeManager
|
|||||||
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown1");
|
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown1");
|
||||||
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
genome[EnumBeeChromosome.CAVE_DWELLING.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.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringFastest");
|
||||||
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.digSpeed;
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.digSpeed;
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateInfused()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.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()] = Allele.Aware;
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateVis()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.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()] = Allele.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()] = Allele.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()] = Allele.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()] = Allele.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()] = Allele.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()] = Allele.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()] = Allele.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()] = Allele.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()] = Allele.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,6 +5,11 @@ import forestry.api.genetics.IAllele;
|
|||||||
import forestry.api.genetics.IGenome;
|
import forestry.api.genetics.IGenome;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import thaumcraft.api.AuraNode;
|
||||||
|
import thaumcraft.api.EnumNodeType;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumicbees.bees.MoonPhase;
|
||||||
|
|
||||||
public class BeeMutation implements IBeeMutation
|
public class BeeMutation implements IBeeMutation
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -20,7 +25,19 @@ public class BeeMutation implements IBeeMutation
|
|||||||
public static BeeMutation Pupil;
|
public static BeeMutation Pupil;
|
||||||
public static BeeMutation Scholarly;
|
public static BeeMutation Scholarly;
|
||||||
public static BeeMutation Savant;
|
public static BeeMutation Savant;
|
||||||
|
public static BeeMutation Aware;
|
||||||
|
public static BeeMutation Vis;
|
||||||
|
public static BeeMutation Vis1;
|
||||||
|
public static BeeMutation Pure;
|
||||||
|
public static BeeMutation Flux;
|
||||||
|
public static BeeMutation Node;
|
||||||
|
public static BeeMutation Node1;
|
||||||
|
public static BeeMutation Skulking;
|
||||||
|
public static BeeMutation Brainy;
|
||||||
|
public static BeeMutation Gossamer;
|
||||||
|
public static BeeMutation Wispy;
|
||||||
|
public static BeeMutation Batty;
|
||||||
|
public static BeeMutation Ghastly;
|
||||||
|
|
||||||
private IAllele parent1;
|
private IAllele parent1;
|
||||||
private IAllele parent2;
|
private IAllele parent2;
|
||||||
@@ -28,29 +45,84 @@ public class BeeMutation implements IBeeMutation
|
|||||||
private int baseChance;
|
private int baseChance;
|
||||||
private boolean isSecret;
|
private boolean isSecret;
|
||||||
|
|
||||||
public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, IAllele producesGenome[], int percentChance, boolean hide)
|
private boolean isMoonRestricted;
|
||||||
{
|
private MoonPhase moonPhaseStart;
|
||||||
parent1 = species0;
|
private MoonPhase moonPhaseEnd;
|
||||||
parent2 = species1;
|
private float moonPhaseMutationBonus;
|
||||||
mutationTemplate = producesGenome;
|
private boolean nodeRequired;
|
||||||
baseChance = percentChance;
|
private EnumNodeType nodeType;
|
||||||
isSecret = hide;
|
private double nodeRange;
|
||||||
|
|
||||||
BeeManager.beeMutations.add(this);
|
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)
|
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
||||||
{
|
{
|
||||||
int chance = 0;
|
int finalChance = 0;
|
||||||
|
float chance = this.baseChance * 1f;
|
||||||
|
|
||||||
if ((this.parent1.getUID().equals(allele0.getUID())) && this.parent2.getUID().equals(allele1.getUID()) ||
|
if (this.arePartners(allele0, allele1))
|
||||||
this.parent1.getUID().equals(allele1.getUID()) && this.parent2.getUID().equals(allele0.getUID()))
|
|
||||||
{
|
{
|
||||||
// This mutation applies. Continue calculation.
|
// This mutation applies. Continue calculation.
|
||||||
chance = Math.round((float) this.baseChance * BeeManager.breedingManager.getBeekeepingMode(housing.getWorld()).getMutationModifier((IBeeGenome) genome0, (IBeeGenome) genome1));
|
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 chance;
|
return finalChance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IAllele getAllele0()
|
public IAllele getAllele0()
|
||||||
@@ -86,8 +158,54 @@ public class BeeMutation implements IBeeMutation
|
|||||||
return val;
|
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()
|
public boolean isSecret()
|
||||||
{
|
{
|
||||||
return 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -24,17 +24,17 @@ public class BeeSpecies extends Allele implements IAlleleBeeSpecies
|
|||||||
private boolean hasEffect;
|
private boolean hasEffect;
|
||||||
private boolean isSecret;
|
private boolean isSecret;
|
||||||
private boolean isCounted;
|
private boolean isCounted;
|
||||||
private IBranch branch;
|
private IClassification branch;
|
||||||
private HashMap products;
|
private HashMap products;
|
||||||
private HashMap specialty;
|
private HashMap specialty;
|
||||||
private IAllele genomeTemplate[];
|
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)
|
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IClassification classification, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
|
||||||
{
|
{
|
||||||
this(speciesName, speciesDescription, genusName, parentBranch, 0, firstColour, secondColour, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant);
|
this(speciesName, speciesDescription, genusName, classification, 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)
|
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IClassification classification, int body, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesSecret, boolean isSpeciesCounted, boolean isSpeciesDominant)
|
||||||
{
|
{
|
||||||
super("species" + speciesName, isSpeciesDominant);
|
super("species" + speciesName, isSpeciesDominant);
|
||||||
name = speciesName;
|
name = speciesName;
|
||||||
@@ -51,6 +51,7 @@ public class BeeSpecies extends Allele implements IAlleleBeeSpecies
|
|||||||
isCounted = isSpeciesCounted;
|
isCounted = isSpeciesCounted;
|
||||||
products = new HashMap();
|
products = new HashMap();
|
||||||
specialty = new HashMap();
|
specialty = new HashMap();
|
||||||
|
this.branch = classification;
|
||||||
this.genomeTemplate = new IAllele[EnumBeeChromosome.values().length];
|
this.genomeTemplate = new IAllele[EnumBeeChromosome.values().length];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -148,9 +149,9 @@ public class BeeSpecies extends Allele implements IAlleleBeeSpecies
|
|||||||
return authority;
|
return authority;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IBranch getBranch()
|
public IClassification getBranch()
|
||||||
{
|
{
|
||||||
return branch;
|
return this.branch;
|
||||||
}
|
}
|
||||||
|
|
||||||
public HashMap getProducts()
|
public HashMap getProducts()
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package thaumicbees.bees;
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
@@ -6,8 +6,14 @@ import net.minecraftforge.common.Configuration;
|
|||||||
|
|
||||||
public class BlockManager
|
public class BlockManager
|
||||||
{
|
{
|
||||||
|
public static Block tcPlant;
|
||||||
public static Block ThaumcraftPlant;
|
public static Block tcCandle;
|
||||||
|
public static Block tcCrystal;
|
||||||
|
public static Block tcMarker;
|
||||||
|
public static Block tcJar;
|
||||||
|
public static Block tcLog;
|
||||||
|
public static Block tcLeaf;
|
||||||
|
public static Block tcWarded;
|
||||||
|
|
||||||
public BlockManager() { }
|
public BlockManager() { }
|
||||||
|
|
||||||
|
|||||||
@@ -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,95 @@
|
|||||||
|
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)
|
||||||
|
{
|
||||||
|
super(itemId);
|
||||||
|
this.capsuleType = type;
|
||||||
|
this.setTextureFile(CommonProxy.TCBEES_LIQUIDS_IMAGE);
|
||||||
|
this.setCreativeTab(Tabs.tabApiculture);
|
||||||
|
this.setHasSubtypes(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CapsuleType getType()
|
||||||
|
{
|
||||||
|
return this.capsuleType;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getItemDisplayName(ItemStack itemStack)
|
||||||
|
{
|
||||||
|
return LiquidType.values()[itemStack.getItemDamage()].displayName + " " + this.capsuleType.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
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,28 +53,36 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,38 +2,23 @@ package thaumicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import thaumicbees.item.ItemPollen.PollenType;
|
import thaumicbees.item.types.DropType;
|
||||||
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 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 +36,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,20 +58,27 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,139 @@
|
|||||||
|
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.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.frameName;
|
||||||
|
}
|
||||||
|
|
||||||
|
// --------- IHiveFrame functions -----------------------------------------
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack frameUsed(IBeeHousing housing, ItemStack frame, IBee queen, int wear)
|
||||||
|
{
|
||||||
|
this.doFluxEffect(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord());
|
||||||
|
frame = this.doWear(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), frame, wear);
|
||||||
|
|
||||||
|
return frame;
|
||||||
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
if (this.type.auraPerUse > 0)
|
||||||
|
{
|
||||||
|
// 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
frame.setItemDamage(frame.getItemDamage() + damage);
|
||||||
|
|
||||||
|
if (frame.getItemDamage() >= frame.getMaxDamage())
|
||||||
|
{
|
||||||
|
// Break!
|
||||||
|
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,18 +1,38 @@
|
|||||||
package thaumicbees.item;
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import thaumicbees.item.ItemComb.CombType;
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
import thaumicbees.item.ItemMiscResources.ResourceType;
|
import thaumcraft.api.EnumTag;
|
||||||
import thaumicbees.item.ItemPropolis.PropolisType;
|
import thaumicbees.item.types.CapsuleType;
|
||||||
import thaumicbees.item.ItemWax.WaxType;
|
import thaumicbees.item.types.CombType;
|
||||||
|
import thaumicbees.item.types.DropType;
|
||||||
|
import thaumicbees.item.types.HiveFrameType;
|
||||||
|
import thaumicbees.item.types.LiquidType;
|
||||||
|
import thaumicbees.item.types.PropolisType;
|
||||||
|
import thaumicbees.item.types.ResourceType;
|
||||||
|
import thaumicbees.item.types.WaxType;
|
||||||
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
import thaumicbees.storage.BackpackDefinition;
|
||||||
|
import thaumicbees.thaumcraft.TCMiscResource;
|
||||||
|
import thaumicbees.thaumcraft.TCShardType;
|
||||||
|
import thaumicbees.thaumcraft.ThaumcraftCompat;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
import net.minecraftforge.common.Property;
|
import net.minecraftforge.common.Property;
|
||||||
|
import net.minecraftforge.liquids.LiquidContainerData;
|
||||||
|
import net.minecraftforge.liquids.LiquidContainerRegistry;
|
||||||
|
import net.minecraftforge.liquids.LiquidDictionary;
|
||||||
import net.minecraftforge.liquids.LiquidStack;
|
import net.minecraftforge.liquids.LiquidStack;
|
||||||
|
import forestry.api.apiculture.BeeManager;
|
||||||
|
import forestry.api.core.BlockInterface;
|
||||||
import forestry.api.core.ItemInterface;
|
import forestry.api.core.ItemInterface;
|
||||||
import forestry.api.recipes.*;
|
import forestry.api.recipes.*;
|
||||||
|
import forestry.api.storage.BackpackManager;
|
||||||
|
import forestry.api.storage.EnumBackpackType;
|
||||||
|
|
||||||
public class ItemManager
|
public class ItemManager
|
||||||
{
|
{
|
||||||
@@ -20,19 +40,33 @@ public class ItemManager
|
|||||||
public static ItemWax wax;
|
public static ItemWax wax;
|
||||||
public static ItemPropolis propolis;
|
public static ItemPropolis propolis;
|
||||||
public static ItemDrop drops;
|
public static ItemDrop drops;
|
||||||
|
public static ItemPollen pollen;
|
||||||
|
public static ItemSolidFlux solidFlux;
|
||||||
public static ItemMiscResources miscResources;
|
public static ItemMiscResources miscResources;
|
||||||
|
|
||||||
|
//----- Liquid Capsules --------------------
|
||||||
|
public static ItemCapsule magicCapsule;
|
||||||
|
|
||||||
|
//----- Apiary Frames ----------------------
|
||||||
|
public static ItemMagicHiveFrame hiveFrameMagic;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameResilient;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameGentle;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameMetabolic;
|
||||||
|
public static ItemMagicHiveFrame hiveFrameNecrotic;
|
||||||
|
|
||||||
//----- Thaumcraft Items -------------------
|
//----- Thaumcraft Items -------------------
|
||||||
public static ItemStack quicksilver;
|
public static Item tcFilledJar;
|
||||||
public static ItemStack amber;
|
public static Item tcMiscResource;
|
||||||
public static ItemStack fragment;
|
public static Item tcEssentiaBottle;
|
||||||
public static ItemStack airShard;
|
public static Item tcShard;
|
||||||
public static ItemStack fireShard;
|
public static Item tcGolem;
|
||||||
public static ItemStack waterShard;
|
public static Item tcWispEssence;
|
||||||
public static ItemStack earthShard;
|
|
||||||
public static ItemStack magicShard;
|
//----- Backpacks --------------------------
|
||||||
public static ItemStack dullShard;
|
public static Item thaumaturgeBackpackT1;
|
||||||
public static ItemStack essentiaBottle;
|
public static Item thaumaturgeBackpackT2;
|
||||||
|
|
||||||
|
public static BackpackDefinition thaumaturgeBackpackDef;
|
||||||
|
|
||||||
public ItemManager() { }
|
public ItemManager() { }
|
||||||
|
|
||||||
@@ -46,49 +80,157 @@ public class ItemManager
|
|||||||
ItemManager.propolis = new ItemPropolis(configFile.getItem("propolis", itemIDBase++).getInt());
|
ItemManager.propolis = new ItemPropolis(configFile.getItem("propolis", itemIDBase++).getInt());
|
||||||
ItemManager.drops = new ItemDrop(configFile.getItem("drop", itemIDBase++).getInt());
|
ItemManager.drops = new ItemDrop(configFile.getItem("drop", itemIDBase++).getInt());
|
||||||
ItemManager.miscResources = new ItemMiscResources(configFile.getItem("miscResources", itemIDBase++).getInt());
|
ItemManager.miscResources = new ItemMiscResources(configFile.getItem("miscResources", itemIDBase++).getInt());
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
// 0x8700C6 = purpleish.
|
||||||
|
BackpackDefinition def = new BackpackDefinition("thaumaturge", "Thaumaturge's Backpack", 0x8700C6);
|
||||||
|
ItemManager.thaumaturgeBackpackT1 =
|
||||||
|
BackpackManager.backpackInterface.addBackpack(configFile.getItem("thaumaturgePack1", itemIDBase++).getInt(),
|
||||||
|
def, EnumBackpackType.T1);
|
||||||
|
ItemManager.thaumaturgeBackpackT2 =
|
||||||
|
BackpackManager.backpackInterface.addBackpack(configFile.getItem("thaumaturgePack2", itemIDBase++).getInt(),
|
||||||
|
def, EnumBackpackType.T2);
|
||||||
|
// Add additional items from configs to backpack.
|
||||||
|
if (ThaumicBees.getInstanceConfig().ThaumaturgeExtraItems.length() > 0)
|
||||||
|
{
|
||||||
|
FMLLog.info("Attempting to add extra items to Thaumaturge's backpack! If you get an error, check your ThaumicBees.conf.");
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ThaumicBees.getInstanceConfig().ThaumaturgeExtraItems);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
FMLLog.severe("ThaumicBees encountered a problem during loading!");
|
||||||
|
throw new RuntimeException("Could not register backpacks via Forestry. Check your FML Client log and see if Forestry crashed silently.", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ItemManager.magicCapsule = new ItemCapsule(CapsuleType.MAGIC, configFile.getItem("magicCapsule", itemIDBase++).getInt());
|
||||||
|
|
||||||
|
ItemManager.pollen = new ItemPollen(configFile.getItem("pollen", itemIDBase++).getInt());
|
||||||
|
ItemManager.solidFlux = new ItemSolidFlux(configFile.getItem("fluxCrystal", itemIDBase++).getInt());
|
||||||
|
|
||||||
|
ItemManager.hiveFrameMagic = new ItemMagicHiveFrame(configFile.getItem("frameMagic", itemIDBase++).getInt(), HiveFrameType.MAGIC);
|
||||||
|
ItemManager.hiveFrameResilient = new ItemMagicHiveFrame(configFile.getItem("frameResilient", itemIDBase++).getInt(), HiveFrameType.RESILIENT);
|
||||||
|
ItemManager.hiveFrameGentle = new ItemMagicHiveFrame(configFile.getItem("frameGentle", itemIDBase++).getInt(), HiveFrameType.GENTLE);
|
||||||
|
ItemManager.hiveFrameMetabolic = new ItemMagicHiveFrame(configFile.getItem("frameMetabolic", itemIDBase++).getInt(), HiveFrameType.METABOLIC);
|
||||||
|
ItemManager.hiveFrameNecrotic = new ItemMagicHiveFrame(configFile.getItem("frameNecrotic", itemIDBase++).getInt(), HiveFrameType.NECROTIC);
|
||||||
|
// Future frames, so they all are clumped together.
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
itemIDBase++;
|
||||||
|
|
||||||
|
// New items here.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setupCrafting()
|
public static void setupCrafting()
|
||||||
{
|
{
|
||||||
ItemStack output = ItemManager.essentiaBottle.copy();
|
ItemStack inputStack; // Variable to hold forestry items
|
||||||
|
|
||||||
|
// Essentia bottles
|
||||||
|
ItemStack output = new ItemStack(tcEssentiaBottle);
|
||||||
output.stackSize = 8;
|
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[]
|
GameRegistry.addRecipe(output, new Object[]
|
||||||
{
|
{
|
||||||
" W ", "W W", " W ",
|
" C ", "GPG", "PGP",
|
||||||
'W', ItemManager.wax
|
'G', ItemManager.wax,
|
||||||
|
'C', Item.clay,
|
||||||
|
'P', Block.thinGlass
|
||||||
});
|
});
|
||||||
|
|
||||||
output = ItemManager.fragment.copy();
|
output = new ItemStack(tcEssentiaBottle);
|
||||||
GameRegistry.addShapelessRecipe(output, new Object[]
|
output.stackSize = 4;
|
||||||
{
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
" W ", "W W", " W ",
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
'W', ItemManager.wax
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
});
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT)
|
|
||||||
|
// Magic capsules
|
||||||
|
output = new ItemStack(magicCapsule); output.stackSize = 4;
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"WWW",
|
||||||
|
'W', ItemManager.wax.getStackForType(WaxType.MAGIC)
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(tcMiscResource, 1, TCMiscResource.KNOWLEDGE_FRAGMENT.ordinal());
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"FF", "FF",
|
||||||
|
'F', ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT)
|
||||||
|
});
|
||||||
|
|
||||||
|
// T1 Thaumaturge's backpack
|
||||||
|
GameRegistry.addRecipe(new ItemStack(ItemManager.thaumaturgeBackpackT1), new Object[] {
|
||||||
|
"SWS", "NCN", "SWS",
|
||||||
|
'S', Item.silk,
|
||||||
|
'W', Block.cloth,
|
||||||
|
'N', Item.goldNugget,
|
||||||
|
'C', Block.chest
|
||||||
|
});
|
||||||
|
|
||||||
|
// Concentrated Fertilizer -> Forestry fertilizer
|
||||||
|
inputStack = ItemManager.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
|
||||||
|
output = ItemInterface.getItem("fertilizerCompound");
|
||||||
|
output.stackSize = 6;
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
" S ", " F ", " S ",
|
||||||
|
'F', inputStack,
|
||||||
|
'S', Block.sand
|
||||||
|
});
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
" ", "SFS", " ",
|
||||||
|
'F', inputStack,
|
||||||
|
'S', Block.sand
|
||||||
|
});
|
||||||
|
|
||||||
|
output = output.copy();
|
||||||
|
output.stackSize = 12;
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"aaa", "aFa", "aaa",
|
||||||
|
'F', inputStack,
|
||||||
|
'a', ItemInterface.getItem("ash")
|
||||||
|
});
|
||||||
|
|
||||||
|
// "bottling" Intellect drops
|
||||||
|
GameRegistry.addRecipe(new ItemStack(Item.expBottle), new Object[] {
|
||||||
|
"DDD", "DBD", "DDD",
|
||||||
|
'D', ItemManager.drops.getStackForType(DropType.INTELLECT),
|
||||||
|
'B', Item.glassBottle
|
||||||
|
});
|
||||||
|
|
||||||
|
// "bottling" Crystal aspects.
|
||||||
|
for (EnumTag tag : EnumTag.values())
|
||||||
|
{
|
||||||
|
if (tag != EnumTag.UNKNOWN)
|
||||||
|
{
|
||||||
|
output = new ItemStack(ItemManager.tcEssentiaBottle, 1, tag.id + 1);
|
||||||
|
GameRegistry.addRecipe(output, new Object[] {
|
||||||
|
"ccc", "cxc", "ccc",
|
||||||
|
'c', new ItemStack(ItemManager.solidFlux, 1, tag.id),
|
||||||
|
'x', ItemManager.tcEssentiaBottle
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 20 is the 'average' time to centrifuge a comb.
|
// 20 is the 'average' time to centrifuge a comb.
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OCCULT),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OCCULT),
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||||
new int[] { 100, 60 });
|
new int[] { 100, 60 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OTHERWORLDLY),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OTHERWORLDLY),
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||||
new int[] { 60, 100 });
|
new int[] { 50, 20, 100 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.PAPERY),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.PAPERY),
|
||||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
|
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
|
||||||
new int[] { 80, 20, 5 });
|
new int[] { 80, 20, 5 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.STARK),
|
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 ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.STARK) },
|
||||||
new int[] { 10, 95, 5 });
|
new int[] { 10, 95, 15 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.AIRY),
|
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.AIRY),
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.AIR) },
|
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.AIR) },
|
||||||
new int[] { 100, 65 });
|
new int[] { 100, 65 });
|
||||||
@@ -101,27 +243,135 @@ public class ItemManager
|
|||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.EARTHY),
|
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.EARTHY),
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.EARTH) },
|
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.EARTH) },
|
||||||
new int[] { 100, 65 });
|
new int[] { 100, 65 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.STARK),
|
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.INFUSED),
|
||||||
new ItemStack[] {ItemManager.dullShard},
|
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.INFUSED) },
|
||||||
new int[] { 25 });
|
new int[] { 100, 50, 65 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.AIR),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.INTELLECT),
|
||||||
new ItemStack[] {ItemManager.airShard},
|
new ItemStack[] { ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeydew"), ItemManager.drops.getStackForType(DropType.INTELLECT) },
|
||||||
new int[] { 25 });
|
new int[] { 90, 40, 2 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.FIRE),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.SKULKING),
|
||||||
new ItemStack[] {ItemManager.fireShard},
|
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemInterface.getItem("propolis"), ItemInterface.getItem("honeydew") },
|
||||||
new int[] { 25 });
|
new int[] { 90, 20, 35 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.WATER),
|
|
||||||
new ItemStack[] {ItemManager.waterShard},
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.STARK),
|
||||||
new int[] { 25 });
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.DULL.ordinal())},
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.EARTH),
|
new int[] { 13 });
|
||||||
new ItemStack[] {ItemManager.earthShard},
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.AIR),
|
||||||
new int[] { 25 });
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.AIR.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.FIRE),
|
||||||
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.FIRE.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.WATER),
|
||||||
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.WATER.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.EARTH),
|
||||||
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.EARTH.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.INFUSED),
|
||||||
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.MAGIC.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
|
||||||
// Squeezer recipes
|
// Squeezer recipes
|
||||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
||||||
new LiquidStack(Block.lavaStill, 250), ItemManager.fireShard, 15);
|
new LiquidStack(Block.lavaStill, 250),
|
||||||
|
new ItemStack(tcShard, 1, TCShardType.FIRE.ordinal()), 18);
|
||||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.WATER) },
|
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.WATER) },
|
||||||
new LiquidStack(Block.waterStill, 1000), ItemManager.waterShard, 25);
|
new LiquidStack(Block.waterStill, 500),
|
||||||
|
new ItemStack(tcShard, 1, TCShardType.WATER.ordinal()), 18);
|
||||||
|
|
||||||
|
// Carpenter recipes
|
||||||
|
inputStack = ItemInterface.getItem("craftingMaterial");
|
||||||
|
inputStack.setItemDamage(3); // Set to Silk Mesh
|
||||||
|
output = new ItemStack(thaumaturgeBackpackT2);
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(200, new LiquidStack(Block.waterStill.blockID, 1000), null, output, new Object[] {
|
||||||
|
"WXW", "WTW", "WWW",
|
||||||
|
'X', Item.diamond,
|
||||||
|
'W', inputStack,
|
||||||
|
'T', new ItemStack(ItemManager.thaumaturgeBackpackT1)
|
||||||
|
});
|
||||||
|
|
||||||
|
output = BlockInterface.getBlock("candle");
|
||||||
|
output.stackSize = 24;
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||||
|
" S ", "WWW", "WWW",
|
||||||
|
'W', ItemManager.wax,
|
||||||
|
'S', Item.silk
|
||||||
|
});
|
||||||
|
|
||||||
|
output = BlockInterface.getBlock("candle");
|
||||||
|
output.stackSize = 6;
|
||||||
|
inputStack = ItemInterface.getItem("craftingMaterial");
|
||||||
|
inputStack.setItemDamage(2); // Set to Silk Wisp
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||||
|
"WSW",
|
||||||
|
'W', ItemManager.wax,
|
||||||
|
'S', inputStack
|
||||||
|
});
|
||||||
|
|
||||||
|
output = ItemManager.miscResources.getStackForType(ResourceType.AROMATIC_LUMP, 2);
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||||
|
" P ", "JDJ", " P ",
|
||||||
|
'P', ItemInterface.getItem("pollen"),
|
||||||
|
'J', ItemInterface.getItem("royalJelly"),
|
||||||
|
'D', ItemManager.drops.getStackForType(DropType.ENCHANTED)
|
||||||
|
});
|
||||||
|
|
||||||
|
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(ItemInterface.getItem("liquidHoney").itemID, 1000), null, output, new Object[] {
|
||||||
|
" J ", "PDP", " J ",
|
||||||
|
'P', ItemInterface.getItem("pollen"),
|
||||||
|
'J', ItemInterface.getItem("royalJelly"),
|
||||||
|
'D', ItemManager.drops.getStackForType(DropType.ENCHANTED)
|
||||||
|
});
|
||||||
|
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
|
||||||
|
BeeManager.inducers.put(output, 80);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void postInit()
|
||||||
|
{
|
||||||
|
registerLiquidContainer(ItemManager.magicCapsule);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void registerLiquidContainer(ItemCapsule baseCapsule)
|
||||||
|
{
|
||||||
|
// Forestry liquids aren't registered until PostInit, that's why we wait until now to register them.
|
||||||
|
ItemStack empty = new ItemStack(baseCapsule, 1, 0);
|
||||||
|
ItemStack filled;
|
||||||
|
LiquidStack liquid = null;
|
||||||
|
|
||||||
|
for (LiquidType l : LiquidType.values())
|
||||||
|
{
|
||||||
|
switch (l)
|
||||||
|
{
|
||||||
|
case EMPTY:
|
||||||
|
liquid = null;
|
||||||
|
break;
|
||||||
|
case WATER:
|
||||||
|
liquid = new LiquidStack(Block.waterStill, baseCapsule.getType().capacity);
|
||||||
|
break;
|
||||||
|
case LAVA:
|
||||||
|
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
liquid = LiquidDictionary.getLiquid(l.liquidID, baseCapsule.getType().capacity);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (liquid != null)
|
||||||
|
{
|
||||||
|
filled = new ItemStack(baseCapsule, 1, l.ordinal());
|
||||||
|
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
|
||||||
|
|
||||||
|
// Register with Squeezer/Bottler
|
||||||
|
RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled);
|
||||||
|
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] {filled} , liquid,
|
||||||
|
ItemManager.wax.getStackForType(WaxType.MAGIC), 20);
|
||||||
|
l.available = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Empty will be set to unavailable. Obviously, it always is.
|
||||||
|
LiquidType.EMPTY.available = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -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));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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,20 +57,27 @@ 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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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));
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
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 thaumcraft.api.EnumTag;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
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 "Crystalized " + EnumTag.get(stack.getItemDamage()).name + " Aspect";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
|
{
|
||||||
|
return EnumTag.get(stack.getItemDamage()).color;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -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));
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
public enum CapsuleType
|
||||||
|
{
|
||||||
|
MAGIC("Magic Capsule", 2000, 0),
|
||||||
|
;
|
||||||
|
public 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
public enum CombType
|
||||||
|
{
|
||||||
|
OCCULT("Occult Comb", 0x6e1c6d, 0xff8fff, true),
|
||||||
|
OTHERWORLDLY("Otherworldy Comb", 0x000056, 0x765cc1, true),
|
||||||
|
PAPERY("Papery Comb", 0x503900, 0xbd9a30, true),
|
||||||
|
STARK("Stark Comb", 0xB0B0BC, 0x6e6e79, false),
|
||||||
|
AIRY("Airy Comb", 0xffff7e, 0x717600, false),
|
||||||
|
FIREY("Firey Comb", 0xff3C01, 0x740002, false),
|
||||||
|
WATERY("Watery Comb", 0x0090ff, 0x00308c, false),
|
||||||
|
EARTHY("Earthy Comb", 0x00a000, 0x005100, false),
|
||||||
|
INFUSED("Infused Comb", 0xaa32fc, 0x7A489E, false),
|
||||||
|
INTELLECT("Memory Comb", 0x618fff, 0xb0092e9, false),
|
||||||
|
SKULKING("Furtive Comb", 0x545454, 0xcda6cd, true),
|
||||||
|
;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public final String name;
|
||||||
|
public int[] combColour;
|
||||||
|
public boolean showInList;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
public enum DropType
|
||||||
|
{
|
||||||
|
ENCHANTED("Enchanting Drop", 0x6e1c6d, 0xff8fff),
|
||||||
|
INTELLECT("Intellect Drop", 0x25914D, 0x18E072),
|
||||||
|
;
|
||||||
|
|
||||||
|
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];
|
||||||
|
}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
|
||||||
|
public enum HiveFrameType
|
||||||
|
{
|
||||||
|
MAGIC("Magic Frame", 32, 240, 1f, 1f, 1f, 2f, 2,
|
||||||
|
null),
|
||||||
|
RESILIENT("Resilient Frame", 33, 840, 1f, 1f, 1f, 2f, 2,
|
||||||
|
new ObjectTags().add(EnumTag.ARMOR, 1)),
|
||||||
|
GENTLE("Gentle Frame", 34, 200, 1f, 0.7f, 1.5f, 1.4f, 1,
|
||||||
|
new ObjectTags().add(EnumTag.HEAL, 1).add(EnumTag.LIFE, 1)),
|
||||||
|
METABOLIC("Metabolic Frame", 35, 120, 1f, 1.8f, 1f, 1.2f, 5,
|
||||||
|
new ObjectTags().add(EnumTag.EXCHANGE, 1).add(EnumTag.MOTION, 1)),
|
||||||
|
NECROTIC("Necrotic Frame", 36, 270, 1f, 1f, 0.4f, 0.75f, 1,
|
||||||
|
new ObjectTags().add(EnumTag.DEATH, 3).add(EnumTag.POISON, 2)),
|
||||||
|
;
|
||||||
|
|
||||||
|
private HiveFrameType(String name, int icon, int damage,
|
||||||
|
float territory, float mutation, float lifespan, float production,
|
||||||
|
int auraUse, ObjectTags fluxTags)
|
||||||
|
{
|
||||||
|
this(name, icon, damage, territory, mutation, lifespan, production, 1f, false, false, false, false, auraUse, fluxTags);
|
||||||
|
}
|
||||||
|
|
||||||
|
private HiveFrameType(String name, int icon, int damage,
|
||||||
|
float territory, float mutation, float lifespan, float production, float flowering,
|
||||||
|
boolean sealed, boolean lit, boolean sunlit, boolean hellish,
|
||||||
|
int auraUse, ObjectTags fluxTags)
|
||||||
|
{
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public 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;
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
public enum LiquidType
|
||||||
|
{
|
||||||
|
// Incidentally, Item meta is the liquid ID.
|
||||||
|
|
||||||
|
// Args are: forgeLiquidID, Display Name, Icon idx
|
||||||
|
EMPTY("", "Empty", 16),
|
||||||
|
|
||||||
|
// Vanilla
|
||||||
|
WATER("water", "Water", 17),
|
||||||
|
LAVA("lava", "Lava", 18),
|
||||||
|
|
||||||
|
// Forestry
|
||||||
|
BIOMASS("biomass", "Biomass", 19),
|
||||||
|
BIOFUEL("biofuel", "Biofuel", 20),
|
||||||
|
|
||||||
|
// Buildcraft
|
||||||
|
OIL("Oil", "Oil", 21),
|
||||||
|
FUEL("Fuel", "Fuel", 22),
|
||||||
|
|
||||||
|
// More Forestry
|
||||||
|
SEEDOIL("seedoil", "Seed Oil", 23),
|
||||||
|
HONEY("honey", "Honey", 24),
|
||||||
|
JUICE("juice", "Juice", 25),
|
||||||
|
CRUSHEDICE("ice", "Crushed Ice", 26),
|
||||||
|
MILK("milk", "Milk", 27),
|
||||||
|
|
||||||
|
// ExtraBees liquids
|
||||||
|
ACID("acid", "Acid", 28),
|
||||||
|
POISON("poison", "Poison", 29),
|
||||||
|
LIQUIDNITROGEN("liquidNitrogen", "Liquid Nitrogen", 30),
|
||||||
|
DNA("liquidDNA", "Liquid DNA", 31),
|
||||||
|
|
||||||
|
// Railcraft
|
||||||
|
CREOSOTEOIL("Creosote Oil", "Creosote Oil", 32),
|
||||||
|
STEAM("Steam", "Steam", 33),
|
||||||
|
;
|
||||||
|
public String liquidID;
|
||||||
|
public String displayName;
|
||||||
|
public int iconIdx;
|
||||||
|
public boolean available = false;
|
||||||
|
|
||||||
|
private LiquidType(String l, String display, int idx)
|
||||||
|
{
|
||||||
|
this.liquidID = l;
|
||||||
|
this.displayName = display;
|
||||||
|
this.iconIdx = idx;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
public enum PollenType
|
||||||
|
{
|
||||||
|
UNUSUAL("Unusual Pollen", 0xA03059, 0xD8417B),
|
||||||
|
;
|
||||||
|
|
||||||
|
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];
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
public enum PropolisType
|
||||||
|
{
|
||||||
|
STARK("Dull Propolis", 0xBBBBBB),
|
||||||
|
AIR("Air Propolis", 0xA19E10),
|
||||||
|
FIRE("Firey Propolis", 0x95132F),
|
||||||
|
WATER("Watery Propolis", 0x1054A1),
|
||||||
|
EARTH("Earthen Propolis", 0x00a000),
|
||||||
|
INFUSED("Infused Propolis", 0xaa32fc),
|
||||||
|
;
|
||||||
|
|
||||||
|
private PropolisType(String pName, int overlayColour)
|
||||||
|
{
|
||||||
|
this.name = pName;
|
||||||
|
this.colour = overlayColour;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String name;
|
||||||
|
public int colour;
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
public enum ResourceType
|
||||||
|
{
|
||||||
|
LORE_FRAGMENT("Lore Fragment", 2, true),
|
||||||
|
AROMATIC_LUMP("Aromatic Lump", 3, true),
|
||||||
|
EXTENDED_FERTILIZER("Concentrated Compound", 4, true),
|
||||||
|
|
||||||
|
// Dummy items for Thaumanomicon research icons.
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
public String name;
|
||||||
|
public int iconIdx;
|
||||||
|
public boolean showInList;
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package thaumicbees.item.types;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
@@ -16,30 +16,31 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
@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.getInstanceConfig().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,13 @@ 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_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() { }
|
||||||
|
|
||||||
|
|||||||
@@ -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,11 +1,14 @@
|
|||||||
package thaumicbees.main;
|
package thaumicbees.main;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.SidedProxy;
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
import cpw.mods.fml.common.event.*;
|
import cpw.mods.fml.common.event.*;
|
||||||
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
import forestry.api.apiculture.EnumBeeType;
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
import forestry.api.core.ItemInterface;
|
import forestry.api.core.ItemInterface;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
@@ -18,12 +21,13 @@ import net.minecraftforge.event.EventBus;
|
|||||||
import net.minecraftforge.event.ForgeSubscribe;
|
import net.minecraftforge.event.ForgeSubscribe;
|
||||||
import net.minecraftforge.event.world.WorldEvent;
|
import net.minecraftforge.event.world.WorldEvent;
|
||||||
import thaumcraft.api.*;
|
import thaumcraft.api.*;
|
||||||
import thaumicbees.bees.ThaumicBeesPlugin;
|
import thaumicbees.bees.TBBeeManager;
|
||||||
import thaumicbees.bees.genetics.BeeSpecies;
|
import thaumicbees.bees.genetics.BeeSpecies;
|
||||||
import thaumicbees.block.BlockManager;
|
import thaumicbees.block.BlockManager;
|
||||||
import thaumicbees.item.ItemComb;
|
import thaumicbees.item.ItemComb;
|
||||||
import thaumicbees.item.ItemWax;
|
import thaumicbees.item.ItemWax;
|
||||||
import thaumicbees.item.ItemManager;
|
import thaumicbees.item.ItemManager;
|
||||||
|
import thaumicbees.thaumcraft.ThaumcraftCompat;
|
||||||
|
|
||||||
@Mod(
|
@Mod(
|
||||||
modid="ThaumicBees",
|
modid="ThaumicBees",
|
||||||
@@ -41,56 +45,96 @@ 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 Configuration config;
|
||||||
public ConfigFlags configFlags;
|
private ThaumicBeesConfiguration modConfig;
|
||||||
|
private TBBeeManager plugin;
|
||||||
|
|
||||||
public ThaumicBees()
|
public ThaumicBees()
|
||||||
{
|
{
|
||||||
ThaumcraftRecipesAdded = false;
|
this.modConfig = new ThaumicBeesConfiguration();
|
||||||
this.configFlags = new ConfigFlags();
|
|
||||||
|
this.modConfig.ThaumcraftRecipesAdded = false;
|
||||||
|
this.plugin = new TBBeeManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.PreInit
|
@Mod.PreInit
|
||||||
public void preInit(FMLPreInitializationEvent event)
|
public void preInit(FMLPreInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
this.configsPath = event.getModConfigurationDirectory().getAbsolutePath();
|
||||||
this.config = new Configuration(event.getSuggestedConfigurationFile());
|
this.config = new Configuration(event.getSuggestedConfigurationFile());
|
||||||
|
|
||||||
|
this.config.load();
|
||||||
|
// Allow us to set up some extra stuff.
|
||||||
|
this.modConfig.doMiscConfig(this.config);
|
||||||
|
|
||||||
|
ThaumcraftCompat.registerResearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.Init
|
@Mod.Init
|
||||||
public void init(FMLInitializationEvent event)
|
public void init(FMLInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
// Check on ExtraBees & enable content. =D
|
||||||
|
this.modConfig.ExtraBeesInstalled = cpw.mods.fml.common.Loader.isModLoaded("ExtraBees");
|
||||||
|
|
||||||
// Give ThaumcraftCompat a chance to set itself up.
|
// Give ThaumcraftCompat a chance to set itself up.
|
||||||
ThaumcraftCompat.init();
|
ThaumcraftCompat.parseThaumcraftConfig(configsPath);
|
||||||
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
|
|
||||||
proxy.FORESTRY_GFX_ITEMS = ItemInterface.getItem("beeComb").getItem().getTextureFile();
|
|
||||||
|
|
||||||
this.config.load();
|
|
||||||
BlockManager.setupBlocks(this.config);
|
BlockManager.setupBlocks(this.config);
|
||||||
ItemManager.setupItems(this.config);
|
ItemManager.setupItems(this.config);
|
||||||
this.config.save();
|
this.config.save();
|
||||||
|
|
||||||
ItemManager.setupCrafting();
|
|
||||||
|
|
||||||
ThaumcraftCompat.setupResearch();
|
|
||||||
ThaumcraftCompat.setupAspects();
|
// Vanilla & Forestry mechanics setup
|
||||||
|
ItemManager.setupCrafting();
|
||||||
|
// Thaumcraft-specific crafting (Infusions, & Vis-needing)
|
||||||
|
ThaumcraftCompat.setupCrafting();
|
||||||
|
|
||||||
|
ThaumcraftCompat.setupBackpacks();
|
||||||
|
ThaumcraftCompat.setupItemAspects();
|
||||||
|
|
||||||
|
plugin.doInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.PostInit
|
@Mod.PostInit
|
||||||
public void postInit(FMLPostInitializationEvent event)
|
public void postInit(FMLPostInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
// Item Manager has a couple tasks left to it at this point...
|
||||||
|
ItemManager.postInit();
|
||||||
|
|
||||||
|
// Forestry has init'd by this point.
|
||||||
MinecraftForge.EVENT_BUS.register(this);
|
MinecraftForge.EVENT_BUS.register(this);
|
||||||
|
|
||||||
|
plugin.postInit();
|
||||||
|
|
||||||
|
ThaumcraftCompat.setupResearch();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ForgeSubscribe
|
@ForgeSubscribe
|
||||||
public void worldLoad(net.minecraftforge.event.world.WorldEvent.Load event)
|
public void worldLoad(net.minecraftforge.event.world.WorldEvent.Load event)
|
||||||
{
|
{
|
||||||
if (!ThaumcraftRecipesAdded)
|
if (!this.modConfig.ThaumcraftRecipesAdded)
|
||||||
{
|
{
|
||||||
ThaumicBeesPlugin.setupBeeInfusions(event.world);
|
ThaumcraftCompat.setupBeeInfusions(event.world);
|
||||||
ThaumcraftRecipesAdded = true;
|
this.modConfig.ThaumcraftRecipesAdded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ThaumicBeesConfiguration getInstanceConfig()
|
||||||
|
{
|
||||||
|
return object.modConfig;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package thaumicbees.main;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.Configuration;
|
||||||
|
import net.minecraftforge.common.Property;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class to hold some data related to mod state & functions.
|
||||||
|
* @author MysteriousAges
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ThaumicBeesConfiguration
|
||||||
|
{
|
||||||
|
public boolean DrawParticleEffects;
|
||||||
|
public boolean ThaumcraftRecipesAdded;
|
||||||
|
public boolean ExtraBeesInstalled;
|
||||||
|
public boolean AddThaumcraftItemsToBackpacks;
|
||||||
|
|
||||||
|
public String ThaumaturgeExtraItems;
|
||||||
|
|
||||||
|
public void doMiscConfig(Configuration cfg)
|
||||||
|
{
|
||||||
|
Property p;
|
||||||
|
|
||||||
|
p = cfg.get("general", "backpack.thaumaturge.additionalItems", "");
|
||||||
|
p.comment = "Add additional items to the Thaumaturge's Backpack." +
|
||||||
|
"\n Format is the same as Forestry's: id:meta;id;id:meta (etc)";
|
||||||
|
this.ThaumaturgeExtraItems = p.value;
|
||||||
|
|
||||||
|
p = cfg.get("general", "backpack.forestry.addThaumcraftItems", true);
|
||||||
|
p.comment = "Set to true if you want ThaumicBees to add several Thaumcraft blocks & items to Forestry backpacks." +
|
||||||
|
"\n Set to false to disable.";
|
||||||
|
this.AddThaumcraftItemsToBackpacks = p.getBoolean(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -3,10 +3,12 @@ package thaumicbees.main;
|
|||||||
public class VersionInfo
|
public class VersionInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
public static final String Version = "@VERSION@";
|
public static final String Version = "@MODVERSION@";
|
||||||
public static final String MCVersion = "@MCVERSION@";
|
public static final String MCVersion = "@MCVERSION@";
|
||||||
public static final String Build = "@BUILD_NUMBER@";
|
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,)";
|
public static final String Logo = "/gfx/thaumicbees/logo.png";
|
||||||
|
|
||||||
|
public static final String Depends = "required-after:Forestry;required-after:Thaumcraft@[3.0.2b,);after:ExtraBees";
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,158 @@
|
|||||||
|
package thaumicbees.thaumcraft;
|
||||||
|
|
||||||
|
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,6 @@
|
|||||||
|
package thaumicbees.thaumcraft;
|
||||||
|
|
||||||
|
public enum TCBlockPlant
|
||||||
|
{
|
||||||
|
GREATWOOD_SAPLING, SILVERWOOD_SAPLING, SILVERLEAF, CINDERPEARL;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package thaumicbees.thaumcraft;
|
||||||
|
|
||||||
|
public enum TCEntity
|
||||||
|
{
|
||||||
|
BRAINY_ZOMBIE("entBrainyZombie", "EntityBrainyZombie"),
|
||||||
|
GIANT_BRAINY_ZOMBIE("entGiantBrainyZombie", "EntityGiantBrainyZombie"),
|
||||||
|
WISP("entWisp", "EntityWisp"),
|
||||||
|
FIREBAT("entFirebat", "EntityFireBat"),
|
||||||
|
;
|
||||||
|
|
||||||
|
private static String packageName = "thaumcraft.common.entities.monster.";
|
||||||
|
|
||||||
|
public String entityID;
|
||||||
|
private String className;
|
||||||
|
|
||||||
|
private TCEntity(String id, String clazz)
|
||||||
|
{
|
||||||
|
this.entityID = id;
|
||||||
|
this.className = clazz;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClassName()
|
||||||
|
{
|
||||||
|
return packageName + this.className;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package thaumicbees.thaumcraft;
|
||||||
|
|
||||||
|
public enum TCMiscResource
|
||||||
|
{
|
||||||
|
ALUMENTUM, NITOR, THAUMIUM, QUICKSILVER, MAGIC_TALLOW,
|
||||||
|
ZOMBIE_BRAIN, AMBER, ENCHANTED_FABRIC, FLUX_FILTER, KNOWLEDGE_FRAGMENT;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package thaumicbees.thaumcraft;
|
||||||
|
|
||||||
|
public enum TCShardType
|
||||||
|
{
|
||||||
|
AIR, FIRE, WATER, EARTH, MAGIC, DULL;
|
||||||
|
}
|
||||||
@@ -0,0 +1,470 @@
|
|||||||
|
package thaumicbees.thaumcraft;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import thaumcraft.api.research.ResearchItem;
|
||||||
|
import thaumcraft.api.research.ResearchList;
|
||||||
|
import thaumicbees.bees.genetics.Allele;
|
||||||
|
import thaumicbees.bees.genetics.BeeGenomeManager;
|
||||||
|
import thaumicbees.block.BlockManager;
|
||||||
|
import thaumicbees.item.ItemComb;
|
||||||
|
import thaumicbees.item.ItemManager;
|
||||||
|
import thaumicbees.item.ItemMiscResources;
|
||||||
|
import thaumicbees.item.types.CombType;
|
||||||
|
import thaumicbees.item.types.DropType;
|
||||||
|
import thaumicbees.item.types.LiquidType;
|
||||||
|
import thaumicbees.item.types.ResourceType;
|
||||||
|
import thaumicbees.item.types.WaxType;
|
||||||
|
import thaumicbees.main.CommonProxy;
|
||||||
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
import thaumicbees.storage.BackpackDefinition;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
|
import forestry.api.apiculture.EnumBeeChromosome;
|
||||||
|
import forestry.api.apiculture.EnumBeeType;
|
||||||
|
import forestry.api.core.BlockInterface;
|
||||||
|
import forestry.api.core.ItemInterface;
|
||||||
|
import forestry.api.storage.BackpackManager;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemBlock;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.Property;
|
||||||
|
import net.minecraftforge.common.Configuration;
|
||||||
|
|
||||||
|
public class ThaumcraftCompat
|
||||||
|
{
|
||||||
|
|
||||||
|
public static void parseThaumcraftConfig(String configPath)
|
||||||
|
{
|
||||||
|
Configuration tcConfig = new Configuration(new File(configPath + "/Thaumcraft.cfg"));
|
||||||
|
Property p;
|
||||||
|
|
||||||
|
tcConfig.load();
|
||||||
|
|
||||||
|
// Load blocks out of the Thaumcraft config to get their IDs;
|
||||||
|
p = tcConfig.getBlock("BlockCustomPlant", 0);
|
||||||
|
BlockManager.tcPlant = Block.blocksList[p.getInt()];
|
||||||
|
p = tcConfig.getBlock("BlockCandle", 0);
|
||||||
|
BlockManager.tcCandle = Block.blocksList[ p.getInt()];
|
||||||
|
p = tcConfig.getBlock("BlockCrystal", 0);
|
||||||
|
BlockManager.tcCrystal = Block.blocksList[p.getInt()];
|
||||||
|
p = tcConfig.getBlock("BlockMarker", 0);
|
||||||
|
BlockManager.tcMarker = Block.blocksList[p.getInt()];
|
||||||
|
p = tcConfig.getBlock("BlockJar", 0);
|
||||||
|
BlockManager.tcJar = Block.blocksList[p.getInt()];
|
||||||
|
p = tcConfig.getBlock("BlockMagicalLeaves", 0);
|
||||||
|
BlockManager.tcLeaf = Block.blocksList[p.getInt()];
|
||||||
|
p = tcConfig.getBlock("BlockMagicalLog", 0);
|
||||||
|
BlockManager.tcLog = Block.blocksList[p.getInt()];
|
||||||
|
p = tcConfig.getBlock("BlockSecure", 0);
|
||||||
|
BlockManager.tcWarded = Block.blocksList[p.getInt()];
|
||||||
|
|
||||||
|
// Load items out of the Thaumcraft config to get their IDs.
|
||||||
|
p = tcConfig.getItem("ItemEssence", 0);
|
||||||
|
ItemManager.tcEssentiaBottle = Item.itemsList[p.getInt() + 256];
|
||||||
|
p = tcConfig.getItem("ItemResource", 0);
|
||||||
|
ItemManager.tcMiscResource = Item.itemsList[p.getInt() + 256];
|
||||||
|
p = tcConfig.getItem("ItemShard", 0);
|
||||||
|
ItemManager.tcShard = Item.itemsList[p.getInt() + 256];
|
||||||
|
p = tcConfig.getItem("BlockJarFilledItem", 0);
|
||||||
|
ItemManager.tcFilledJar = Item.itemsList[p.getInt() + 256];
|
||||||
|
p = tcConfig.getItem("ItemGolemPlacer", 0);
|
||||||
|
ItemManager.tcGolem = Item.itemsList[p.getInt() + 256];
|
||||||
|
p = tcConfig.getItem("ItemEssence", 0);
|
||||||
|
ItemManager.tcWispEssence = Item.itemsList[p.getInt() + 256];
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupBackpacks()
|
||||||
|
{
|
||||||
|
if (ThaumicBees.getInstanceConfig().AddThaumcraftItemsToBackpacks)
|
||||||
|
{
|
||||||
|
// Add all shards and Thaumium to miner's backpack
|
||||||
|
String ids = ItemManager.tcShard.itemID + ":" + -1 + ";"
|
||||||
|
+ ItemManager.tcMiscResource.itemID + ":" + TCMiscResource.THAUMIUM.ordinal();
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "miner@" + ids);
|
||||||
|
|
||||||
|
// All resources go into Thaumaturge's backpack
|
||||||
|
ids = ItemManager.tcMiscResource.itemID + ":" + -1 + ";"
|
||||||
|
+ ItemManager.tcShard.itemID + ":" + -1 + ";"
|
||||||
|
+ ItemManager.tcFilledJar.itemID + ":" + -1 + ";"
|
||||||
|
+ BlockManager.tcCrystal.blockID + ":" + -1 + ";"
|
||||||
|
+ BlockManager.tcJar.blockID + ":" + -1 + ";"
|
||||||
|
+ ItemManager.tcGolem.itemID + ":" + -1;
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ids);
|
||||||
|
|
||||||
|
// Add some plants & saplings to Forester's
|
||||||
|
ids = BlockManager.tcPlant.blockID + ":" + "-1" + ";"
|
||||||
|
+ BlockManager.tcLeaf.blockID + ":" + -1 + ";"
|
||||||
|
+ BlockManager.tcLog.blockID + ":" + "-1";
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "forester@" + ids);
|
||||||
|
|
||||||
|
// Add Wisp & brains to Hunter's
|
||||||
|
ids = ItemManager.tcWispEssence.itemID + ":" + -1 + ";"
|
||||||
|
+ ItemManager.tcMiscResource.itemID + ":" + TCMiscResource.ZOMBIE_BRAIN.ordinal();
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "hunter@" + ids);
|
||||||
|
|
||||||
|
// Add Marker, warded stone, candle to builder
|
||||||
|
ids = BlockManager.tcCandle.blockID + ":" + -1 + ";"
|
||||||
|
+ BlockManager.tcMarker.blockID + ":" + -1 + ";"
|
||||||
|
+ BlockManager.tcWarded.blockID + ":" + -1;
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "builder@" + ids);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupItemAspects()
|
||||||
|
{
|
||||||
|
ObjectTags tags;
|
||||||
|
ItemStack itemStack;
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.wax.itemID, WaxType.MAGIC.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.drops.itemID, DropType.ENCHANTED.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.drops.itemID, DropType.INTELLECT.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.miscResources.itemID, ResourceType.LORE_FRAGMENT.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 1).add(EnumTag.INSECT, 2).add(EnumTag.CONTROL, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.STARK.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.AIRY.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.FIREY.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.WATERY.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.EARTHY.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, CombType.INFUSED.ordinal(), tags);
|
||||||
|
|
||||||
|
// Tagging capsules.
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, -1, tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.VOID, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, 0, tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.WATER, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, LiquidType.WATER.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.FIRE, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, LiquidType.LAVA.ordinal(), tags);
|
||||||
|
|
||||||
|
for (EnumTag tag : EnumTag.values())
|
||||||
|
{
|
||||||
|
if (tag == EnumTag.UNKNOWN)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
tags = new ObjectTags().add(tag, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.solidFlux.itemID, tag.id, tags);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Tag some Forestry stuff.
|
||||||
|
// Pulsating propolis
|
||||||
|
itemStack = ItemInterface.getItem("propolis");
|
||||||
|
tags = new ObjectTags().add(EnumTag.ELDRITCH, 1).add(EnumTag.CONTROL, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, 2 , tags);
|
||||||
|
itemStack = ItemInterface.getItem("craftingMaterial");
|
||||||
|
// 0: pulsatingDust
|
||||||
|
// 1: "pulsatingMesh";
|
||||||
|
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, 1, tags);
|
||||||
|
// 2: "silkWisp";
|
||||||
|
// 3: "wovenSilk";
|
||||||
|
// 4: "dissipationCharge";
|
||||||
|
// 5: "iceShard";
|
||||||
|
tags = new ObjectTags().add(EnumTag.COLD, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, 5, tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("apatite");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CRYSTAL, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("impregnatedCasing");
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 58).add(EnumTag.PLANT, 8);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("stickImpregnated");
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 8).add(EnumTag.PLANT, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("peat");
|
||||||
|
tags = new ObjectTags().add(EnumTag.POWER, 2).add(EnumTag.PLANT, 1).add(EnumTag.EARTH, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("ash");
|
||||||
|
tags = new ObjectTags().add(EnumTag.DESTRUCTION, 1).add(EnumTag.EXCHANGE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("honeyDrop");
|
||||||
|
tags = new ObjectTags().add(EnumTag.EXCHANGE, 2).add(EnumTag.LIFE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("beeswax");
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.CONTROL, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("refractoryWax");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FIRE, 3);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("phosphor");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FIRE, 2).add(EnumTag.DESTRUCTION, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("waxCapsule");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("waxCapsuleWater");
|
||||||
|
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("refractoryEmpty");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("refractoryWater");
|
||||||
|
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("refractoryLava");
|
||||||
|
tags = new ObjectTags().add(EnumTag.VOID, 1).add(EnumTag.FIRE, 7).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("canEmpty");
|
||||||
|
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("canWater");
|
||||||
|
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemInterface.getItem("canLava");
|
||||||
|
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.FIRE, 6).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("beeComb");
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // ALL combs plox.
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, -1, tags);
|
||||||
|
|
||||||
|
itemStack = ItemManager.combs.getStackForType(CombType.OCCULT);
|
||||||
|
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2).add(EnumTag.MAGIC, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
itemStack = ItemManager.combs.getStackForType(CombType.STARK);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||||
|
|
||||||
|
itemStack = ItemInterface.getItem("ambrosia");
|
||||||
|
tags = new ObjectTags().add(EnumTag.LIFE, 2).add(EnumTag.HEAL, 4);
|
||||||
|
|
||||||
|
// Forestry's wood
|
||||||
|
itemStack = BlockInterface.getBlock("log1");
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 8);
|
||||||
|
ThaumcraftApi.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.
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupResearch()
|
||||||
|
{
|
||||||
|
ObjectTags tags;
|
||||||
|
|
||||||
|
ResearchItem startNode = new ResearchItem("TBSTARTNODE", null, 10, 0, ItemManager.miscResources.getStackForType(ResourceType.RESEARCH_StartNode))
|
||||||
|
.setAutoUnlock()
|
||||||
|
.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, ItemManager.miscResources.getStackForType(ResourceType.RESEARCH_BeeInfusion))
|
||||||
|
.setParents(starkHint, ResearchList.getResearch("UTFT")).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.WOOD, 10).add(EnumTag.TOOL, 6).add(EnumTag.INSECT, 15).add(EnumTag.BEAST, 2)
|
||||||
|
.add(EnumTag.MAGIC, 5);
|
||||||
|
ResearchItem magicFrame = new ResearchItem("HIVEFRAME", tags, 10, -2, ItemManager.hiveFrameMagic)
|
||||||
|
.setParents(startNode)
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6)
|
||||||
|
.add(EnumTag.MAGIC, 8);
|
||||||
|
ResearchItem magicFrame2 = new ResearchItem("HIVEFRAME2", tags, 8, -2, ItemManager.hiveFrameResilient)
|
||||||
|
.setParents(magicFrame).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 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, ItemManager.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, ItemManager.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, ItemManager.hiveFrameNecrotic)
|
||||||
|
.setParents(magicFrame).setHidden()
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
/*ItemStack iconStack = BlockInterface.getBlock("soil");
|
||||||
|
tags = new ObjectTags().add(EnumTag.EARTH, 10).add(EnumTag.WOOD, 4);
|
||||||
|
ResearchItem humus = new ResearchItem("HUMUS", tags, 9, -1, iconStack)
|
||||||
|
.setParents(startNode)
|
||||||
|
.registerResearchItem();
|
||||||
|
|
||||||
|
iconStack = BlockInterface.getBlock("soil");
|
||||||
|
iconStack.setItemDamage(1);
|
||||||
|
tags = new ObjectTags().add(EnumTag.EARTH, 10).add(EnumTag.WATER, 4).add(EnumTag.CROP, 4);
|
||||||
|
ResearchItem bogEarth = new ResearchItem("BOGEARTH", tags, 9, -1, iconStack)
|
||||||
|
.setParents(startNode)
|
||||||
|
.registerResearchItem();*/
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupCrafting()
|
||||||
|
{
|
||||||
|
ItemStack output = ItemManager.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
|
||||||
|
ItemStack inputA = ItemInterface.getItem("apatite");
|
||||||
|
ObjectTags tags = (new ObjectTags()).add(EnumTag.CROP, 12);
|
||||||
|
output.stackSize = 2;
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("FERTILIZER", "FERTILIZER", 5, tags, output, new Object[] {
|
||||||
|
inputA
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(ItemManager.hiveFrameMagic);
|
||||||
|
inputA = ItemInterface.getItem("frameUntreated");
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8);
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAME", "FRAMEMAGIC", 50, tags, output, new Object[] {
|
||||||
|
inputA
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(ItemManager.hiveFrameResilient);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 12).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12);
|
||||||
|
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAME2", "FRAMERESILIENT", 50, tags, output, new Object[] {
|
||||||
|
" i ", "ifi", " i ",
|
||||||
|
'f', ItemManager.hiveFrameMagic,
|
||||||
|
'i', Item.ingotIron
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(ItemManager.hiveFrameGentle);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.HEAL, 12);
|
||||||
|
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMEGENTLE", "FRAMEGENTLE", 50, tags, output, new Object[] {
|
||||||
|
"www", "wFw", "www",
|
||||||
|
'F', inputA,
|
||||||
|
'w', ItemInterface.getItem("beeswax")
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(ItemManager.hiveFrameMetabolic);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.LIFE, 8).add(EnumTag.MOTION, 8)
|
||||||
|
.add(EnumTag.EXCHANGE, 8);
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("HIVEFRAMEMETA", "FRAMEMETABOLIC", 50, tags, output, new Object[] {
|
||||||
|
Item.magmaCream,
|
||||||
|
inputA
|
||||||
|
});
|
||||||
|
|
||||||
|
output = new ItemStack(ItemManager.hiveFrameNecrotic);
|
||||||
|
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.EXCHANGE, 12).add(EnumTag.DEATH, 10)
|
||||||
|
.add(EnumTag.POISON, 5);
|
||||||
|
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMENECRO", "FRAMENECROTIC", 50, tags, output, new Object[] {
|
||||||
|
" S ", "SxS", " S ",
|
||||||
|
'S', Item.rottenFlesh,
|
||||||
|
'x', inputA
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setupBeeInfusions(World world)
|
||||||
|
{
|
||||||
|
ItemStack drone = BeeGenomeManager.getBeeNBTForSpecies(Allele.Stark, EnumBeeType.DRONE);
|
||||||
|
ItemStack princess = BeeGenomeManager.getBeeNBTForSpecies(Allele.Stark, EnumBeeType.PRINCESS);
|
||||||
|
ItemStack airDrone = Allele.Air.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
|
ItemStack airPrincess = Allele.Air.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
|
ItemStack waterDrone = Allele.Water.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
|
ItemStack waterPrincess = Allele.Water.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
|
ItemStack earthDrone = Allele.Earth.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
|
ItemStack earthPrincess = Allele.Earth.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
|
ItemStack fireDrone = Allele.Fire.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
|
ItemStack firePrincess = Allele.Fire.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
|
ItemStack magicDrone = Allele.Infused.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
|
ItemStack magicPrincess = Allele.Infused.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
|
|
||||||
|
String researchKey = "BEEINFUSION";
|
||||||
|
|
||||||
|
ObjectTags tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 20);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION1", airDrone,
|
||||||
|
new ItemStack[] { drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.AIR.ordinal())},
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION2", airPrincess,
|
||||||
|
new ItemStack[] { princess , new ItemStack(ItemManager.tcShard, 1, TCShardType.AIR.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
|
||||||
|
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 20);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION3", fireDrone, new Object[]
|
||||||
|
{ drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.FIRE.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION4", firePrincess, new Object[]
|
||||||
|
{ princess, new ItemStack(ItemManager.tcShard, 1, TCShardType.FIRE.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
|
||||||
|
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 20);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION5", waterDrone, new Object[]
|
||||||
|
{ drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.WATER.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION6", waterPrincess, new Object[]
|
||||||
|
{ princess, new ItemStack(ItemManager.tcShard, 1, TCShardType.WATER.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
|
||||||
|
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 20);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION7", earthDrone, new Object[]
|
||||||
|
{ drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.EARTH.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION8", earthPrincess, new Object[]
|
||||||
|
{ princess, new ItemStack(ItemManager.tcShard, 1, TCShardType.EARTH.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 40).add(EnumTag.FLUX, 20);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION9", magicDrone, new Object[]
|
||||||
|
{ drone, new ItemStack(ItemManager.tcShard, 1, TCShardType.MAGIC.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION0", magicPrincess, new Object[]
|
||||||
|
{ princess, new ItemStack(ItemManager.tcShard, 1, TCShardType.MAGIC.ordinal()) },
|
||||||
|
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerResearch()
|
||||||
|
{
|
||||||
|
ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "research.xml");
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user