Compare commits

...
9 Commits
33 changed files with 966 additions and 211 deletions

No files matched your search

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Sat Dec 29 20:28:23 PST 2012
build.number=34
#Fri Jan 11 02:54:19 PST 2013
build.number=68
+21 -18
View File
@@ -1,7 +1,7 @@
<project name="ThaumicBees" basedir="../../" default="main">
<property name="build.dir" value="build" />
<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="src.dir" value="ThaumicBees" />
@@ -9,15 +9,15 @@
<property name="forge.dir" value="${build.dir}/forge" />
<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="extrabiomes.dir" value="ExtraBiomes" />
<property name="clientsrc.dir" value="${mcp.dir}/src/minecraft" />
<property name="mc.version" value="1.4.6"/>
<property name="forge.version" value="6.5.0.473"/>
<property name="thaumicbees.version" value="0.9.0"/>
<property name="mc.version" value="1.4.7"/>
<property name="forge.version" value="6.6.0.491"/>
<property name="thaumicbees.version" value="1.1.702"/>
<!-- for local deployment only, not used by main -->
<property name="deploy.type" value="previews" />
@@ -32,30 +32,32 @@
<delete dir="${clientsrc.dir}/forestry" />
<delete dir="${clientsrc.dir}/thaumcraft" />
<delete dir="${clientsrc.dir}/thaumicbees" />
<delete dir="${classes.dir}" />
</target>
<target name="setup">
<target name="forgeclean">
<!-- Unzip forge -->
<!--<echo message="Unpacking Forge..." />
<echo message="Unpacking Forge..." />
<unzip dest="${build.dir}">
<fileset dir="${resource.dir}">
<include name="minecraftforge-src-${mc.version}-${forge.version}.zip"/>
</fileset>
</unzip>
<chmod file="${forge.dir}/install.sh" perm="+x"/> -->
<chmod file="${forge.dir}/install.sh" perm="+x"/>
<!-- Install forge -->
<!--<echo message="Installing Forge..." />
<echo message="Installing Forge..." />
<exec dir="${forge.dir}" executable="cmd" osfamily="windows">
<arg line="/c install.cmd"/>
</exec>
<exec dir="${forge.dir}" executable="sh" osfamily="unix">
<arg value="install.sh" />
</exec> -->
</exec>
</target>
<target name="setup">
<!-- Set build number -->
<buildnumber file="${src.dir}/thaumicbees_res/build.number"/>
@@ -118,25 +120,26 @@
<copy todir="${classes.dir}/client">
<fileset dir="${mcp.dir}/reobf/minecraft">
<include name="**/thaumicbees/**" />
<include name="**/forestry/api/**" />
<include name="**/forestry/plugins/**" />
<exclude name="**/forestry/api/**" />
<exclude name="**/thaumcraft/**" />
</fileset>
</copy>
<!-- Copy Forestry resources -->
<!-- Copy ThaumicBees resources -->
<copy todir="${classes.dir}/client">
<fileset dir="${src.dir}/thaumicbees_res">
<exclude name="build.xml"/>
<exclude name="build.number"/>
</fileset>
</copy>
<!-- Copy localizations -->
<copy todir="${classes.dir}/client">
<!-- Copy localizations (We have none yet.) -->
<!--<copy todir="${classes.dir}/client">
<fileset dir="${lang.dir}">
<exclude name="README.md"/>
</fileset>
</copy>
</copy>-->
</target>
<!-- Package the jars -->
+31
View File
@@ -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: 5.3 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
+3 -1
View File
@@ -2,8 +2,10 @@
{
"modid": "ThaumicBees",
"name": "ThaumicBees",
"url": "http://www.minecraftforum.net/topic/1623692-thaumicbees-beekeeping-is-magic/",
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
"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,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,92 @@
package thaumicbees.bees;
import forestry.api.genetics.IClassification;
import forestry.api.genetics.IAlleleSpecies;
import java.util.ArrayList;
public class BeeClassification implements IClassification
{
public BeeClassification()
{
// TODO
}
@Override
public EnumClassLevel getLevel()
{
// TODO Auto-generated method stub
return null;
}
@Override
public String getUID()
{
// TODO Auto-generated method stub
return null;
}
@Override
public String getName()
{
// TODO Auto-generated method stub
return null;
}
@Override
public String getScientific()
{
// TODO Auto-generated method stub
return null;
}
@Override
public String getDescription()
{
// TODO Auto-generated method stub
return null;
}
@Override
public IClassification[] getMemberGroups()
{
// TODO Auto-generated method stub
return null;
}
@Override
public void addMemberGroup(IClassification group)
{
// TODO Auto-generated method stub
}
@Override
public IAlleleSpecies[] getMemberSpecies()
{
// TODO Auto-generated method stub
return null;
}
@Override
public void addMemberSpecies(IAlleleSpecies species)
{
// TODO Auto-generated method stub
}
@Override
public IClassification getParent()
{
// TODO Auto-generated method stub
return null;
}
@Override
public void setParent(IClassification parent)
{
// TODO Auto-generated method stub
}
}
@@ -10,13 +10,13 @@ import forestry.api.genetics.IPollinatable;
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
public boolean isAcceptedFlower(World world, IBeeGenome genome, int x, int y, int z)
{
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);
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))
{
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.");
flag = true;
}
@@ -4,6 +4,8 @@ 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;
@@ -20,7 +22,10 @@ import thaumicbees.bees.genetics.BeeMutation;
import thaumicbees.bees.genetics.BeeSpecies;
import thaumicbees.item.ItemManager;
import thaumicbees.item.ItemComb.CombType;
import thaumicbees.item.ItemDrop.DropType;
import thaumicbees.item.ItemMiscResources.ResourceType;
import thaumicbees.main.ThaumcraftCompat;
import thaumicbees.main.ThaumcraftCompat.TCMiscResource;
import thaumicbees.main.ThaumicBees;
import net.minecraft.block.Block;
@@ -50,7 +55,7 @@ public class ThaumicBeesPlugin implements IPlugin
try
{
Field f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
ThaumicBees.object.configFlags.drawParticleEffects = f.getBoolean(null);
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);
@@ -58,7 +63,6 @@ public class ThaumicBeesPlugin implements IPlugin
catch (Exception e)
{
// Could not get Forestry config value.
}
}
@@ -71,12 +75,7 @@ public class ThaumicBeesPlugin implements IPlugin
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);
@@ -85,87 +84,125 @@ public class ThaumicBeesPlugin implements IPlugin
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,
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", "", "mysticus", BeeBranch.Arcane, 0,
Allele.Mysterious = new BeeSpecies("Mysterious", "<indecipherable scribblings>|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", "", "arcanus", BeeBranch.Arcane, 0,
Allele.Arcane = new BeeSpecies("Arcane", "The pinnacle of magical bees. It is likely these lead to more powerful mutations...|Apinomicon",
"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), 5);
Allele.Arcane.setGenome(BeeGenomeManager.getTemplateArcane());
occult.addMemberSpecies(Allele.Arcane);
breedingMgr.registerBeeTemplate(Allele.Arcane.getGenome());
Allele.Charmed = new BeeSpecies("Charmed", "", "larvatus", BeeBranch.Supernatural, 0,
IClassification otherworldly = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "coeleste", "Coeleste");
otherworldly.setParent(familyBee);
Allele.Charmed = new BeeSpecies("Charmed", "<indecipherable scribblings>|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", "", "cantatus", BeeBranch.Supernatural, 0,
Allele.Enchanted = new BeeSpecies("Enchanted", "<indecipherable scribblings>|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", "", "coeleste", BeeBranch.Supernatural, 0,
Allele.Supernatural = new BeeSpecies("Supernatural", "<indecipherable scribblings>|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.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", "", "disciplina", BeeBranch.Scholarly, 0,
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", "", "studiosis", BeeBranch.Scholarly, 0,
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.KNOWLEDGE_FRAGMENT), 2);
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", "", "philologus", BeeBranch.Scholarly, 0,
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.KNOWLEDGE_FRAGMENT), 5);
Allele.Savant.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 5);
Allele.Savant.setGenome(BeeGenomeManager.getTemplateSavant());
learned.addMemberSpecies(Allele.Savant);
breedingMgr.registerBeeTemplate(Allele.Savant.getGenome());
Allele.Stark = new BeeSpecies("Stark", "", "torridus", BeeBranch.Stark, 0,
IClassification stark = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "torridus", "Torridus");
stark.setParent(familyBee);
Allele.Stark = new BeeSpecies("Stark", "\"These are unusually attracted to shards. This warrents further investigation.\"|Azanor, Thaumaturge",
"torridae", 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());
IClassification magical = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "thaumis", "Thaumis");
magical.setParent(familyBee);
Allele.Air = new BeeSpecies("Aura", "", "ventosa", BeeBranch.Elemental, 0,
Allele.Air = new BeeSpecies("Aura", "They move like the wind itself, making observers feel like slackers.|Apinomicon",
"ventosa", magical, 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.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.QUICKSILVER.ordinal()), 10);
Allele.Air.setGenome(BeeGenomeManager.getTemplateAir());
breedingMgr.registerBeeTemplate(Allele.Air.getGenome());
Allele.Fire = new BeeSpecies("Ignis", "", "praefervidus", BeeBranch.Elemental, 0,
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), 20);
@@ -173,7 +210,8 @@ public class ThaumicBeesPlugin implements IPlugin
Allele.Fire.setGenome(BeeGenomeManager.getTemplateFire());
breedingMgr.registerBeeTemplate(Allele.Fire.getGenome());
Allele.Water = new BeeSpecies("Aqua", "", "umidus", BeeBranch.Elemental, 0,
Allele.Water = new BeeSpecies("Aqua", "The purity of their produce is unparalleled.|Apinomicon",
"umidus", magical, 0,
0x36CFD9, 0x1054A1, EnumTemperature.NORMAL, EnumHumidity.DAMP,
true, hideSpecies, true, true);
Allele.Water.addProduct(ItemManager.combs.getStackForType(CombType.WATERY), 20);
@@ -181,11 +219,12 @@ public class ThaumicBeesPlugin implements IPlugin
Allele.Water.setGenome(BeeGenomeManager.getTemplateWater());
breedingMgr.registerBeeTemplate(Allele.Water.getGenome());
Allele.Earth = new BeeSpecies("Solum", "", "sordida", BeeBranch.Elemental, 0,
Allele.Earth = new BeeSpecies("Solum", "<indecipherable scribblings>|Apinomicon",
"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(ItemManager.amber, 10);
Allele.Earth.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.AMBER.ordinal()), 10);
Allele.Earth.setGenome(BeeGenomeManager.getTemplateEarth());
breedingMgr.registerBeeTemplate(Allele.Earth.getGenome());
}
@@ -36,6 +36,11 @@ public class Allele implements IAllele
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
}
public static IAlleleBeeSpecies getExtraSpecies(String name)
{
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("extrabees.species.").append(name).toString());
}
public static IAllele getBaseAllele(String name)
{
return AlleleManager.getAllele(name);
@@ -73,7 +73,7 @@ public class BeeGenomeManager
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Arcane;
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlower");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringAverage");
return genome;
}
@@ -84,7 +84,7 @@ public class BeeGenomeManager
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlower");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
return genome;
}
@@ -237,7 +237,7 @@ public class BeeGenomeManager
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown1");
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlow"); // 1.6.5+: floweringFastest
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringFastest");
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.digSpeed;
return genome;
@@ -36,7 +36,7 @@ public class BeeMutation implements IBeeMutation
baseChance = percentChance;
isSecret = hide;
BeeManager.beeMutations.add(this);
BeeManager.breedingManager.registerBeeMutation(this);
}
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
@@ -24,17 +24,17 @@ public class BeeSpecies extends Allele implements IAlleleBeeSpecies
private boolean hasEffect;
private boolean isSecret;
private boolean isCounted;
private IBranch branch;
private IClassification branch;
private HashMap products;
private HashMap specialty;
private IAllele genomeTemplate[];
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IBranch parentBranch, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
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);
name = speciesName;
@@ -51,6 +51,7 @@ public class BeeSpecies extends Allele implements IAlleleBeeSpecies
isCounted = isSpeciesCounted;
products = new HashMap();
specialty = new HashMap();
this.branch = classification;
this.genomeTemplate = new IAllele[EnumBeeChromosome.values().length];
}
@@ -148,9 +149,9 @@ public class BeeSpecies extends Allele implements IAlleleBeeSpecies
return authority;
}
public IBranch getBranch()
public IClassification getBranch()
{
return branch;
return this.branch;
}
public HashMap getProducts()
@@ -6,8 +6,14 @@ import net.minecraftforge.common.Configuration;
public class BlockManager
{
public static Block ThaumcraftPlant;
public static Block tcPlant;
public static Block tcCandle;
public static Block tcCrystal;
public static Block tcMarker;
public static Block tcJar;
public static Block tcLog;
public static Block tcLeaf;
public static Block tcWarded;
public BlockManager() { }
@@ -0,0 +1,259 @@
package thaumicbees.item;
import java.util.List;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.recipes.RecipeManagers;
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
{
public enum Type
{
MAGIC("Magic Capsule", 2000, 0),
;
public String name;
public int capacity;
public int iconIdx;
private Type(String n, int c, int idx)
{
this.name = n;
this.capacity = c;
this.iconIdx = idx;
}
}
public enum Liquid
{ // Incidentally, Item meta is the liquid ID.
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 Liquid(String l, String display, int idx)
{
this.liquidID = l;
this.displayName = display;
this.iconIdx = idx;
}
}
private Type capsuleType;
public ItemCapsule(Type type, int itemId)
{
super(itemId);
this.capsuleType = type;
this.setTextureFile(CommonProxy.TCBEES_LIQUIDS_IMAGE);
this.setCreativeTab(CreativeTabs.tabMisc);
this.setHasSubtypes(true);
}
@Override
public String getItemDisplayName(ItemStack itemStack)
{
return Liquid.values()[itemStack.getItemDamage()].displayName + " " + this.capsuleType.name;
}
public ItemStack getCapsuleForLiquid(Liquid l)
{
return new ItemStack(this, 1, l.ordinal());
}
public void setUpLiquids()
{
ItemStack empty = new ItemStack(this, 1, 0);
ItemStack filled;
LiquidStack liquid = null;
for (Liquid l : Liquid.values())
{
switch (l)
{
case EMPTY:
liquid = null;
break;
case WATER:
liquid = new LiquidStack(Block.waterStill, this.capsuleType.capacity);
break;
case LAVA:
liquid = new LiquidStack(Block.lavaStill, this.capsuleType.capacity);
break;
default:
liquid = LiquidDictionary.getLiquid(l.liquidID, this.capsuleType.capacity);
break;
}
if (liquid != null)
{
filled = new ItemStack(this, 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(ItemWax.WaxType.MAGIC), 20);
l.available = true;
}
}
// Empty will be set to unavailable. Obviously, it always is.
Liquid.EMPTY.available = true;
}
@Override
@SideOnly(Side.CLIENT)
public void getSubItems(int par1, CreativeTabs tab, List itemList)
{
for (Liquid l : Liquid.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 = Liquid.values()[metadata].iconIdx;
}
else
{
index = capsuleType.iconIdx;
}
return index;
}
@Override
public int getRenderPasses(int metadata)
{
return 2;
}
/* @Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
{
MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(world, player, true);
if (mop != null && mop.typeOfHit == EnumMovingObjectType.TILE)
{
int i = mop.blockX;
int j = mop.blockY;
int k = mop.blockZ;
int targetedId = world.getBlockId(i, j, k);
int targetedMeta = world.getBlockMetadata(i, j, k);
// Check whether there is valid container for the liquid.
LiquidContainerData container = LiquidHelper.getEmptyContainer(itemStack, new LiquidStack(targetedId, 2, targetedMeta));
if (container != null)
{
// Search for a slot to stow a filled container in player's
// inventory
int slot = getMatchingItemSlot(player, container.filled);
if (slot >= 0)
{
if (player.inventory.getStackInSlot(slot) == null)
{
player.inventory.setInventorySlotContents(slot, container.filled.copy());
}
else
{
player.inventory.getStackInSlot(slot).stackSize++;
}
// Remove consumed empty container
itemStack.stackSize--;
// Notify player that his inventory has changed.
Proxies.net.inventoryChangeNotify(player);
}
}
}
return itemStack;
}
private int getMatchingItemSlot(EntityPlayer player, ItemStack itemStack)
{
int matchingSlot = -1;
int emptySlot = -1;
ItemStack[] inventory = player.inventory.mainInventory;
for (int i = 0; i < inventory.length; ++i)
{
// Check to see if this is an empty slot.
if (inventory[i] == null)
{
// Set our empty Slot counter if not already set.
if (emptySlot == -1)
{
emptySlot = i;
}
}
else
{
// See if contents of slot matches our target itemStack.
}
}
if (matchingSlot == -1)
{
matchingSlot = emptySlot;
}
return matchingSlot;
}*/
}
@@ -82,7 +82,7 @@ public class ItemComb extends Item
public int getIconIndex(ItemStack stack, int pass)
{
// 107, 108 are the base forestry honeycomb textures.
return 107 + pass;
return (pass >= 1) ? 108 : 107;
}
@Override
+124 -30
View File
@@ -1,18 +1,26 @@
package thaumicbees.item;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import thaumicbees.item.ItemComb.CombType;
import thaumicbees.item.ItemDrop.DropType;
import thaumicbees.item.ItemMiscResources.ResourceType;
import thaumicbees.item.ItemPropolis.PropolisType;
import thaumicbees.item.ItemWax.WaxType;
import thaumicbees.main.ThaumcraftCompat;
import thaumicbees.storage.BackpackDefinition;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property;
import net.minecraftforge.liquids.LiquidStack;
import forestry.api.apiculture.BeeManager;
import forestry.api.core.BlockInterface;
import forestry.api.core.ItemInterface;
import forestry.api.recipes.*;
import forestry.api.storage.BackpackManager;
import forestry.api.storage.EnumBackpackType;
public class ItemManager
{
@@ -21,18 +29,23 @@ public class ItemManager
public static ItemPropolis propolis;
public static ItemDrop drops;
public static ItemMiscResources miscResources;
//----- Liquid Capsules --------------------
public static ItemCapsule magicCapsule;
//----- Thaumcraft Items -------------------
public static ItemStack quicksilver;
public static ItemStack amber;
public static ItemStack fragment;
public static ItemStack airShard;
public static ItemStack fireShard;
public static ItemStack waterShard;
public static ItemStack earthShard;
public static ItemStack magicShard;
public static ItemStack dullShard;
public static ItemStack essentiaBottle;
public static Item tcFilledJar;
public static Item tcMiscResource;
public static Item tcEssentiaBottle;
public static Item tcShard;
public static Item tcGolem;
public static Item tcWispEssence;
//----- Backpacks --------------------------
public static Item thaumaturgeBackpackT1;
public static Item thaumaturgeBackpackT2;
public static BackpackDefinition thaumaturgeBackpackDef;
public ItemManager() { }
@@ -46,11 +59,25 @@ public class ItemManager
ItemManager.propolis = new ItemPropolis(configFile.getItem("propolis", itemIDBase++).getInt());
ItemManager.drops = new ItemDrop(configFile.getItem("drop", itemIDBase++).getInt());
ItemManager.miscResources = new ItemMiscResources(configFile.getItem("miscResources", itemIDBase++).getInt());
// 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);
ItemManager.magicCapsule = new ItemCapsule(ItemCapsule.Type.MAGIC, configFile.getItem("magicCapsule", itemIDBase++).getInt());
}
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;
GameRegistry.addRecipe(output, new Object[]
{
@@ -59,7 +86,7 @@ public class ItemManager
'C', Item.clay,
'P', Block.thinGlass
});
output = ItemManager.essentiaBottle.copy();
output = new ItemStack(tcEssentiaBottle);
output.stackSize = 4;
GameRegistry.addRecipe(output, new Object[]
{
@@ -67,15 +94,32 @@ public class ItemManager
'W', ItemManager.wax
});
output = ItemManager.fragment.copy();
// Magic capsules
output = new ItemStack(magicCapsule); output.stackSize = 4;
GameRegistry.addRecipe(output, new Object[]
{
"WWW",
'W', ItemManager.wax.getStackForType(ItemWax.WaxType.MAGIC)
});
output = new ItemStack(tcMiscResource, 1, ThaumcraftCompat.TCMiscResource.KNOWLEDGE_FRAGMENT.ordinal());
GameRegistry.addShapelessRecipe(output, new Object[]
{
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT)
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT),
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT),
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT),
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
});
// 20 is the 'average' time to centrifuge a comb.
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OCCULT),
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
@@ -88,7 +132,7 @@ public class ItemManager
new int[] { 80, 20, 5 });
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.STARK),
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.STARK) },
new int[] { 10, 95, 5 });
new int[] { 10, 95, 15 });
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.AIRY),
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.AIR) },
new int[] { 100, 65 });
@@ -102,26 +146,76 @@ public class ItemManager
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.EARTH) },
new int[] { 100, 65 });
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.STARK),
new ItemStack[] {ItemManager.dullShard},
new int[] { 25 });
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.DULL.ordinal())},
new int[] { 20 });
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.AIR),
new ItemStack[] {ItemManager.airShard},
new int[] { 25 });
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.AIR.ordinal())},
new int[] { 18 });
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.FIRE),
new ItemStack[] {ItemManager.fireShard},
new int[] { 25 });
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.FIRE.ordinal())},
new int[] { 18 });
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.WATER),
new ItemStack[] {ItemManager.waterShard},
new int[] { 25 });
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.WATER.ordinal())},
new int[] { 18 });
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.EARTH),
new ItemStack[] {ItemManager.earthShard},
new int[] { 25 });
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.EARTH.ordinal())},
new int[] { 18 });
// Squeezer recipes
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, ThaumcraftCompat.TCShardType.FIRE.ordinal()), 15);
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, ThaumcraftCompat.TCShardType.WATER.ordinal()), 25);
// 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()
{
// Forestry liquids aren't registered until PostInit, that's why we wait until now to register them.
ItemManager.magicCapsule.setUpLiquids();
}
}
@@ -15,7 +15,8 @@ public class ItemMiscResources extends Item
{
public enum ResourceType
{
KNOWLEDGE_FRAGMENT("Lore Fragment", 2),
LORE_FRAGMENT("Lore Fragment", 2),
AROMATIC_LUMP("Aromatic Lump", 3),
;
private ResourceType(String n, int i)
@@ -30,7 +31,7 @@ public class ItemMiscResources extends Item
public ItemMiscResources(int ID)
{
super(ID);
this.setTextureFile(CommonProxy.TCBEES_ITEMSPNG);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
this.setCreativeTab(CreativeTabs.tabMaterials);
this.setHasSubtypes(true);
}
@@ -35,7 +35,7 @@ public class ItemWax extends Item
public ItemWax(int itemID)
{
super(itemID);
this.setTextureFile(CommonProxy.TCBEES_ITEMSPNG);
this.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE);
this.setCreativeTab(CreativeTabs.tabMisc);
this.setHasSubtypes(true);
}
@@ -66,7 +66,6 @@ public class ItemWax extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (WaxType type : WaxType.values())
{
list.add(this.getStackForType(type));
@@ -16,14 +16,15 @@ public class ClientProxy extends CommonProxy
public void preloadTextures()
{
// Preload the TCBees items file
MinecraftForgeClient.preloadTexture(TCBEES_ITEMSPNG);
MinecraftForgeClient.preloadTexture(TCBEES_ITEMS_IMAGE);
MinecraftForgeClient.preloadTexture(TCBEES_LIQUIDS_IMAGE);
}
@Override
public void drawBeeEffects(World world, double xPos, double yPos, double zPos, int colour, int rangeX, int rangeY, int rangeZ)
{
// drawParticleEffects flag pulled from Forestry after configs
if (ThaumicBees.object.configFlags.drawParticleEffects)
if (ThaumicBees.object.configFlags.DrawParticleEffects)
{
double spawnX = xPos;
double spawnY = yPos;
@@ -8,12 +8,13 @@ public class CommonProxy
{
public static final String TCBEES_GFX = "/gfx/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_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() { }
@@ -2,6 +2,8 @@ package thaumicbees.main;
public class ConfigFlags
{
public boolean drawParticleEffects;
public boolean DrawParticleEffects;
public boolean ThaumcraftRecipesAdded;
public boolean ExtraBeesInstalled;
}
@@ -1,15 +1,24 @@
package thaumicbees.main;
import java.io.File;
import java.util.ArrayList;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.block.BlockManager;
import thaumicbees.item.ItemComb;
import thaumicbees.item.ItemManager;
import thaumicbees.item.ItemMiscResources;
import thaumicbees.item.ItemComb.CombType;
import thaumicbees.item.ItemWax.WaxType;
import thaumicbees.storage.BackpackDefinition;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameRegistry;
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;
@@ -20,56 +29,100 @@ 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()
public enum TCBlockPlant
{
Configuration tcConfig = new Configuration(new File("./config/Thaumcraft.cfg"));
GREATWOOD_SAPLING, SILVERWOOD_SAPLING, SILVERLEAF, CINDERPEARL;
}
public enum TCMiscResource
{
ALUMENTUM, NITOR, THAUMIUM, QUICKSILVER, MAGIC_TALLOW,
ZOMBIE_BRAIN, AMBER, ENCHANTED_FABRIC, FLUX_FILTER, KNOWLEDGE_FRAGMENT;
}
public enum TCShardType
{
AIR, FIRE, WATER, EARTH, MAGIC, DULL;
}
public static void init(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", 2403);
BlockManager.ThaumcraftPlant = Block.blocksList[p.getInt()];
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", 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);
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];
// Registers TC items with Forestry's backpacks.
setupBackpacks();
}
public static void setupBackpacks()
{
// 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 setupResearch()
{
// TODO: Get the path correct.
//ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "/research.xml");
}
@@ -78,6 +131,138 @@ public class ThaumcraftCompat
ObjectTags tags;
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
ThaumcraftApi.registerObjectTag(ItemManager.wax.shiftedIndex, WaxType.MAGIC.ordinal(), tags);
ThaumcraftApi.registerObjectTag(ItemManager.wax.itemID, WaxType.MAGIC.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
ThaumcraftApi.registerObjectTag(ItemManager.miscResources.itemID, ItemMiscResources.ResourceType.LORE_FRAGMENT.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.MAGIC, 1).add(EnumTag.INSECT, 2);
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.STARK.ordinal(), tags);
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.AIRY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.FIREY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.WATERY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.EARTHY.ordinal(), tags);
// Tagging capsules.
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
ThaumcraftApi.registerComplexObjectTag(ItemManager.magicCapsule.itemID, -1, tags);
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.VOID, 2);
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, 0, tags);
// Tag some Forestry stuff.
ItemStack itemStack = ItemInterface.getItem("craftingMaterial");
tags = new ObjectTags().add(EnumTag.ELDRITCH, 1).add(EnumTag.DESTRUCTION, 1);
// 0: pulsatingDust
ThaumcraftApi.registerObjectTag(itemStack.itemID, 0, tags);
// 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);
// Forestry's wood
itemStack = BlockInterface.getBlock("log1");
tags = new ObjectTags().add(EnumTag.WOOD, 8);
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log2"); // Same tags
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log3"); // Same tags.
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log4"); // Still same tags.
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
itemStack = ItemInterface.getItem("sapling");
tags = new ObjectTags().add(EnumTag.PLANT, 4).add(EnumTag.WOOD, 2);
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
// BEES!
itemStack = ItemInterface.getItem("beeDroneGE");
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.FLIGHT, 2);
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All drones
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.VALUABLE, 4);
itemStack = ItemInterface.getItem("beePrincessGE");
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All princesses.
tags = new ObjectTags().add(EnumTag.VALUABLE, 8).add(EnumTag.INSECT, 2).add(EnumTag.FLIGHT, 4);
itemStack = ItemInterface.getItem("beeQueenGE");
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); //All queens.
}
}
@@ -3,6 +3,7 @@ package thaumicbees.main;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.*;
import cpw.mods.fml.common.registry.LanguageRegistry;
import forestry.api.apiculture.EnumBeeType;
import forestry.api.core.ItemInterface;
@@ -40,20 +41,22 @@ public class ThaumicBees
@SidedProxy(serverSide="thaumicbees.main.CommonProxy", clientSide="thaumicbees.main.ClientProxy")
public static CommonProxy proxy;
private boolean ThaumcraftRecipesAdded;
private String configsPath;
private Configuration config;
public ConfigFlags configFlags;
public ThaumicBees()
{
ThaumcraftRecipesAdded = false;
this.configFlags = new ConfigFlags();
this.configFlags.ThaumcraftRecipesAdded = false;
}
@Mod.PreInit
public void preInit(FMLPreInitializationEvent event)
{
this.configsPath = event.getModConfigurationDirectory().getAbsolutePath();
this.config = new Configuration(event.getSuggestedConfigurationFile());
}
@@ -61,7 +64,7 @@ public class ThaumicBees
public void init(FMLInitializationEvent event)
{
// Give ThaumcraftCompat a chance to set itself up.
ThaumcraftCompat.init();
ThaumcraftCompat.init(configsPath);
this.proxy.preloadTextures();
// Grab Forestry graphics file path
@@ -81,16 +84,20 @@ public class ThaumicBees
@Mod.PostInit
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);
}
@ForgeSubscribe
public void worldLoad(net.minecraftforge.event.world.WorldEvent.Load event)
{
if (!ThaumcraftRecipesAdded)
if (!this.configFlags.ThaumcraftRecipesAdded)
{
ThaumicBeesPlugin.setupBeeInfusions(event.world);
ThaumcraftRecipesAdded = true;
this.configFlags.ThaumcraftRecipesAdded = true;
}
}
}
@@ -7,6 +7,8 @@ public class VersionInfo
public static final String MCVersion = "@MCVERSION@";
public static final String Build = "@BUILD_NUMBER@";
public static final String Depends = "required-after:Forestry@[1.6.4.2,);required-after:Thaumcraft@[3.0.1c,)";
public static final String Logo = "/gfx/thaumicbees/logo.png";
public static final String Depends = "required-after:Forestry@[1.7.0.2,);required-after:Thaumcraft@[3.0.1c,)";
}
@@ -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;
}
}