Another FC build.

*Heavily refactored bee code. Much cleaner now I think.
*Temporal bee branch complete, now with more Doctor Who!
This commit is contained in:
MysteriousAges committed 2013-02-09 14:12:43 -08:00
1 parent 84ad8b0d7b
commit 5a2f360e50
39 files changed
+2000 -811

No files matched your search

+2 -2
View File
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Sun Feb 03 17:05:53 PST 2013
build.number=104
#Sat Feb 09 14:11:48 PST 2013
build.number=114
Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 61 KiB

+1 -1
View File
@@ -2,7 +2,7 @@
{
"modid": "ThaumicBees",
"name": "ThaumicBees",
"url": "http://www.minecraftforum.net/topic/1623692-thaumicbees-beekeeping-is-magic/",
"url": "http://bit.ly/XFDvLY",
"description": "Crossover mod for Forestry and Thaumcraft. Magic bees & more.",
"authors": [ "MysteriousAges" ],
"credits": "Thanks to Sengir and Azanor for awesome mods! Also thanks to Binnie and Florastar. (:",
@@ -93,4 +93,14 @@ Like the Magic Frame, this frame consumes aura to maintain its enchantments. Thi
<page type="infusioncrafting">FRAMENECROTIC</page>
</project>
<project id="HIVEFRAMETIME">
<name>Temporal Frame</name>
<popupText>Why isn't it blue and boxy?</popupText>
<longText>You have been seeking a way to significantly extend bee life. It should be possible by adding a frame enchanted with the essence of time to the hive.</longText>
<page type="text">Keeping bees has been frustrating, as the insects' short lives requires you to manually intervene far too often.
A new variation of your frame design, this version involving some Time magic, should help extend their lives significantly.</page>
<page type="infusioncrafting">FRAMETIME</page>
</project>
</research>
@@ -0,0 +1,96 @@
package thaumicbees.bees;
import net.minecraft.potion.Potion;
import thaumicbees.compat.ThaumcraftHelper;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
public class Allele implements IAllele
{
public static AlleleInteger fertilityHighDominant;
public static AlleleFlower flowerBookshelf;
public static AlleleFlower flowerThaumcraft;
public static AlleleFlower flowerAuraNode;
public static AlleleFlower flowerNodePurify;
public static AlleleFlower flowerNodeFluxify;
public static AlleleEffectCure cleansingEffect;
public static AlleleEffectPotion digSpeed;
public static AlleleEffectPotion moveSpeed;
public static AlleleEffectPotion slowSpeed;
public static AlleleEffectSpawnMob spawnBrainyZombie;
public static AlleleEffectSpawnMob spawnWisp;
public static AlleleEffectSpawnMob spawnBats;
public static AlleleEffectSpawnMob spawnGhast;
public static AlleleEffectAuraNodeGrow nodeGen;
public static void setupAdditionalAlleles()
{
Allele.fertilityHighDominant = new AlleleInteger("fertilityHighDominant", 3, true);
Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true);
Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), false);
Allele.flowerAuraNode = new AlleleFlower("flowerAuraNode", new FlowerProviderAuraNode(), true);
Allele.flowerNodePurify = new AlleleFlower("flowerAuraNodePurify", new FlowerProviderAuraNodePurify(), false);
Allele.flowerNodeFluxify = new AlleleFlower("flowerAuraNodeFlux", new FlowerProviderAuraNodeFlux(), false);
Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false);
Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", "Mining", Potion.digSpeed, 7, false);
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", "Swiftness", Potion.moveSpeed, 5, false);
Allele.slowSpeed = new AlleleEffectPotion("effectSlowSpeed", "Time Warp", Potion.moveSlowdown, 3, false);
Allele.nodeGen = new AlleleEffectAuraNodeGrow("effectNodeGeneration", "Nodeify", false, 400);
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, "Brainy", ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID);
Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, "Batty", ThaumcraftHelper.Entity.FIREBAT.entityID);
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, "Wispy", ThaumcraftHelper.Entity.WISP.entityID);
Allele.spawnWisp.setThrottle(1800);
Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghastly", "Ghast");
Allele.spawnGhast.setThrottle(2000).setChanceToSpawn(20).setMaxMobsInSpawnZone(1);
}
private String uid;
private boolean dominant;
public static IAlleleBeeSpecies getBaseSpecies(String name)
{
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
}
public static IAlleleBeeSpecies getExtraSpecies(String name)
{
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("extrabees.species.").append(name).toString());
}
public static IAllele getBaseAllele(String name)
{
return AlleleManager.alleleRegistry.getAllele("forestry." + name);
}
public Allele(String id, boolean isDominant)
{
this.uid = "thaumicbees." + id;
this.dominant = isDominant;
AlleleManager.alleleRegistry.registerAllele(this);
}
@Override
public String getUID()
{
return this.uid;
}
@Override
public boolean isDominant()
{
return this.dominant;
}
}
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import java.util.List;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import java.lang.reflect.Method;
@@ -39,7 +39,7 @@ public class AlleleEffectAuraNodeGrow extends AlleleEffect
if (value >= throttle)
{
World w = housing.getWorld();
if (w.rand.nextInt(20) < 1)
if (w.rand.nextInt(15) < 1)
{
float x = housing.getXCoord();
float y = housing.getYCoord();
@@ -63,7 +63,7 @@ public class AlleleEffectAuraNodeGrow extends AlleleEffect
y *= 0.0125f;
z *= 0.0125f;
ThaumcraftApi.queueNodeChanges(nodeId, node.level * -3 / 8, w.rand.nextInt(1), false, null, x, y, z);
ThaumcraftApi.queueNodeChanges(nodeId, node.baseLevel * -3 / 10, w.rand.nextInt(1), false, null, x, y, z);
}
}
}
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import java.util.List;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import java.util.List;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import java.util.List;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import java.lang.reflect.Field;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import forestry.api.apiculture.IAlleleFlowers;
import forestry.api.apiculture.IFlowerProvider;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import forestry.api.genetics.IAlleleInteger;
@@ -0,0 +1,109 @@
package thaumicbees.bees;
import java.util.ArrayList;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAlleleSpecies;
import forestry.api.genetics.IClassification;
public enum BeeClassification implements IClassification
{
ARCANE("Arcane", "Arcanus", ""),
SUPERNATURAL("Supernatural", "Coeleste", ""),
SCHOLARLY("Scholarly", "Docto", ""),
THAUMIC("Thaumic", "Thaumis", ""),
SKULKING("Skulking", "Malevolens", ""),
VIS("Vis", "Patabilis", ""),
TIME("Time", "Sempiternus", ""),
;
private String uID;
private String name;
private String scientific;
private String description;
private ArrayList<IAlleleSpecies> species;
private IClassification parent;
private EnumClassLevel level;
private BeeClassification(String name, String latin, String desc)
{
this.uID = "classification." + name.toLowerCase();
this.name = name;
this.scientific = latin;
this.level = EnumClassLevel.GENUS;
this.description = desc;
this.species = new ArrayList();
this.parent = AlleleManager.alleleRegistry.getClassification("family.apidae");
AlleleManager.alleleRegistry.registerClassification(this);
}
@Override
public EnumClassLevel getLevel()
{
return this.level;
}
@Override
public String getUID()
{
return this.uID;
}
@Override
public String getName()
{
return this.name;
}
@Override
public String getScientific()
{
return this.scientific;
}
@Override
public String getDescription()
{
return this.description;
}
@Override
public IClassification[] getMemberGroups()
{
return null;
}
@Override
public void addMemberGroup(IClassification group)
{
}
@Override
public IAlleleSpecies[] getMemberSpecies()
{
return this.species.toArray(new IAlleleSpecies[this.species.size()]);
}
@Override
public void addMemberSpecies(IAlleleSpecies species)
{
if (!this.species.contains(species))
{
this.species.add(species);
}
}
@Override
public IClassification getParent()
{
return this.parent;
}
@Override
public void setParent(IClassification parent)
{
this.parent = parent;
}
}
@@ -1,8 +1,5 @@
package thaumicbees.bees;
import thaumicbees.bees.genetics.Allele;
import thaumicbees.bees.genetics.AlleleFlower;
import thaumicbees.bees.genetics.BeeSpecies;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
@@ -25,7 +22,7 @@ public class BeeGenomeManager
{
IAllele[] genome = new IAllele[EnumBeeChromosome.values().length];
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Esoteric;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ESOTERIC;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlowest");
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanShorter");
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
@@ -59,7 +56,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseArcane();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Esoteric;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ESOTERIC;
return genome;
}
@@ -68,7 +65,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseArcane();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Mysterious;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.MYSTERIOUS;
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
return genome;
@@ -78,7 +75,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseArcane();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Arcane;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ARCANE;
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringAverage");
@@ -101,7 +98,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseSupernatural();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Charmed;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.CHARMED;
return genome;
}
@@ -110,7 +107,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseSupernatural();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Enchanted;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.ENCHANTED;
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
return genome;
@@ -120,7 +117,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseSupernatural();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Supernatural;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SUPERNATURAL;
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth2");
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
@@ -145,7 +142,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseScholarly();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Pupil;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.PUPIL;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlower");
return genome;
@@ -155,7 +152,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseScholarly();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Scholarly;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SCHOLARLY;
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
return genome;
@@ -165,7 +162,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseScholarly();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Savant;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SAVANT;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
@@ -186,7 +183,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseElemental();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Stark;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.STARK;
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
return genome;
@@ -196,7 +193,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseElemental();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Air;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.AIR;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFastest");
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanShortened");
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLargest");
@@ -211,7 +208,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseElemental();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Fire;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.FIRE;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFaster");
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown3");
@@ -226,7 +223,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseElemental();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Water;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.WATER;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLong");
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown2");
@@ -241,7 +238,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseElemental();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Earth;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.EARTH;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLonger");
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceDown1");
@@ -257,7 +254,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseElemental();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Infused;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.INFUSED;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
@@ -279,7 +276,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseVis();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Aware;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.AWARE;
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
return genome;
@@ -289,7 +286,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseVis();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Vis;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.VIS;
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlower");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
@@ -301,7 +298,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseVis();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Pure;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.PURE;
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringAverage");
@@ -314,7 +311,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseVis();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Flux;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.FLUX;
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerNodeFluxify;
@@ -326,7 +323,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseVis();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Node;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.NODE;
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.nodeGen;
@@ -350,7 +347,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseMalevolent();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Skulking;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.SKULKING;
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
@@ -361,7 +358,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseMalevolent();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Brainy;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BRAINY;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnBrainyZombie;
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
@@ -372,7 +369,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseMalevolent();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Gossamer;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.GOSSAMER;
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
@@ -383,7 +380,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseMalevolent();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Wispy;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.WISPY;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnWisp;
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
@@ -396,7 +393,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseMalevolent();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Batty;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.BATTY;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnBats;
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
@@ -407,7 +404,7 @@ public class BeeGenomeManager
{
IAllele[] genome = getTemplateBaseMalevolent();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Ghastly;
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.GHASTLY;
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
@@ -417,6 +414,57 @@ public class BeeGenomeManager
return genome;
}
private static IAllele[] getTemplateBaseTemporal()
{
IAllele[] genome = getTemplateBaseThaumic();
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
return genome;
}
public static IAllele[] getTemplateTimely()
{
IAllele[] genome = getTemplateBaseTemporal();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.TIMELY;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.slowSpeed;
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanElongated");
return genome;
}
public static IAllele[] getTemplateLordly()
{
IAllele[] genome = getTemplateBaseTemporal();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.LORDLY;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.slowSpeed;
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLong");
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectDrunkard");
return genome;
}
public static IAllele[] getTemplateDoctoral()
{
IAllele[] genome = getTemplateBaseTemporal();
genome[EnumBeeChromosome.SPECIES.ordinal()] = BeeSpecies.DOCTORAL;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.slowSpeed;
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth3");
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanLongest");
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.getBaseAllele("effectHeroic");
return genome;
}
public static ItemStack getBeeNBTForSpecies(BeeSpecies species, EnumBeeType beeType)
{
@@ -1,18 +1,20 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import forestry.api.apiculture.*;
import forestry.api.genetics.IAllele;
import forestry.api.genetics.IGenome;
import java.util.ArrayList;
import cpw.mods.fml.common.FMLLog;
import thaumcraft.api.AuraNode;
import thaumcraft.api.EnumNodeType;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.MoonPhase;
public class BeeMutation implements IBeeMutation
{
public static BeeMutation Esoteric;
public static BeeMutation Esoteric1;
public static BeeMutation Mysterious;
@@ -38,13 +40,91 @@ public class BeeMutation implements IBeeMutation
public static BeeMutation Wispy;
public static BeeMutation Batty;
public static BeeMutation Ghastly;
public static BeeMutation Timely;
public static BeeMutation Lordly;
public static BeeMutation Doctoral;
public static void setupMutations()
{
BeeMutation.Esoteric = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Demonic"), BeeSpecies.ESOTERIC, 10);
BeeMutation.Esoteric1 = new BeeMutation(Allele.getBaseSpecies("Heroic"), Allele.getBaseSpecies("Demonic"), BeeSpecies.ESOTERIC, 25);
BeeMutation.Mysterious = new BeeMutation(BeeSpecies.ESOTERIC, Allele.getBaseSpecies("Ended"), BeeSpecies.MYSTERIOUS, 10);
BeeMutation.Arcane = new BeeMutation(BeeSpecies.ESOTERIC, BeeSpecies.MYSTERIOUS, BeeSpecies.ARCANE, 8)
.setMoonPhaseBonus(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT, 1.5f);
BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Diligent"), Allele.getBaseSpecies("Valiant"), BeeSpecies.CHARMED, 20);
BeeMutation.Enchanted = new BeeMutation(BeeSpecies.CHARMED, Allele.getBaseSpecies("Valiant"), BeeSpecies.ENCHANTED, 8);
BeeMutation.Supernatural = new BeeMutation(BeeSpecies.CHARMED, BeeSpecies.ENCHANTED, BeeSpecies.SUPERNATURAL, 10)
.setMoonPhaseBonus(MoonPhase.WAXING_GIBBOUS, MoonPhase.WANING_GIBBOUS, 1.5f);
BeeMutation.Pupil = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.ENCHANTED, BeeSpecies.PUPIL, 10);
BeeMutation.Scholarly = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.ARCANE, BeeSpecies.SCHOLARLY, 8);
BeeMutation.Savant = new BeeMutation(BeeSpecies.PUPIL, BeeSpecies.SCHOLARLY, BeeSpecies.SAVANT, 6);
BeeMutation.Stark = new BeeMutation(BeeSpecies.ARCANE, BeeSpecies.SUPERNATURAL, BeeSpecies.STARK, 8);
BeeMutation.Aware = new BeeMutation(Allele.getBaseSpecies("Demonic"), Allele.getBaseSpecies("Edenic"), BeeSpecies.AWARE, 12);
BeeMutation.Vis = new BeeMutation(BeeSpecies.AWARE, BeeSpecies.ARCANE, BeeSpecies.VIS, 9)
.setAuraNodeRequired(40);
BeeMutation.Vis1 = new BeeMutation(BeeSpecies.AWARE, BeeSpecies.STARK, BeeSpecies.VIS, 12)
.setAuraNodeRequired(80);
BeeMutation.Pure = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Edenic"), BeeSpecies.PURE, 7)
.setAuraNodeTypeRequired(5, EnumNodeType.PURE).setMoonPhaseBonus(MoonPhase.NEW, MoonPhase.NEW, 1.6f);
BeeMutation.Flux = new BeeMutation(BeeSpecies.VIS, Allele.getBaseSpecies("Edenic"), BeeSpecies.FLUX, 7)
.setAuraNodeTypeRequired(30, EnumNodeType.UNSTABLE).setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 1.6f);
BeeMutation.Node = new BeeMutation(BeeSpecies.VIS, BeeSpecies.VIS, BeeSpecies.NODE, 2)
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WANING_HALF, MoonPhase.WANING_HALF);
BeeMutation.Node1 = new BeeMutation(BeeSpecies.VIS, BeeSpecies.VIS, BeeSpecies.NODE, 2)
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WAXING_HALF);
// Now we get into a little bit of branching...
if (ThaumicBees.getConfig().ExtraBeesInstalled)
{
setupMutationsExtraBeesBase();
}
else
{
setupMutationsForestryBase();
}
BeeMutation.Gossamer.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.WANING_CRESCENT);
BeeMutation.Wispy = new BeeMutation(BeeSpecies.GOSSAMER, Allele.getBaseSpecies("Cultivated"), BeeSpecies.WISPY, 8);
BeeMutation.Timely = new BeeMutation(Allele.getBaseSpecies("Industrious"), BeeSpecies.ENCHANTED, BeeSpecies.TIMELY, 10);
BeeMutation.Lordly = new BeeMutation(BeeSpecies.TIMELY, Allele.getBaseSpecies("Imperial"), BeeSpecies.LORDLY, 9);
BeeMutation.Doctoral = new BeeMutation(BeeSpecies.TIMELY, BeeSpecies.LORDLY, BeeSpecies.DOCTORAL, 7);
}
private static void setupMutationsExtraBeesBase()
{
try
{
BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getExtraSpecies("desolate"), BeeSpecies.SKULKING, 10);
BeeMutation.Brainy = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("rotten"), BeeSpecies.BRAINY, 12);
BeeMutation.Gossamer = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("ancient"), BeeSpecies.GOSSAMER, 10);
BeeMutation.Batty = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("rock"), BeeSpecies.BATTY, 14);
BeeMutation.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getExtraSpecies("creeper"), BeeSpecies.GHASTLY, 13);
}
catch (Exception e)
{
FMLLog.warning("ThaumicBees encountered an error attempting to register mutations using Extra Bees species! Ensure Extra Bees was able to initialize correctly!");
FMLLog.info("Could not use Extra Bees species for mutations. Falling back to Forestry defaults.");
setupMutationsForestryBase();
}
}
private static void setupMutationsForestryBase()
{
BeeMutation.Skulking = new BeeMutation(BeeSpecies.MYSTERIOUS, Allele.getBaseSpecies("Modest"), BeeSpecies.SKULKING, 10);
BeeMutation.Brainy = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Sinister"), BeeSpecies.BRAINY, 10);
BeeMutation.Gossamer = new BeeMutation(BeeSpecies.SKULKING, BeeSpecies.SUPERNATURAL, BeeSpecies.GOSSAMER, 10);
BeeMutation.Batty = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Frugal"), BeeSpecies.BATTY, 11);
BeeMutation.Ghastly = new BeeMutation(BeeSpecies.SKULKING, Allele.getBaseSpecies("Austere"), BeeSpecies.GHASTLY, 13);
}
private IAllele parent1;
private IAllele parent2;
private IAllele mutationTemplate[];
private int baseChance;
private boolean isSecret;
private boolean isMoonRestricted;
private MoonPhase moonPhaseStart;
private MoonPhase moonPhaseEnd;
@@ -0,0 +1,380 @@
package thaumicbees.bees;
import forestry.api.apiculture.*;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.core.ItemInterface;
import forestry.api.genetics.*;
import forestry.api.genetics.IClassification.EnumClassLevel;
import java.util.HashMap;
import thaumicbees.compat.ForestryHelper;
import thaumicbees.compat.ThaumcraftHelper;
import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType;
import thaumicbees.item.types.PollenType;
import thaumicbees.item.types.ResourceType;
import thaumicbees.main.Config;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.world.World;
public enum BeeSpecies implements IAlleleBeeSpecies
{
ESOTERIC("Esoteric", "An unusual crossbreed which seems to have magical properties.|Apinomicon", "secretiore",
BeeClassification.ARCANE, 0x001099, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
MYSTERIOUS("Mysterious", "These bees have been to the end of the world and back, and their power has grown.|Apinomicon", "mysticus",
BeeClassification.ARCANE, 0x762bc2, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
ARCANE("Arcane", "\"Their produce is charged with magic.\"|Azanor, Master Thaumaturge", "arcanus",
BeeClassification.ARCANE, 0xd242df, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
CHARMED("Charmed", "Your first experiments in Thaumaturgical Apiculture have yielded fruit. Buzzing fruit.|Apinomicon", "larvatus",
BeeClassification.SUPERNATURAL, 0x48EEEC, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
ENCHANTED("Enchanted", "Successive generations of Charmed bees have reinforced their connection to the unknown.|Apinomicon", "cantatus",
BeeClassification.SUPERNATURAL, 0x18e726, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
SUPERNATURAL("Supernatural", "These bees walk the line between this world and the unseen.|Apinomicon", "coeleste",
BeeClassification.SUPERNATURAL, 0x005614, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
PUPIL("Pupil", "\"What does that bee want with my paper?!|Yorae, Librarian", "disciplina",
BeeClassification.SCHOLARLY, 0xFFFF00, EnumTemperature.NORMAL, EnumHumidity.ARID, false, true),
SCHOLARLY("Scholarly", "\"I can't be sure, but I think they might be smarter than me...\"|Yorae, Librarian", "studiosis",
BeeClassification.SCHOLARLY, 0x6E0000, EnumTemperature.NORMAL, EnumHumidity.ARID, false, false),
SAVANT("Savant", "lim(x^(i / pi)/ log(e * 7 - ln(32/x^-pi))). Solve for honey.|Note found on Yorae's desk", "philologus",
BeeClassification.SCHOLARLY, 0x6E1C6D, EnumTemperature.NORMAL, EnumHumidity.ARID, true, false),
STARK("Stark", "\"These are unusually attracted to shards. This warrents further investigation.\"|Azanor, Master Thaumaturge", "torridae",
BeeClassification.THAUMIC, 0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
AIR("Aura", "\"They work so fast it's breathtaking.\"|Sengir, Mad Apiarist", "ventosa",
BeeClassification.THAUMIC, 0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
FIRE("Ignis", "Caution: Contents of hive extremely hot.|Warning label on Azanor's apiary", "praefervidus",
BeeClassification.THAUMIC, 0xE50B0B, 0x95132F, EnumTemperature.HOT, EnumHumidity.ARID, true, true),
WATER("Aqua", "\"I tried to breed them once, but that was a wash.\"|MysteriousAges, Apprentice Thaumaturge", "umidus",
BeeClassification.THAUMIC, 0x36CFD9, 0x1054A1, EnumTemperature.NORMAL, EnumHumidity.DAMP, true, true),
EARTH("Solum", "\"You're really gonna dig these bees, but watch out - they bore quite easily.\"|MysteriousAges, Apprentice Comedian", "sordida",
BeeClassification.THAUMIC, 0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
INFUSED("Praecantatio", "Beekeeping is magic!|Apinomicon, Preface", "azanorius",
BeeClassification.THAUMIC, 0xaa32fc, 0x7A489E, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, true),
AWARE("Aware", "\"They can see into your soul!\"|Florastar, Expert Beekeeper", "sensibilis",
BeeClassification.VIS, 0xb0092e9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
VIS("Vis", "\"They can feel changes in the aura, but are not yet able to affect it.\"|Azanor, research notes", "arcanus saecula",
BeeClassification.VIS, 0x004c99, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
PURE("Pure", "\"It's like a bee janitor!\"|MysteriousAges, Thaumaturge", "arcanus puritatem",
BeeClassification.VIS, 0xb0092e9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
FLUX("Flux", "\"I thought they would help clean up, but it only makes things worse!\"|Kreicus, Apprentice Thaumaturge", "arcanus labe",
BeeClassification.VIS, 0x004c99, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
NODE("Node", "Having undergone a freak mutation, these bees now attract magic to them.|Apinomicon", "conficiens",
BeeClassification.VIS, 0xFFF266, 0xFF8CE9, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
SKULKING("Skulking", "These bees have become xenophobic and bad-tempered. Use caution.|Apinomicon", "malevolens",
BeeClassification.SKULKING, 0x524827, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
BRAINY("Brainy", "Their combs may be fetid and foul-smelling, but their intelligence is well-developed.|Apinomicon", "cerebrum",
BeeClassification.SKULKING, 0x83FF70, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
GOSSAMER("Gossamer", "As they work, they seem to fade out from light for brief moments.|Apinomicon", "perlucidus",
BeeClassification.SKULKING, 0x183f66, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
WISPY("Wispy", "Their language is garbled and unintelligible. It is probable they are speaking to unnatural beings.|Apinomicon", "umbrabilis",
BeeClassification.SKULKING, 0x9cb8d5, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
BATTY("Batty", "They tend to attract bats to their hives through means unknown.|Apinomicon", "chiroptera",
BeeClassification.SKULKING, 0x27350d, 0xe15236, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false,true),
GHASTLY("Ghastly", "\"*sigh*... Really, Myst?\"|Taveria", "pallens",
BeeClassification.SKULKING, 0xccccee, 0xbf877c, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
TIMELY("Timely", "\"An apiarist is never late. He arrives precicely when he means to!\"|Sengir, Mad Apiarist", "gallifreis",
BeeClassification.TIME, 0xC6AF86, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, true),
LORDLY("Lordly", "", "rassilonis",
BeeClassification.TIME, 0xC6AF86, 0x8E0213, EnumTemperature.NORMAL, EnumHumidity.NORMAL, false, false),
DOCTORAL("Doctoral", "\"Would you like a Jelly Baby?\"", "medicus qui",
BeeClassification.TIME, 0xDDE5FC, 0x4B6E8C, EnumTemperature.NORMAL, EnumHumidity.NORMAL, true, false),
;
public static void setupBeeSpecies()
{
ESOTERIC.addProduct(Config.combs.getStackForType(CombType.OCCULT), 20)
.setGenome(BeeGenomeManager.getTemplateEsoteric())
.register();
MYSTERIOUS.addProduct(Config.combs.getStackForType(CombType.OCCULT), 25)
.setGenome(BeeGenomeManager.getTemplateMysterious())
.register();
ARCANE.addProduct(Config.combs.getStackForType(CombType.OCCULT), 30)
.addSpecialty(Config.drops.getStackForType(DropType.ENCHANTED, 1), 9)
.setGenome(BeeGenomeManager.getTemplateArcane())
.register();
CHARMED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 20)
.setGenome(BeeGenomeManager.getTemplateCharmed())
.register();
ENCHANTED.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 30)
.setGenome(BeeGenomeManager.getTemplateEnchanted())
.register();
SUPERNATURAL.addProduct(Config.combs.getStackForType(CombType.OTHERWORLDLY), 40)
.addSpecialty(Config.pollen.getStackForType(PollenType.UNUSUAL), 8)
.setGenome(BeeGenomeManager.getTemplateSupernatural())
.register();
PUPIL.addProduct(Config.combs.getStackForType(CombType.PAPERY), 20)
.setGenome(BeeGenomeManager.getTemplatePupil())
.register();
SCHOLARLY.addProduct(Config.combs.getStackForType(CombType.PAPERY), 25)
.addSpecialty(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 2)
.setGenome(BeeGenomeManager.getTemplateScholarly())
.register();
SAVANT.addProduct(Config.combs.getStackForType(CombType.PAPERY), 40)
.addSpecialty(Config.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 5)
.setGenome(BeeGenomeManager.getTemplateSavant())
.register();
STARK.addProduct(Config.combs.getStackForType(CombType.STARK), 10)
.setGenome(BeeGenomeManager.getTemplateStark())
.register();
AIR.addProduct(Config.combs.getStackForType(CombType.AIRY), 9)
.addSpecialty(new ItemStack(Config.tcNuggets, 1, ThaumcraftHelper.NuggetType.QUICKSILVER.ordinal()), 8)
.setGenome(BeeGenomeManager.getTemplateAir())
.register();
FIRE.addProduct(Config.combs.getStackForType(CombType.FIREY), 15)
.addSpecialty(new ItemStack(Item.blazePowder), 8)
.setGenome(BeeGenomeManager.getTemplateFire())
.register();
WATER.addProduct(Config.combs.getStackForType(CombType.WATERY), 20)
.addSpecialty(new ItemStack(Block.ice), 1)
.addSpecialty(new ItemStack(Config.fPollen, 1, ForestryHelper.Pollen.CRYSTALLINE.ordinal()), 5)
.setGenome(BeeGenomeManager.getTemplateWater())
.register();
EARTH.addProduct(Config.combs.getStackForType(CombType.EARTHY), 30)
.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()), 6)
.setGenome(BeeGenomeManager.getTemplateEarth())
.register();
INFUSED.addProduct(Config.combs.getStackForType(CombType.INFUSED), 20)
.setGenome(BeeGenomeManager.getTemplateInfused())
.register();
AWARE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 18)
.setGenome(BeeGenomeManager.getTemplateAware())
.register();
VIS.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 25)
.setGenome(BeeGenomeManager.getTemplateVis())
.register();
PURE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
.setGenome(BeeGenomeManager.getTemplatePure())
.register();
FLUX.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
.setGenome(BeeGenomeManager.getTemplateFlux())
.register();
NODE.addProduct(Config.combs.getStackForType(CombType.INTELLECT), 20)
.setGenome(BeeGenomeManager.getTemplateNode())
.register();
SKULKING.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
.setGenome(BeeGenomeManager.getTemplateSkulking())
.register();
BRAINY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
.addProduct(new ItemStack(Item.rottenFlesh), 6)
.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.ZOMBIE_BRAIN.ordinal()), 2)
.setGenome(BeeGenomeManager.getTemplateBrainy())
.register();
GOSSAMER.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 15)
.setGenome(BeeGenomeManager.getTemplateGossamer())
.register();
WISPY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.SILKY.ordinal()), 22)
.addSpecialty(new ItemStack(Config.fCraftingResource, 1, ForestryHelper.CraftingMaterial.SILK_WISP.ordinal()), 4)
.setGenome(BeeGenomeManager.getTemplateWispy())
.register();
BATTY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 10)
.addSpecialty(new ItemStack(Item.gunpowder), 4)
.setGenome(BeeGenomeManager.getTemplateBatty())
.register();
GHASTLY.addProduct(Config.combs.getStackForType(CombType.SKULKING), 8)
.addSpecialty(new ItemStack(Item.ghastTear), 2)
.setGenome(BeeGenomeManager.getTemplateGhastly())
.register();
TIMELY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.DRIPPING.ordinal()), 25)
.setGenome(BeeGenomeManager.getTemplateTimely())
.register();
LORDLY.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 30)
.setGenome(BeeGenomeManager.getTemplateLordly())
.register();
DOCTORAL.addProduct(new ItemStack(Config.fBeeComb, 1, ForestryHelper.Comb.MYSTERIOUS.ordinal()), 35)
.addSpecialty(new ItemStack(Config.jellyBaby), 5)
.setGenome(BeeGenomeManager.getTemplateDoctoral())
.register();
}
private String name;
private String descripton;
private String binomial;
private String authority;
private int bodyType;
private int primaryColour;
private int secondaryColour;
private EnumTemperature temperature;
private EnumHumidity humidity;
private boolean hasEffect;
private boolean isSecret;
private boolean isCounted;
private IClassification branch;
private HashMap products;
private HashMap specialty;
private IAllele genomeTemplate[];
private String uid;
private boolean dominant;
private BeeSpecies(String speciesName, String speciesDescription, String genusName, IClassification classification, int firstColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
{
this(speciesName, speciesDescription, genusName, classification, 0, firstColour, 0xFF6E0D, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant);
}
private BeeSpecies(String speciesName, String speciesDescription, String genusName, IClassification classification, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
{
this(speciesName, speciesDescription, genusName, classification, 0, firstColour, secondColour, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant);
}
private 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)
{
this.uid = "thaumicbees.species" + speciesName;
this.dominant = isSpeciesDominant;
AlleleManager.alleleRegistry.registerAllele(this);
name = speciesName;
descripton = speciesDescription;
binomial = genusName;
authority = "MysteriousAges";
bodyType = body;
primaryColour = firstColour;
secondaryColour = secondColour;
temperature = preferredTemp;
humidity = preferredHumidity;
hasEffect = hasGlowEffect;
isSecret = isSpeciesSecret;
isCounted = isSpeciesCounted;
products = new HashMap();
specialty = new HashMap();
this.branch = classification;
this.branch.addMemberSpecies(this);
}
public BeeSpecies setGenome(IAllele genome[])
{
genomeTemplate = genome;
return this;
}
public IAllele[] getGenome()
{
return genomeTemplate;
}
public BeeSpecies addProduct(ItemStack produce, int percentChance)
{
products.put(produce, Integer.valueOf(percentChance));
return this;
}
public BeeSpecies addSpecialty(ItemStack produce, int percentChance)
{
specialty.put(produce, Integer.valueOf(percentChance));
return this;
}
public ItemStack getBeeItem(EnumBeeType beeType)
{
return BeeManager.beeInterface.getBeeStack(BeeManager.beeInterface.getBee(null, BeeManager.beeInterface.templateAsGenome(genomeTemplate)), beeType);
}
public String getName()
{
return name;
}
public String getDescription()
{
return descripton;
}
public int getBodyType()
{
return bodyType;
}
public int getPrimaryColor()
{
return primaryColour;
}
public int getSecondaryColor()
{
return secondaryColour;
}
public EnumTemperature getTemperature()
{
return temperature;
}
public EnumHumidity getHumidity()
{
return humidity;
}
public boolean hasEffect()
{
return hasEffect;
}
public boolean isSecret()
{
return isSecret;
}
public boolean isCounted()
{
return isCounted;
}
public String getBinomial()
{
return binomial;
}
public String getAuthority()
{
return authority;
}
public IClassification getBranch()
{
return this.branch;
}
public HashMap getProducts()
{
return products;
}
public HashMap getSpecialty()
{
return specialty;
}
@Override
public String getUID()
{
return this.uid;
}
@Override
public boolean isDominant()
{
return this.dominant;
}
public boolean isJubilant(World world, int biomeid, int x, int i, int j)
{
return true;
}
private BeeSpecies register()
{
BeeManager.breedingManager.registerBeeTemplate(this.getGenome());
return this;
}
/**
* @deprecated Method getAchievement is deprecated
*/
public Achievement getAchievement()
{
return null;
}
}
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import net.minecraft.nbt.NBTTagCompound;
import forestry.api.genetics.IEffectData;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import thaumcraft.api.AuraNode;
import thaumcraft.api.ThaumcraftApi;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import net.minecraft.block.Block;
import net.minecraft.item.ItemStack;
@@ -1,4 +1,4 @@
package thaumicbees.bees.genetics;
package thaumicbees.bees;
import thaumicbees.main.Config;
import net.minecraft.block.Block;
@@ -1,426 +0,0 @@
package thaumicbees.bees;
import cpw.mods.fml.common.network.IGuiHandler;
import forestry.api.apiculture.*;
import forestry.api.core.*;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IClassification;
import forestry.api.genetics.IClassification.EnumClassLevel;
import java.lang.reflect.Field;
import java.util.Random;
import thaumcraft.api.EnumNodeType;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.bees.genetics.Allele;
import thaumicbees.bees.genetics.AlleleEffectAuraNodeGrow;
import thaumicbees.bees.genetics.AlleleEffectCure;
import thaumicbees.bees.genetics.AlleleEffectPotion;
import thaumicbees.bees.genetics.AlleleEffectSpawnMob;
import thaumicbees.bees.genetics.AlleleEffectSpawnWisp;
import thaumicbees.bees.genetics.AlleleFlower;
import thaumicbees.bees.genetics.AlleleInteger;
import thaumicbees.bees.genetics.BeeMutation;
import thaumicbees.bees.genetics.BeeSpecies;
import thaumicbees.bees.genetics.FlowerProviderAuraNode;
import thaumicbees.bees.genetics.FlowerProviderAuraNodeFlux;
import thaumicbees.bees.genetics.FlowerProviderAuraNodePurify;
import thaumicbees.bees.genetics.FlowerProviderBookshelf;
import thaumicbees.bees.genetics.FlowerProviderThaumcraftFlower;
import thaumicbees.compat.CompatabilityManager;
import thaumicbees.compat.ThaumcraftHelper;
import thaumicbees.item.ItemComb;
import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType;
import thaumicbees.item.types.PollenType;
import thaumicbees.item.types.ResourceType;
import thaumicbees.main.Config;
import thaumicbees.main.ThaumicBees;
import thaumicbees.main.utils.MoonPhase;
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.getConfig().DrawParticleEffects = f.getBoolean(null);
f = Class.forName("forestry.core.config.Defaults").getField("TEXTURE_PARTICLES_BEE");
thaumicbees.main.CommonProxy.FORESTRY_GFX_BEEEFFECTS = (String)f.get(null);
}
catch (Exception e)
{
// 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", ThaumcraftHelper.Entity.BRAINY_ZOMBIE.entityID);
Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, "Batty", ThaumcraftHelper.Entity.FIREBAT.entityID);
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, "Wispy", ThaumcraftHelper.Entity.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(Config.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(Config.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(Config.combs.getStackForType(CombType.OCCULT), 30);
Allele.Arcane.addSpecialty(Config.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(Config.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(Config.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(Config.combs.getStackForType(CombType.OTHERWORLDLY), 40);
Allele.Supernatural.addSpecialty(Config.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(Config.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(Config.combs.getStackForType(CombType.PAPERY), 25);
Allele.Scholarly.addSpecialty(Config.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(Config.combs.getStackForType(CombType.PAPERY), 40);
Allele.Savant.addSpecialty(Config.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(Config.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(Config.combs.getStackForType(CombType.AIRY), 9);
Allele.Air.addSpecialty(new ItemStack(Config.tcNuggets, 1, ThaumcraftHelper.NuggetType.QUICKSILVER.ordinal()), 8);
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(Config.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(Config.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(Config.combs.getStackForType(CombType.EARTHY), 30);
Allele.Earth.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.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(Config.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(Config.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(Config.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(Config.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(Config.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(Config.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(Config.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(Config.combs.getStackForType(CombType.SKULKING), 10).addProduct(new ItemStack(Item.rottenFlesh), 6);
Allele.Brainy.addSpecialty(new ItemStack(Config.tcMiscResource, 1, ThaumcraftHelper.MiscResource.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(Config.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(Config.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, 9)
.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, 7)
.setAuraNodeTypeRequired(5, EnumNodeType.PURE).setMoonPhaseBonus(MoonPhase.NEW, MoonPhase.NEW, 1.6f);
BeeMutation.Flux = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Flux, 7)
.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.getConfig().ExtraBeesInstalled)
{
BeeMutation.Skulking = new BeeMutation(Allele.Mysterious, Allele.getExtraSpecies("desolate"), Allele.Skulking, 10);
BeeMutation.Brainy = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("rotten"), Allele.Brainy, 12);
BeeMutation.Gossamer = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("ancient"), Allele.Gossamer, 10);
BeeMutation.Batty = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("rock"), Allele.Batty, 14);
BeeMutation.Ghastly = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("creeper"), Allele.Ghastly, 13);
}
else
{
BeeMutation.Skulking = new BeeMutation(Allele.Mysterious, Allele.getBaseSpecies("Modest"), Allele.Skulking, 10);
BeeMutation.Brainy = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Sinister"), Allele.Brainy, 10);
BeeMutation.Gossamer = new BeeMutation(Allele.Skulking, Allele.Supernatural, Allele.Gossamer, 10);
BeeMutation.Batty = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Frugal"), Allele.Batty, 11);
BeeMutation.Ghastly = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Austere"), Allele.Ghastly, 13);
}
BeeMutation.Gossamer.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.WANING_CRESCENT);
BeeMutation.Wispy = new BeeMutation(Allele.Gossamer, Allele.getBaseSpecies("Cultivated"), Allele.Wispy, 8);
}
}
@@ -1,95 +0,0 @@
package thaumicbees.bees.genetics;
import forestry.api.apiculture.IAlleleBeeSpecies;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IAllele;
public class Allele implements IAllele
{
public static BeeSpecies Esoteric;
public static BeeSpecies Mysterious;
public static BeeSpecies Arcane;
public static BeeSpecies Charmed;
public static BeeSpecies Enchanted;
public static BeeSpecies Supernatural;
public static BeeSpecies Pupil;
public static BeeSpecies Scholarly;
public static BeeSpecies Savant;
public static BeeSpecies Stark;
public static BeeSpecies Air;
public static BeeSpecies Water;
public static BeeSpecies Earth;
public static BeeSpecies Fire;
public static BeeSpecies Infused;
public static BeeSpecies Aware;
public static BeeSpecies Vis;
public static BeeSpecies Pure;
public static BeeSpecies Flux;
public static BeeSpecies Node;
public static BeeSpecies Skulking;
public static BeeSpecies Brainy;
public static BeeSpecies Gossamer;
public static BeeSpecies Wispy;
public static BeeSpecies Batty;
public static BeeSpecies Ghastly;
public static AlleleInteger fertilityHighDominant;
public static AlleleFlower flowerBookshelf;
public static AlleleFlower flowerThaumcraft;
public static AlleleFlower flowerAuraNode;
public static AlleleFlower flowerNodePurify;
public static AlleleFlower flowerNodeFluxify;
public static AlleleEffectCure cleansingEffect;
public static AlleleEffectPotion digSpeed;
public static AlleleEffectPotion moveSpeed;
public static AlleleEffectSpawnMob spawnBrainyZombie;
public static AlleleEffectSpawnMob spawnWisp;
public static AlleleEffectSpawnMob spawnBats;
public static AlleleEffectSpawnMob spawnGhast;
public static AlleleEffectAuraNodeGrow nodeGen;
private String uid;
private boolean dominant;
public static IAlleleBeeSpecies getBaseSpecies(String name)
{
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("forestry.species").append(name).toString());
}
public static IAlleleBeeSpecies getExtraSpecies(String name)
{
return (IAlleleBeeSpecies) AlleleManager.alleleRegistry.getAllele((new StringBuilder()).append("extrabees.species.").append(name).toString());
}
public static IAllele getBaseAllele(String name)
{
return AlleleManager.getAllele(name);
}
public Allele(String id, boolean isDominant)
{
this.uid = "thaumicbees." + id;
this.dominant = isDominant;
AlleleManager.alleleRegistry.registerAllele(this);
}
@Override
public String getUID()
{
return this.uid;
}
@Override
public boolean isDominant()
{
return this.dominant;
}
}
@@ -1,180 +0,0 @@
package thaumicbees.bees.genetics;
import forestry.api.apiculture.*;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import forestry.api.genetics.*;
import java.util.HashMap;
import net.minecraft.item.ItemStack;
import net.minecraft.stats.Achievement;
import net.minecraft.world.World;
public class BeeSpecies extends Allele implements IAlleleBeeSpecies
{
private String name;
private String descripton;
private String binomial;
private String authority;
private int bodyType;
private int primaryColour;
private int secondaryColour;
private EnumTemperature temperature;
private EnumHumidity humidity;
private boolean hasEffect;
private boolean isSecret;
private boolean isCounted;
private IClassification branch;
private HashMap products;
private HashMap specialty;
private IAllele genomeTemplate[];
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IClassification classification, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesDominant)
{
this(speciesName, speciesDescription, genusName, classification, 0, firstColour, secondColour, preferredTemp, preferredHumidity, hasGlowEffect, true, true, isSpeciesDominant);
}
public BeeSpecies(String speciesName, String speciesDescription, String genusName, IClassification classification, int body, int firstColour, int secondColour, EnumTemperature preferredTemp, EnumHumidity preferredHumidity, boolean hasGlowEffect, boolean isSpeciesSecret, boolean isSpeciesCounted, boolean isSpeciesDominant)
{
super("species" + speciesName, isSpeciesDominant);
name = speciesName;
descripton = speciesDescription;
binomial = genusName;
authority = "MysteriousAges";
bodyType = body;
primaryColour = firstColour;
secondaryColour = secondColour;
temperature = preferredTemp;
humidity = preferredHumidity;
hasEffect = hasGlowEffect;
isSecret = isSpeciesSecret;
isCounted = isSpeciesCounted;
products = new HashMap();
specialty = new HashMap();
this.branch = classification;
this.genomeTemplate = new IAllele[EnumBeeChromosome.values().length];
}
public BeeSpecies setGene(EnumBeeChromosome chromosome, IAllele allele)
{
genomeTemplate[chromosome.ordinal()] = allele;
return this;
}
public BeeSpecies setGenome(IAllele genome[])
{
genomeTemplate = genome;
return this;
}
public IAllele[] getGenome()
{
return genomeTemplate;
}
public BeeSpecies addProduct(ItemStack produce, int percentChance)
{
products.put(produce, Integer.valueOf(percentChance));
return this;
}
public BeeSpecies addSpecialty(ItemStack produce, int percentChance)
{
specialty.put(produce, Integer.valueOf(percentChance));
return this;
}
public ItemStack getBeeItem(EnumBeeType beeType)
{
return BeeManager.beeInterface.getBeeStack(BeeManager.beeInterface.getBee(null, BeeManager.beeInterface.templateAsGenome(genomeTemplate)), beeType);
}
public String getName()
{
return name;
}
public String getDescription()
{
return descripton;
}
public int getBodyType()
{
return bodyType;
}
public int getPrimaryColor()
{
return primaryColour;
}
public int getSecondaryColor()
{
return secondaryColour;
}
public EnumTemperature getTemperature()
{
return temperature;
}
public EnumHumidity getHumidity()
{
return humidity;
}
public boolean hasEffect()
{
return hasEffect;
}
public boolean isSecret()
{
return isSecret;
}
public boolean isCounted()
{
return isCounted;
}
public String getBinomial()
{
return binomial;
}
public String getAuthority()
{
return authority;
}
public IClassification getBranch()
{
return this.branch;
}
public HashMap getProducts()
{
return products;
}
public HashMap getSpecialty()
{
return specialty;
}
public boolean isJubilant(World world, int biomeid, int x, int i, int j)
{
return true;
}
/**
* @deprecated Method getAchievement is deprecated
*/
public Achievement getAchievement()
{
return null;
}
}
@@ -3,9 +3,11 @@ package thaumicbees.block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import thaumicbees.main.CommonProxy;
import net.minecraft.block.Block;
import thaumicbees.tile.TileEntityMagicApiary;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import forestry.api.apiculture.IBee;
@@ -14,7 +16,7 @@ import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
public class BlockMagicApiary extends Block
public class BlockMagicApiary extends BlockContainer
{
public BlockMagicApiary(int par1)
{
@@ -26,8 +28,29 @@ public class BlockMagicApiary extends Block
@Override
@SideOnly(Side.CLIENT)
public int getBlockTexture(IBlockAccess par1iBlockAccess, int par2, int par3, int par4, int par5)
public int getBlockTexture(IBlockAccess worldAccess, int x, int y, int z, int side)
{
return super.getBlockTexture(par1iBlockAccess, par2, par3, par4, par5);
int texture = 48;
if (side == 0 || side == 1)
{
texture = 50;
}
return texture;
}
public int getBlockTextureFromSideAndMetadata(int side, int meta)
{
int texture = 48;
if (side == 0 || side == 1)
{
texture = 50;
}
return texture;
}
@Override
public TileEntity createNewTileEntity(World var1)
{
return new TileEntityMagicApiary();
}
}
@@ -0,0 +1,466 @@
package thaumicbees.compat;
import java.io.File;
import java.lang.reflect.Field;
import java.util.ArrayList;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ItemApi;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.research.ResearchItem;
import thaumcraft.api.research.ResearchList;
import thaumicbees.bees.Allele;
import thaumicbees.bees.BeeGenomeManager;
import thaumicbees.item.ItemComb;
import thaumicbees.item.ItemMiscResources;
import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType;
import thaumicbees.item.types.LiquidType;
import thaumicbees.item.types.PollenType;
import thaumicbees.item.types.PropolisType;
import thaumicbees.item.types.ResourceType;
import thaumicbees.item.types.WaxType;
import thaumicbees.main.CommonProxy;
import thaumicbees.main.Config;
import thaumicbees.main.ThaumicBees;
import thaumicbees.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 CompatabilityManager
{
public static ItemStack getExtraBeeItem(String field)
{
ItemStack value = null;
try
{
Class src = Class.forName("binnie.extrabees.core.ExtraBeeItem");
Field f = src.getDeclaredField(field);
Item i = (Item) f.get(null);
value = new ItemStack(i);
}
catch (Exception e)
{
}
return value;
}
public static void setupBackpacks()
{
if (ThaumicBees.getConfig().AddThaumcraftItemsToBackpacks)
{
// Add all shards and Thaumium to miner's backpack
String ids = Config.tcShard.itemID + ":" + -1 + ";"
+ Config.tcMiscResource.itemID + ":" + ThaumcraftHelper.MiscResource.THAUMIUM.ordinal();
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "miner@" + ids);
// All resources go into Thaumaturge's backpack
ids = Config.tcMiscResource.itemID + ":" + -1 + ";"
+ Config.tcShard.itemID + ":" + -1 + ";"
+ Config.tcFilledJar.itemID + ":" + -1 + ";"
+ Config.tcCrystal.blockID + ":" + -1 + ";"
+ Config.tcJar.blockID + ":" + -1 + ";"
+ Config.tcGolem.itemID + ":" + -1 + ";"
+ Config.solidFlux.itemID + ":" + -1;
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ids);
// Add some plants & saplings to Forester's
ids = Config.tcPlant.blockID + ":" + "-1" + ";"
+ Config.tcLeaf.blockID + ":" + -1 + ";"
+ Config.tcLog.blockID + ":" + "-1";
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "forester@" + ids);
// Add Wisp & brains to Hunter's
ids = Config.tcWispEssence.itemID + ":" + -1 + ";"
+ Config.tcMiscResource.itemID + ":" + ThaumcraftHelper.MiscResource.ZOMBIE_BRAIN.ordinal();
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "hunter@" + ids);
// Add Marker, warded stone, candle to builder
ids = Config.tcCandle.blockID + ":" + -1 + ";"
+ Config.tcMarker.blockID + ":" + -1 + ";"
+ Config.tcWarded.blockID + ":" + -1;
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "builder@" + ids);
}
}
public static void setupItemAspects()
{
setupItemAspectsThaumicBees();
setupItemAspectsForestry();
if (ThaumicBees.getConfig().ExtraBeesInstalled)
{
setupItemAspectsExtraBees();
}
}
private static void setupItemAspectsThaumicBees()
{
ObjectTags tags;
ItemStack itemStack;
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
ThaumcraftApi.registerObjectTag(Config.wax.itemID, WaxType.MAGIC.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.MAGIC, 1);
ThaumcraftApi.registerObjectTag(Config.drops.itemID, DropType.ENCHANTED.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 1);
ThaumcraftApi.registerObjectTag(Config.drops.itemID, DropType.INTELLECT.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.ELDRITCH, 1);
ThaumcraftApi.registerObjectTag(Config.pollen.itemID, PollenType.UNUSUAL.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, -1, tags);
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1);
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.STARK.ordinal(), tags);
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.WIND, 3);
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.AIR.ordinal(), tags);
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.FIRE, 3);
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.FIRE.ordinal(), tags);
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.WATER, 3);
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.WATER.ordinal(), tags);
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 1).add(EnumTag.EARTH, 3);
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.EARTH.ordinal(), tags);
tags = new ObjectTags(Config.propolis.itemID, -1).add(EnumTag.MAGIC, 4);
ThaumcraftApi.registerObjectTag(Config.propolis.itemID, PropolisType.INFUSED.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
ThaumcraftApi.registerObjectTag(Config.miscResources.itemID, ResourceType.LORE_FRAGMENT.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, -1, tags);
itemStack = Config.combs.getStackForType(CombType.OCCULT);
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2).add(EnumTag.MAGIC, 2);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OCCULT.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.OTHERWORLDLY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.STARK.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.AIRY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.FIREY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.WATERY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.EARTHY.ordinal(), tags);
ThaumcraftApi.registerObjectTag(Config.combs.itemID, CombType.INFUSED.ordinal(), tags);
// Tagging capsules.
tags = new ObjectTags().add(EnumTag.VOID, 2).add(EnumTag.MAGIC, 2);
ThaumcraftApi.registerComplexObjectTag(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal(), tags);
tags = new ObjectTags(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal())
.add(EnumTag.WATER, 8);
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, LiquidType.WATER.ordinal(), tags);
tags = new ObjectTags(Config.magicCapsule.itemID, LiquidType.EMPTY.ordinal())
.add(EnumTag.FIRE, 12).add(EnumTag.ROCK, 4);
ThaumcraftApi.registerObjectTag(Config.magicCapsule.itemID, LiquidType.LAVA.ordinal(), tags);
for (EnumTag tag : EnumTag.values())
{
if (tag == EnumTag.UNKNOWN)
{
continue;
}
tags = new ObjectTags().add(tag, 1);
ThaumcraftApi.registerObjectTag(Config.solidFlux.itemID, tag.id, tags);
}
}
private static void setupItemAspectsForestry()
{
ObjectTags tags;
ItemStack itemStack;
itemStack = BlockInterface.getBlock("candle");
tags = new ObjectTags().add(EnumTag.LIGHT, 1).add(EnumTag.CONTROL, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = BlockInterface.getBlock("glass");
tags = new ObjectTags(Block.glass.blockID, 0);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
// Pulsating propolis
itemStack = ItemInterface.getItem("propolis");
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.ELDRITCH, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Propolis.PULSATING.ordinal(), tags);
itemStack = ItemInterface.getItem("pollen");
tags = new ObjectTags().add(EnumTag.FLOWER, 1).add(EnumTag.PLANT, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Pollen.NORMAL.ordinal(), tags);
tags = new ObjectTags(itemStack.itemID, ForestryHelper.Pollen.NORMAL.ordinal()).add(EnumTag.COLD, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Pollen.CRYSTALLINE.ordinal(), tags);
itemStack = ItemInterface.getItem("craftingMaterial");
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.PULSATING_MESH.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.INSECT, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.SILK_WISP.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.INSECT, 4).add(EnumTag.CLOTH, 5);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.WOVEN_SILK.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.COLD, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.ICE_SHARD.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.VALUABLE, 1).add(EnumTag.PLANT, 1).add(EnumTag.INSECT, 2)
.add(EnumTag.CONTROL, 2).add(EnumTag.WOOD, 5);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CraftingMaterial.SCENTED_PANELING.ordinal(), tags);
itemStack = ItemInterface.getItem("beealyzer");
tags = new ObjectTags().add(EnumTag.VALUABLE, 3).add(EnumTag.MECHANISM, 3).add(EnumTag.METAL, 19)
.add(EnumTag.POWER, 8).add(EnumTag.CRYSTAL, 18);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("treealyzer");
tags = new ObjectTags().add(EnumTag.POWER, 3).add(EnumTag.PURE, 3).add(EnumTag.LIFE, 6)
.add(EnumTag.CRYSTAL, 12).add(EnumTag.METAL, 19);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("apatite");
tags = new ObjectTags().add(EnumTag.CRYSTAL, 2).add(EnumTag.POWER, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("impregnatedCasing");
tags = new ObjectTags().add(EnumTag.WOOD, 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, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("ash");
tags = new ObjectTags().add(EnumTag.DESTRUCTION, 1).add(EnumTag.EXCHANGE, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("honeyDrop");
tags = new ObjectTags().add(EnumTag.EXCHANGE, 2).add(EnumTag.LIFE, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("honeydew");
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("royalJelly");
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.POWER, 1).add(EnumTag.VALUABLE, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("honeyPot");
tags = new ObjectTags().add(EnumTag.LIFE, 2);
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("ambrosia");
tags = new ObjectTags().add(EnumTag.HEAL, 4);
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("beeswax");
tags = new ObjectTags().add(EnumTag.CONTROL, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("refractoryWax");
tags = new ObjectTags().add(EnumTag.FIRE, 3);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("phosphor");
tags = new ObjectTags().add(EnumTag.FIRE, 2).add(EnumTag.DESTRUCTION, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("waxCapsule");
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("waxCapsuleWater");
tags = new ObjectTags().add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("refractoryEmpty");
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.CONTROL, 1).add(EnumTag.VOID, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("refractoryWater");
tags = new ObjectTags().add(EnumTag.FIRE, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("refractoryLava");
tags = new ObjectTags().add(EnumTag.VOID, 1).add(EnumTag.FIRE, 7).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("canEmpty");
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("canWater");
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.WATER, 4);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("canLava");
tags = new ObjectTags().add(EnumTag.METAL, 1).add(EnumTag.VOID, 1).add(EnumTag.FIRE, 6).add(EnumTag.WATER, 1).add(EnumTag.ROCK, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
itemStack = ItemInterface.getItem("beeComb");
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.FIRE, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.SIMMERING.ordinal(), tags);
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.COLD, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.FROZEN.ordinal(), tags);
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.CROP, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.WHEATEN.ordinal(), tags);
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.FUNGUS, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Comb.MOSSY.ordinal(), tags);
itemStack = ItemInterface.getItem("ambrosia");
tags = new ObjectTags().add(EnumTag.LIFE, 2).add(EnumTag.HEAL, 4);
// Forestry's wood
itemStack = BlockInterface.getBlock("log1");
tags = new ObjectTags().add(EnumTag.WOOD, 8);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log2"); // Same tags
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log3"); // Same tags.
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log4"); // Still same tags.
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = ItemInterface.getItem("sapling");
tags = new ObjectTags().add(EnumTag.PLANT, 4).add(EnumTag.WOOD, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
// BEES!
itemStack = ItemInterface.getItem("beeDroneGE");
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.FLIGHT, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // All drones
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.VALUABLE, 4); // Get drone tags & add valuable
itemStack = ItemInterface.getItem("beePrincessGE");
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // All princesses.
tags = new ObjectTags().add(EnumTag.VALUABLE, 8).add(EnumTag.INSECT, 2).add(EnumTag.FLIGHT, 4);
itemStack = ItemInterface.getItem("beeQueenGE");
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); //All queens.
itemStack = ItemInterface.getItem("circuitboards");
tags = new ObjectTags().add(EnumTag.CRYSTAL, 2).add(EnumTag.METAL, 5).add(EnumTag.MECHANISM, 10)
.add(EnumTag.POWER, 10);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.BASIC.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 14)
.add(EnumTag.CONTROL, 2).add(EnumTag.EXCHANGE, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.ENHANCED.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 14);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.REFINED.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.MECHANISM, 10).add(EnumTag.POWER, 10).add(EnumTag.METAL, 19)
.add(EnumTag.VALUABLE, 10);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.CircuitBoard.INTRICATE.ordinal(), tags);
itemStack = ItemInterface.getItem("tubes");
tags = new ObjectTags(ItemInterface.getItem("ingotCopper").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.COPPER.ordinal(), tags);
tags = new ObjectTags(ItemInterface.getItem("ingotTin").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.TIN.ordinal(), tags);
tags = new ObjectTags(ItemInterface.getItem("ingotBronze").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.BRONZE.ordinal(), tags);
tags = new ObjectTags(Item.ingotIron.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.IRON.ordinal(), tags);
tags = new ObjectTags(Item.ingotGold.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.GOLD.ordinal(), tags);
tags = new ObjectTags(Item.diamond.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.DIAMOND.ordinal(), tags);
tags = new ObjectTags(Block.obsidian.blockID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.OBSIDIAN.ordinal(), tags);
tags = new ObjectTags(Item.blazePowder.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.BLAZE.ordinal(), tags);
tags = new ObjectTags().add(EnumTag.MOTION, 2).add(EnumTag.CONTROL, 2).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.RUBBER.ordinal(), tags);
tags = new ObjectTags(Item.emerald.itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.EMERALD.ordinal(), tags);
tags = new ObjectTags(ItemInterface.getItem("apatite").itemID, 0).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.APATITE.ordinal(), tags);
tags = new ObjectTags(Item.dyePowder.itemID, 4).add(EnumTag.MECHANISM, 1).add(EnumTag.POWER, 1);
ThaumcraftApi.registerObjectTag(itemStack.itemID, ForestryHelper.Tube.LAPIS.ordinal(), tags);
}
private static void setupItemAspectsExtraBees()
{
ItemStack itemStack;
ObjectTags tags;
if ((itemStack = getExtraBeeItem("comb")) != null)
{
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
}
}
public static void setupResearch()
{
ObjectTags tags;
ResearchItem startNode = new ResearchItem("TBSTARTNODE", null, 10, 0, Config.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, Config.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, Config.hiveFrameMagic)
.setParents(startNode)
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.MAGIC, 8);
ResearchItem magicFrame2 = new ResearchItem("HIVEFRAME2", tags, 8, -2, Config.hiveFrameResilient)
.setParents(magicFrame).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 5).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.HEAL, 2).add(EnumTag.FLOWER, 6);
ResearchItem gentleFrame = new ResearchItem("HIVEFRAMEGENTLE", tags, 12, -2, Config.hiveFrameGentle)
.setParents(magicFrame).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 6).add(EnumTag.EXCHANGE, 8)
.add(EnumTag.MAGIC, 8).add(EnumTag.MOTION, 4).add(EnumTag.FLESH, 4);
ResearchItem metabolicFrame = new ResearchItem("HIVEFRAMEMETA", tags, 9, -3, Config.hiveFrameMetabolic)
.setParents(magicFrame).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.DEATH, 15).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.MAGIC, 8).add(EnumTag.POISON, 6);
ResearchItem necroticFrame = new ResearchItem("HIVEFRAMENECRO", tags, 11, -3, Config.hiveFrameNecrotic)
.setParents(magicFrame).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.TIME, 4);
ResearchItem temporalFrame = new ResearchItem("HIVEFRAMETIME", tags, 9, -5, Config.hiveFrameTemporal)
.setParents(magicFrame).setHidden()
.registerResearchItem();
}
public static void registerResearch()
{
ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "research.xml");
}
}
@@ -0,0 +1,94 @@
package thaumicbees.compat;
import net.minecraft.item.Item;
import forestry.api.core.ItemInterface;
import thaumicbees.main.Config;
public class ForestryHelper
{
public static void getForestryBlocks()
{
}
public static void getForestryItems()
{
Config.fBeeComb = Item.itemsList[ItemInterface.getItem("beeComb").itemID];
Config.fPollen = Item.itemsList[ItemInterface.getItem("pollen").itemID];
Config.fCraftingResource = Item.itemsList[ItemInterface.getItem("craftingMaterial").itemID];
}
public enum CraftingMaterial
{
PULSATING_DUST, // unused
PULSATING_MESH,
SILK_WISP,
WOVEN_SILK,
DISSIPATION_CHARGE,
ICE_SHARD,
SCENTED_PANELING,
;
}
public enum Comb
{
HONEY,
COCOA,
SIMMERING,
STRINGY,
FROZEN,
DRIPPING,
SILKY,
PARCHED,
MYSTERIOUS,
IRRADIATED,
POWDERY,
REDDENED,
DARKENED,
OMEGA,
WHEATEN,
MOSSY,
;
}
public enum Propolis
{
NORMAL,
STICKY, // Unused.
PULSATING,
SILKY,
;
}
public enum Pollen
{
NORMAL,
CRYSTALLINE,
;
}
public enum CircuitBoard
{
BASIC,
ENHANCED,
REFINED,
INTRICATE,
;
}
public enum Tube
{
COPPER,
TIN,
BRONZE,
IRON,
GOLD,
DIAMOND,
OBSIDIAN,
BLAZE,
RUBBER,
EMERALD,
APATITE,
LAPIS
}
}
@@ -0,0 +1,158 @@
package thaumicbees.compat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import forestry.api.apiculture.EnumBeeChromosome;
import forestry.api.genetics.IAllele;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.crafting.ShapelessInfusionCraftingRecipes;
import thaumcraft.api.research.ResearchList;
public class ShapelessBeeInfusionCraftingRecipe extends ShapelessInfusionCraftingRecipes
{
private String alleleId;
private byte alleleSlot;
/**
* Creates & adds a Crafting recipe to Thaumcraft for our Stark bee infusions.
*/
public static void createNewRecipe(String key, String researchKey, ItemStack output, Object[] input,
int auraCost, ObjectTags tags, IAllele allele, EnumBeeChromosome slot)
{
ArrayList<ItemStack> inputList = new ArrayList(input.length);
for (Object item : input)
{
if (item instanceof ItemStack)
{
inputList.add(((ItemStack) item).copy());
}
else if (item instanceof Item)
{
inputList.add(new ItemStack((Item)item));
}
else if (item instanceof Block)
{
inputList.add(new ItemStack((Block)item));
}
else
{
throw new RuntimeException("Invalid shapeless crafting recipe!");
}
}
ThaumcraftApi.getCraftingRecipes().add(
new ShapelessBeeInfusionCraftingRecipe(key, output, inputList, auraCost, tags, allele, slot)
);
ResearchList.craftingRecipesForResearch.put(researchKey, Arrays.asList(ThaumcraftApi.getCraftingRecipes().size()-1));
}
private ShapelessBeeInfusionCraftingRecipe(String key, ItemStack output, List<ItemStack> itemList, int cost, ObjectTags tags,
IAllele allele, EnumBeeChromosome slot)
{
super(key, output, itemList, cost, tags);
this.alleleId = allele.getUID();
this.alleleSlot = (byte)slot.ordinal();
}
@Override
public boolean matches(IInventory craftingInventory, EntityPlayer player)
{
// We'll remove items from the list as they are found.
ArrayList<ItemStack> recipeItemsList = new ArrayList(this.recipeItems);
boolean invalidItemFound = false;
if (key.length() == 0 || (key.length() > 0 && ThaumcraftApiHelper.isResearchComplete(player.username, key)))
{
for (int i = 0; i < 3 && !invalidItemFound; ++i)
{
for (int j = 0; j < 3 && !invalidItemFound; ++j)
{
ItemStack itemStack = ThaumcraftApiHelper.getStackInRowAndColumn(craftingInventory, j, i);
if (itemStack != null)
{
Iterator<ItemStack> itr = recipeItemsList.iterator();
boolean currentItemInRecipe = false;
while (itr.hasNext())
{
ItemStack recipeItem = itr.next();
if (itemStack.itemID == recipeItem.itemID && (recipeItem.getItemDamage() == -1 || itemStack.getItemDamage() == recipeItem.getItemDamage()))
{
if (recipeItem.hasTagCompound())
{
currentItemInRecipe = this.hasMatchingChromosome(itemStack);
}
else
{
currentItemInRecipe = true;
}
}
if (currentItemInRecipe)
{
itr.remove();
break;
}
}
if (!currentItemInRecipe)
{
invalidItemFound = true;
}
}
}
}
}
return recipeItemsList.isEmpty() && !invalidItemFound;
}
private boolean hasMatchingChromosome(ItemStack itemStack)
{
boolean genesMatch = false;
NBTTagCompound compoundRoot = itemStack.getTagCompound();
if (compoundRoot.hasKey("Genome"))
{
NBTTagCompound genome = compoundRoot.getCompoundTag("Genome");
if (genome.hasKey("Chromosomes"))
{
NBTTagList chromosomes = genome.getTagList("Chromosomes");
for (int i = 0; i < chromosomes.tagCount() && !genesMatch; ++i)
{
NBTTagCompound genes = (NBTTagCompound)chromosomes.tagAt(i);
if (genes.hasKey("Slot") && genes.getByte("Slot") == this.alleleSlot)
{
if (genes.getString("UID0").equals(this.alleleId) && genes.getString("UID1").equals(this.alleleId))
{
genesMatch = true;
}
}
}
}
}
return genesMatch;
}
}
@@ -0,0 +1,110 @@
package thaumicbees.compat;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import thaumcraft.api.ItemApi;
import thaumicbees.main.Config;
import cpw.mods.fml.common.registry.LanguageRegistry;
public class ThaumcraftHelper
{
public static void getThaumcraftBlocks()
{
Config.tcPlant = Block.blocksList[ItemApi.getItem("blockCustomPlant", 0).itemID];
Config.tcCandle = Block.blocksList[ItemApi.getItem("blockCandle", 0).itemID];
Config.tcCrystal = Block.blocksList[ItemApi.getItem("blockCrystal", 0).itemID];
Config.tcMarker = Block.blocksList[ItemApi.getItem("blockMarker", 0).itemID];
Config.tcJar = Block.blocksList[ItemApi.getItem("blockJar", 0).itemID];
Config.tcLog = Block.blocksList[ItemApi.getItem("blockMagicalLog", 0).itemID];
Config.tcLeaf = Block.blocksList[ItemApi.getItem("blockMagicalLeaves", 0).itemID];
Config.tcWarded = Block.blocksList[ItemApi.getItem("blockWarded", 0).itemID];
}
public static void getThaumcraftItems()
{
Config.tcFilledJar = Item.itemsList[ItemApi.getItem("itemJarFilled", 0).itemID];
Config.tcMiscResource = Item.itemsList[ItemApi.getItem("itemResource", 0).itemID];
Config.tcEssentiaBottle = Item.itemsList[ItemApi.getItem("itemEssence", 0).itemID];
Config.tcShard = Item.itemsList[ItemApi.getItem("itemShard", 0).itemID];
Config.tcGolem = Item.itemsList[ItemApi.getItem("itemGolemPlacer", 0).itemID];
Config.tcWispEssence = Item.itemsList[ItemApi.getItem("itemWispEssence", 0).itemID];
Config.tcNuggets = Item.itemsList[ItemApi.getItem("itemNugget", 0).itemID];
}
public enum MiscResource
{
ALUMENTUM,
NITOR,
THAUMIUM,
QUICKSILVER,
MAGIC_TALLOW,
ZOMBIE_BRAIN,
AMBER,
ENCHANTED_FABRIC,
FLUX_FILTER,
KNOWLEDGE_FRAGMENT,
MIRRORED_GLASS,
;
}
public enum NuggetType
{
IRON,
COPPER,
TIN,
SILVER,
LEAD,
QUICKSILVER, _6, _7, _8,_9,_10,_11,_12,_13,_14,_15,
NATIVE_IRON,
NATIVE_COPPER,
NATIVE_TIN,
NATIVE_SILVER,
NATIVE_LEAD, _21,_22,_23,_24,_25,_26,_27,_28,_29,_30,
NATIVE_GOLD,
;
}
public enum ShardType
{
AIR,
FIRE,
WATER,
EARTH,
MAGIC,
DULL,
;
}
public enum Entity
{
BRAINY_ZOMBIE("entBrainyZombie", "EntityBrainyZombie"),
GIANT_BRAINY_ZOMBIE("entGiantBrainyZombie", "EntityGiantBrainyZombie"),
WISP("entWisp", "EntityWisp"),
FIREBAT("entFirebat", "EntityFireBat"),
;
private static String packageName = "thaumcraft.common.entities.monster.";
public String entityID;
private String className;
private Entity(String id, String clazz)
{
this.entityID = id;
this.className = clazz;
}
public String getClassName()
{
return packageName + this.className;
}
}
public enum BlockPlant
{
GREATWOOD_SAPLING,
SILVERWOOD_SAPLING,
SILVERLEAF,
CINDERPEARL;
}
}
@@ -13,8 +13,10 @@ public enum HiveFrameType
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,
NECROTIC("Necrotic Frame", 36, 290, 1f, 1f, 0.3f, 0.75f, 1,
new ObjectTags().add(EnumTag.DEATH, 3).add(EnumTag.POISON, 2)),
TEMPORAL("Temporal Frame", 37, 300, 1f, 1f, 2.5f, 1f, 1,
new ObjectTags().add(EnumTag.TIME, 5)),
;
private HiveFrameType(String name, int icon, int damage,
@@ -1,5 +1,7 @@
package thaumicbees.main;
import java.lang.reflect.Field;
import thaumicbees.main.render.BeeRenderEffect;
import net.minecraft.world.World;
import net.minecraftforge.client.MinecraftForgeClient;
@@ -18,6 +20,20 @@ public class ClientProxy extends CommonProxy
// Preload the TCBees items file
MinecraftForgeClient.preloadTexture(TCBEES_ITEMS_IMAGE);
MinecraftForgeClient.preloadTexture(TCBEES_LIQUIDS_IMAGE);
Field f;
try
{
f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
ThaumicBees.getConfig().DrawParticleEffects = f.getBoolean(null);
f = Class.forName("forestry.core.config.Defaults").getField("TEXTURE_PARTICLES_BEE");
thaumicbees.main.CommonProxy.FORESTRY_GFX_BEEEFFECTS = (String)f.get(null);
}
catch (Exception e)
{
e.printStackTrace();
}
}
@Override
@@ -4,6 +4,7 @@ import java.io.File;
import thaumicbees.block.BlockMagicApiary;
import thaumicbees.compat.CompatabilityManager;
import thaumicbees.compat.ForestryHelper;
import thaumicbees.compat.ThaumcraftHelper;
import thaumicbees.item.ItemCapsule;
import thaumicbees.item.ItemComb;
@@ -20,11 +21,14 @@ import thaumicbees.storage.BackpackDefinition;
import cpw.mods.fml.common.FMLLog;
import cpw.mods.fml.common.event.FMLInterModComms;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import forestry.api.storage.BackpackManager;
import forestry.api.storage.EnumBackpackType;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property;
import net.minecraftforge.oredict.OreDictionary;
@@ -52,6 +56,7 @@ public class Config
public static ItemPollen pollen;
public static ItemSolidFlux solidFlux;
public static ItemMiscResources miscResources;
public static ItemFood jellyBaby;
//----- Liquid Capsules --------------------
public static ItemCapsule magicCapsule;
@@ -62,12 +67,18 @@ public class Config
public static ItemMagicHiveFrame hiveFrameGentle;
public static ItemMagicHiveFrame hiveFrameMetabolic;
public static ItemMagicHiveFrame hiveFrameNecrotic;
public static ItemMagicHiveFrame hiveFrameTemporal;
//----- Backpacks ------------------------------------------
public static Item thaumaturgeBackpackT1;
public static Item thaumaturgeBackpackT2;
public static BackpackDefinition thaumaturgeBackpackDef;
//----- Forestry Blocks ------------------------------------
//----- Forestry Items -------------------------------------
public static Item fBeeComb;
public static Item fPollen;
public static Item fCraftingResource;
//----- Thaumcraft Blocks ----------------------------------
public static Block tcPlant;
public static Block tcCandle;
@@ -106,6 +117,7 @@ public class Config
public void setupBlocks()
{
ThaumcraftHelper.getThaumcraftBlocks();
ForestryHelper.getForestryBlocks();
int blockIdBase = 1750;
@@ -116,6 +128,7 @@ public class Config
public void setupItems()
{
ThaumcraftHelper.getThaumcraftItems();
ForestryHelper.getForestryItems();
int itemIDBase = 26090;
@@ -162,6 +175,7 @@ public class Config
hiveFrameGentle = new ItemMagicHiveFrame(tbConfig.getItem("frameGentle", itemIDBase++).getInt(), HiveFrameType.GENTLE);
hiveFrameMetabolic = new ItemMagicHiveFrame(tbConfig.getItem("frameMetabolic", itemIDBase++).getInt(), HiveFrameType.METABOLIC);
hiveFrameNecrotic = new ItemMagicHiveFrame(tbConfig.getItem("frameNecrotic", itemIDBase++).getInt(), HiveFrameType.NECROTIC);
hiveFrameTemporal = new ItemMagicHiveFrame(tbConfig.getItem("frameTemporal", itemIDBase++).getInt(), HiveFrameType.TEMPORAL);
// Future frames, so they all are clumped together.
itemIDBase++;
itemIDBase++;
@@ -174,6 +188,10 @@ public class Config
itemIDBase++;
// New items here.
jellyBaby = new ItemFood(tbConfig.getItem("sugarSnack", itemIDBase++).getInt(), 1, false).setAlwaysEdible()
.setPotionEffect(Potion.moveSpeed.id, 5, 1, 1f);
jellyBaby.setTextureFile(CommonProxy.TCBEES_ITEMS_IMAGE).setIconIndex(19).setItemName("sugarSnack");
LanguageRegistry.addName(jellyBaby, "Jelly Baby");
}
@@ -3,7 +3,6 @@ package thaumicbees.main;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.ForgeSubscribe;
import thaumicbees.bees.TBBeeManager;
import thaumicbees.compat.CompatabilityManager;
import thaumicbees.main.utils.CraftingManager;
import thaumicbees.main.utils.VersionInfo;
@@ -17,6 +16,7 @@ import forestry.api.core.ItemInterface;
@Mod(
modid="ThaumicBees",
name="Thaumic Bees",
useMetadata=true,
acceptedMinecraftVersions=VersionInfo.MCVersion,
version=VersionInfo.Version,
@@ -33,11 +33,9 @@ public class ThaumicBees
private String configsPath;
private Config modConfig;
private TBBeeManager plugin;
public ThaumicBees()
{
this.plugin = new TBBeeManager();
}
@Mod.PreInit
@@ -72,14 +70,12 @@ public class ThaumicBees
this.modConfig.setupItems();
CompatabilityManager.setupBackpacks();
plugin.doInit();
}
@Mod.PostInit
public void postInit(FMLPostInitializationEvent event)
{
plugin.postInit();
this.setupBees();
this.modConfig.saveConfigs();
CompatabilityManager.setupItemAspects();
@@ -98,4 +94,11 @@ public class ThaumicBees
{
return object.modConfig;
}
private void setupBees()
{
thaumicbees.bees.Allele.setupAdditionalAlleles();
thaumicbees.bees.BeeSpecies.setupBeeSpecies();
thaumicbees.bees.BeeMutation.setupMutations();
}
}
@@ -3,13 +3,15 @@ package thaumicbees.main.utils;
import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.bees.Allele;
import thaumicbees.bees.BeeGenomeManager;
import thaumicbees.bees.genetics.Allele;
import thaumicbees.bees.BeeSpecies;
import thaumicbees.compat.ShapelessBeeInfusionCraftingRecipe;
import thaumicbees.compat.ThaumcraftHelper;
import thaumicbees.item.ItemCapsule;
import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType;
import thaumicbees.item.types.HiveFrameType;
import thaumicbees.item.types.LiquidType;
import thaumicbees.item.types.PropolisType;
import thaumicbees.item.types.ResourceType;
@@ -40,13 +42,12 @@ public class CraftingManager
// Essentia bottles
ItemStack output = new ItemStack(Config.tcEssentiaBottle);
output.stackSize = 8;
GameRegistry.addRecipe(output, new Object[]
{
GameRegistry.addRecipe(output, new Object[] {
" C ", "GPG", "PGP",
'G', Config.wax,
'C', Item.clay,
'P', Block.thinGlass
});
});
output = new ItemStack(Config.tcEssentiaBottle);
output.stackSize = 4;
@@ -73,7 +74,7 @@ public class CraftingManager
"SWS", "NCN", "SWS",
'S', Item.silk,
'W', Block.cloth,
'N', Item.goldNugget,
'N', new ItemStack(Config.tcMiscResource.itemID, 1, ThaumcraftHelper.MiscResource.AMBER.ordinal()),
'C', Block.chest
});
@@ -228,7 +229,6 @@ public class CraftingManager
});
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
BeeManager.inducers.put(output, 80);
output = Config.miscResources.getStackForType(ResourceType.EXTENDED_FERTILIZER);
ItemStack inputA = ItemInterface.getItem("apatite");
@@ -278,63 +278,60 @@ public class CraftingManager
'S', Item.rottenFlesh,
'x', inputA
});
output = new ItemStack(Config.hiveFrameTemporal);
tags = new ObjectTags().add(EnumTag.WOOD, 4).add(EnumTag.INSECT, 8).add(EnumTag.TIME, 2);
ThaumcraftApi.addInfusionCraftingRecipe("HIVEFRAMETIME", "FRAMETIME", 50, tags, output, new Object[] {
"tSt", "SFS", "tSt",
't', Item.stick,
'S', Block.sand,
'F', inputA
});
ItemStack drone = BeeGenomeManager.getBeeNBTForSpecies(Allele.Stark, EnumBeeType.DRONE);
ItemStack princess = BeeGenomeManager.getBeeNBTForSpecies(Allele.Stark, EnumBeeType.PRINCESS);
ItemStack airDrone = Allele.Air.getBeeItem(EnumBeeType.DRONE);
ItemStack airPrincess = Allele.Air.getBeeItem(EnumBeeType.PRINCESS);
ItemStack waterDrone = Allele.Water.getBeeItem(EnumBeeType.DRONE);
ItemStack waterPrincess = Allele.Water.getBeeItem(EnumBeeType.PRINCESS);
ItemStack earthDrone = Allele.Earth.getBeeItem(EnumBeeType.DRONE);
ItemStack earthPrincess = Allele.Earth.getBeeItem(EnumBeeType.PRINCESS);
ItemStack fireDrone = Allele.Fire.getBeeItem(EnumBeeType.DRONE);
ItemStack firePrincess = Allele.Fire.getBeeItem(EnumBeeType.PRINCESS);
ItemStack magicDrone = Allele.Infused.getBeeItem(EnumBeeType.DRONE);
ItemStack magicPrincess = Allele.Infused.getBeeItem(EnumBeeType.PRINCESS);
ItemStack drone = BeeGenomeManager.getBeeNBTForSpecies(BeeSpecies.STARK, EnumBeeType.DRONE);
ItemStack princess = BeeGenomeManager.getBeeNBTForSpecies(BeeSpecies.STARK, EnumBeeType.PRINCESS);
String researchKey = "BEEINFUSION";
tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION1", airDrone,
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION1", BeeSpecies.AIR.getBeeItem(EnumBeeType.DRONE),
new ItemStack[] { drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal())},
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION2", airPrincess,
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION2", BeeSpecies.AIR.getBeeItem(EnumBeeType.PRINCESS),
new ItemStack[] { princess , new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.AIR.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION3", fireDrone, new Object[]
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION3", BeeSpecies.FIRE.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION4", firePrincess, new Object[]
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION4", BeeSpecies.FIRE.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.FIRE.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION5", waterDrone, new Object[]
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION5", BeeSpecies.WATER.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION6", waterPrincess, new Object[]
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION6", BeeSpecies.WATER.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.WATER.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION7", earthDrone, new Object[]
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION7", BeeSpecies.EARTH.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION8", earthPrincess, new Object[]
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION8", BeeSpecies.EARTH.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.EARTH.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
tags = new ObjectTags().add(EnumTag.MAGIC, 40).add(EnumTag.FLUX, 24);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION9", magicDrone, new Object[]
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION9", BeeSpecies.INFUSED.getBeeItem(EnumBeeType.DRONE), new Object[]
{ drone, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION0", magicPrincess, new Object[]
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
ShapelessBeeInfusionCraftingRecipe.createNewRecipe(researchKey, "BEEINFUSION0", BeeSpecies.INFUSED.getBeeItem(EnumBeeType.PRINCESS), new Object[]
{ princess, new ItemStack(Config.tcShard, 1, ThaumcraftHelper.ShardType.MAGIC.ordinal()) },
100, tags, Allele.Stark, EnumBeeChromosome.SPECIES);
100, tags, BeeSpecies.STARK, EnumBeeChromosome.SPECIES);
registerLiquidContainer(Config.magicCapsule);
}
@@ -345,9 +342,9 @@ public class CraftingManager
ItemStack filled;
LiquidStack liquid = null;
for (LiquidType l : LiquidType.values())
for (LiquidType liquidType : LiquidType.values())
{
switch (l)
switch (liquidType)
{
case EMPTY:
liquid = null;
@@ -359,23 +356,23 @@ public class CraftingManager
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
break;
default:
liquid = LiquidDictionary.getLiquid(l.liquidID, baseCapsule.getType().capacity);
liquid = LiquidDictionary.getLiquid(liquidType.liquidID, baseCapsule.getType().capacity);
break;
}
if (liquid != null)
{
filled = new ItemStack(baseCapsule, 1, l.ordinal());
filled = new ItemStack(baseCapsule, 1, liquidType.ordinal());
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
// Register with Squeezer/Bottler
RecipeManagers.bottlerManager.addRecipe(5, liquid, empty, filled);
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[] {filled} , liquid,
Config.wax.getStackForType(WaxType.MAGIC), 20);
l.available = true;
liquidType.available = true;
}
}
// Empty will be set to unavailable. Obviously, it always is.
LiquidType.EMPTY.available = true;
}
}
}
@@ -9,6 +9,6 @@ public class VersionInfo
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";
public static final String Depends = "required-after:Forestry;required-after:Thaumcraft@[3.0.3,);after:ExtraBees";
}
@@ -0,0 +1,280 @@
package thaumicbees.tile;
import forestry.api.apiculture.IBee;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.core.EnumHumidity;
import forestry.api.core.EnumTemperature;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
public class TileEntityMagicApiary extends TileEntity implements IInventory, IBeeHousing
{
@Override
public int getSizeInventory()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public ItemStack getStackInSlot(int var1)
{
// TODO Auto-generated method stub
return null;
}
@Override
public ItemStack decrStackSize(int var1, int var2)
{
// TODO Auto-generated method stub
return null;
}
@Override
public ItemStack getStackInSlotOnClosing(int var1)
{
// TODO Auto-generated method stub
return null;
}
@Override
public void setInventorySlotContents(int var1, ItemStack var2)
{
// TODO Auto-generated method stub
}
@Override
public String getInvName()
{
return "thaumicbees.magicApiary";
}
@Override
public int getInventoryStackLimit()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean isUseableByPlayer(EntityPlayer var1)
{
return true;
}
@Override
public void openChest() { }
@Override
public void closeChest() { }
@Override
public float getTerritoryModifier(IBeeGenome genome)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public float getMutationModifier(IBeeGenome genome, IBeeGenome mate)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public float getLifespanModifier(IBeeGenome genome, IBeeGenome mate)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public float getProductionModifier(IBeeGenome genome)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public float getFloweringModifier(IBeeGenome genome)
{
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean isSealed()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isSelfLighted()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isSunlightSimulated()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean isHellish()
{
// TODO Auto-generated method stub
return false;
}
@Override
public void onQueenChange(ItemStack queen)
{
// TODO Auto-generated method stub
}
@Override
public void wearOutEquipment(int amount)
{
// TODO Auto-generated method stub
}
@Override
public void onQueenDeath(IBee queen)
{
// TODO Auto-generated method stub
}
@Override
public void onPostQueenDeath(IBee queen)
{
// TODO Auto-generated method stub
}
@Override
public int getXCoord()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public int getYCoord()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public int getZCoord()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public ItemStack getQueen()
{
// TODO Auto-generated method stub
return null;
}
@Override
public ItemStack getDrone()
{
// TODO Auto-generated method stub
return null;
}
@Override
public void setQueen(ItemStack itemstack)
{
// TODO Auto-generated method stub
}
@Override
public void setDrone(ItemStack itemstack)
{
// TODO Auto-generated method stub
}
@Override
public int getBiomeId()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public EnumTemperature getTemperature()
{
// TODO Auto-generated method stub
return null;
}
@Override
public EnumHumidity getHumidity()
{
// TODO Auto-generated method stub
return null;
}
@Override
public World getWorld()
{
// TODO Auto-generated method stub
return null;
}
@Override
public String getOwnerName()
{
// TODO Auto-generated method stub
return null;
}
@Override
public void setErrorState(int state)
{
// TODO Auto-generated method stub
}
@Override
public int getErrorOrdinal()
{
// TODO Auto-generated method stub
return 0;
}
@Override
public boolean canBreed()
{
// TODO Auto-generated method stub
return false;
}
@Override
public boolean addProduct(ItemStack product, boolean all)
{
// TODO Auto-generated method stub
return false;
}
}