mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4125bbf647 | ||
|
|
bb5319f177 |
No files matched your search
@@ -1,3 +1,3 @@
|
|||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Fri Jan 11 02:54:19 PST 2013
|
#Sat Jan 19 14:32:46 PST 2013
|
||||||
build.number=68
|
build.number=77
|
||||||
@@ -17,14 +17,14 @@
|
|||||||
|
|
||||||
<property name="mc.version" value="1.4.7"/>
|
<property name="mc.version" value="1.4.7"/>
|
||||||
<property name="forge.version" value="6.6.0.491"/>
|
<property name="forge.version" value="6.6.0.491"/>
|
||||||
<property name="thaumicbees.version" value="1.1.702"/>
|
<property name="thaumicbees.version" value="1.2.705"/>
|
||||||
|
|
||||||
<!-- for local deployment only, not used by main -->
|
<!-- for local deployment only, not used by main -->
|
||||||
<property name="deploy.type" value="previews" />
|
<property name="deploy.type" value="previews" />
|
||||||
<property name="deploy.root" value="C:\Users\Marc\Dropbox\Public\ThaumicBees" />
|
<property name="deploy.root" value="C:\Users\Marc\Dropbox\Public\ThaumicBees" />
|
||||||
<property name="deploy.dir" value="${deploy.root}\${deploy.type}" />
|
<property name="deploy.dir" value="${deploy.root}\${deploy.type}" />
|
||||||
<property name="share.dir" value="C:\Users\Marc\Dropbox\Shared\ThaumicBees" />
|
<property name="share.dir" value="C:\Users\Marc\Dropbox\Shared\ThaumicBees" />
|
||||||
<property name="local.dir" value="D:\Games\Minecraft\MultiMC\instances\1.4.6test\minecraft\mods" />
|
<property name="local.dir" value="D:\Games\Minecraft\MultiMC\instances\1.4.6 pure\minecraft\mods" />
|
||||||
|
|
||||||
<!-- TARGETS -->
|
<!-- TARGETS -->
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
|
|||||||
@@ -1,92 +0,0 @@
|
|||||||
package thaumicbees.bees;
|
|
||||||
|
|
||||||
import forestry.api.genetics.IClassification;
|
|
||||||
import forestry.api.genetics.IAlleleSpecies;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
public class BeeClassification implements IClassification
|
|
||||||
{
|
|
||||||
|
|
||||||
public BeeClassification()
|
|
||||||
{
|
|
||||||
// TODO
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public EnumClassLevel getLevel()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getUID()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getName()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getScientific()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IClassification[] getMemberGroups()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addMemberGroup(IClassification group)
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IAlleleSpecies[] getMemberSpecies()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addMemberSpecies(IAlleleSpecies species)
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public IClassification getParent()
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setParent(IClassification parent)
|
|
||||||
{
|
|
||||||
// TODO Auto-generated method stub
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -16,16 +16,24 @@ import thaumcraft.api.ThaumcraftApi;
|
|||||||
import thaumicbees.bees.genetics.Allele;
|
import thaumicbees.bees.genetics.Allele;
|
||||||
import thaumicbees.bees.genetics.AlleleEffectCure;
|
import thaumicbees.bees.genetics.AlleleEffectCure;
|
||||||
import thaumicbees.bees.genetics.AlleleEffectPotion;
|
import thaumicbees.bees.genetics.AlleleEffectPotion;
|
||||||
|
import thaumicbees.bees.genetics.AlleleEffectSpawnMob;
|
||||||
|
import thaumicbees.bees.genetics.AlleleEffectSpawnWisp;
|
||||||
import thaumicbees.bees.genetics.AlleleFlower;
|
import thaumicbees.bees.genetics.AlleleFlower;
|
||||||
|
import thaumicbees.bees.genetics.AlleleInteger;
|
||||||
import thaumicbees.bees.genetics.BeeGenomeManager;
|
import thaumicbees.bees.genetics.BeeGenomeManager;
|
||||||
import thaumicbees.bees.genetics.BeeMutation;
|
import thaumicbees.bees.genetics.BeeMutation;
|
||||||
import thaumicbees.bees.genetics.BeeSpecies;
|
import thaumicbees.bees.genetics.BeeSpecies;
|
||||||
|
import thaumicbees.bees.genetics.MoonPhase;
|
||||||
|
import thaumicbees.compat.TCEntity;
|
||||||
|
import thaumicbees.compat.TCShardType;
|
||||||
|
import thaumicbees.compat.ThaumcraftCompat;
|
||||||
|
import thaumicbees.compat.TCMiscResource;
|
||||||
|
import thaumicbees.item.ItemComb;
|
||||||
import thaumicbees.item.ItemManager;
|
import thaumicbees.item.ItemManager;
|
||||||
import thaumicbees.item.ItemComb.CombType;
|
import thaumicbees.item.ItemComb.CombType;
|
||||||
import thaumicbees.item.ItemDrop.DropType;
|
import thaumicbees.item.ItemDrop.DropType;
|
||||||
import thaumicbees.item.ItemMiscResources.ResourceType;
|
import thaumicbees.item.ItemMiscResources.ResourceType;
|
||||||
import thaumicbees.main.ThaumcraftCompat;
|
import thaumicbees.item.ItemPollen.PollenType;
|
||||||
import thaumicbees.main.ThaumcraftCompat.TCMiscResource;
|
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
@@ -37,8 +45,8 @@ import net.minecraft.world.World;
|
|||||||
|
|
||||||
public class ThaumicBeesPlugin implements IPlugin
|
public class ThaumicBeesPlugin implements IPlugin
|
||||||
{
|
{
|
||||||
|
|
||||||
private static int defaultBodyColour = 0xFF6E0D;
|
private static int defaultBodyColour = 0xFF6E0D;
|
||||||
|
private static int malevolentBodyColour = 0xe15236;
|
||||||
private static boolean hideSpecies = true;
|
private static boolean hideSpecies = true;
|
||||||
|
|
||||||
public boolean isAvailable()
|
public boolean isAvailable()
|
||||||
@@ -55,7 +63,7 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
Field f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
|
Field f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
|
||||||
ThaumicBees.object.configFlags.DrawParticleEffects = f.getBoolean(null);
|
ThaumicBees.getInstanceConfig().DrawParticleEffects = f.getBoolean(null);
|
||||||
|
|
||||||
f = Class.forName("forestry.core.config.Defaults").getField("TEXTURE_PARTICLES_BEE");
|
f = Class.forName("forestry.core.config.Defaults").getField("TEXTURE_PARTICLES_BEE");
|
||||||
thaumicbees.main.CommonProxy.FORESTRY_GFX_BEEEFFECTS = (String)f.get(null);
|
thaumicbees.main.CommonProxy.FORESTRY_GFX_BEEEFFECTS = (String)f.get(null);
|
||||||
@@ -68,21 +76,45 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
|
|
||||||
public void postInit()
|
public void postInit()
|
||||||
{
|
{
|
||||||
|
setupAdditionalAlleles();
|
||||||
setupBeeSpecies();
|
setupBeeSpecies();
|
||||||
setupBeeMutations();
|
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);
|
||||||
|
// TODO: Once TC API is out, write new provider for aura nodes
|
||||||
|
Allele.flowerAuraNode = Allele.flowerThaumcraft;
|
||||||
|
// TODO: Onec TC API is out, write provider to purify node
|
||||||
|
Allele.flowerNodePurify = Allele.flowerThaumcraft;
|
||||||
|
// TODO: Once TC API is out, write provider to flux up node
|
||||||
|
Allele.flowerNodeFluxify = Allele.flowerThaumcraft;
|
||||||
|
|
||||||
|
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.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, "Brainy", TCEntity.BRAINY_ZOMBIE.entityID);
|
||||||
|
Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null);
|
||||||
|
|
||||||
|
Allele.spawnBats = new AlleleEffectSpawnMob("effectBatty", false, "Batty", TCEntity.FIREBAT.entityID);
|
||||||
|
Allele.spawnBats.setThrottle(300).setSpawnsOnPlayerNear("Bat");
|
||||||
|
|
||||||
|
Allele.spawnWisp = new AlleleEffectSpawnWisp("effectWispy", false, "Wispy", TCEntity.WISP.entityID);
|
||||||
|
Allele.spawnWisp.setThrottle(1800);
|
||||||
|
|
||||||
|
//Allele.spawnGhast = new AlleleEffectSpawnMob("Ghast", false, "Ghastly", "Ghast");
|
||||||
|
//Allele.spawnGhast.setThrottle(800);
|
||||||
|
}
|
||||||
|
|
||||||
private void setupBeeSpecies()
|
private void setupBeeSpecies()
|
||||||
{
|
{
|
||||||
IBreedingManager breedingMgr = BeeManager.breedingManager;
|
IBreedingManager breedingMgr = BeeManager.breedingManager;
|
||||||
|
ItemStack forestryItem;
|
||||||
|
|
||||||
Allele.flowerBookshelf = new AlleleFlower("flowerBookshelf", new FlowerProviderBookshelf(), true);
|
|
||||||
Allele.flowerThaumcraft = new AlleleFlower("flowerThaumcraftPlant", new FlowerProviderThaumcraftFlower(), false);
|
|
||||||
|
|
||||||
Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false);
|
|
||||||
Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", "Mining", Potion.digSpeed, 7, false);
|
|
||||||
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", "Swiftness", Potion.moveSpeed, 5, false);
|
|
||||||
|
|
||||||
IClassification familyBee = AlleleManager.alleleRegistry.getClassification("family.apidae");
|
IClassification familyBee = AlleleManager.alleleRegistry.getClassification("family.apidae");
|
||||||
IClassification occult = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "occult", "Arcanus");
|
IClassification occult = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "occult", "Arcanus");
|
||||||
@@ -97,7 +129,7 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
occult.addMemberSpecies(Allele.Esoteric);
|
occult.addMemberSpecies(Allele.Esoteric);
|
||||||
breedingMgr.registerBeeTemplate(Allele.Esoteric.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Esoteric.getGenome());
|
||||||
|
|
||||||
Allele.Mysterious = new BeeSpecies("Mysterious", "<indecipherable scribblings>|Apinomicon",
|
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,
|
"mysticus", occult, 0,
|
||||||
0x762bc2, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
0x762bc2, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
false, hideSpecies, true, true);
|
false, hideSpecies, true, true);
|
||||||
@@ -106,12 +138,12 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
occult.addMemberSpecies(Allele.Mysterious);
|
occult.addMemberSpecies(Allele.Mysterious);
|
||||||
breedingMgr.registerBeeTemplate(Allele.Mysterious.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Mysterious.getGenome());
|
||||||
|
|
||||||
Allele.Arcane = new BeeSpecies("Arcane", "The pinnacle of magical bees. It is likely these lead to more powerful mutations...|Apinomicon",
|
Allele.Arcane = new BeeSpecies("Arcane", "The pinnacle of magical bees. It is likely these lead to more powerful mutations...|Azanor, Master Thaumaturge",
|
||||||
"arcanus", occult, 0,
|
"arcanus", occult, 0,
|
||||||
0xd242df, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
0xd242df, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
true, hideSpecies, true, true);
|
true, hideSpecies, true, true);
|
||||||
Allele.Arcane.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 30);
|
Allele.Arcane.addProduct(ItemManager.combs.getStackForType(CombType.OCCULT), 30);
|
||||||
Allele.Arcane.addSpecialty(ItemManager.drops.getStackForType(DropType.ENCHANTED, 1), 5);
|
Allele.Arcane.addSpecialty(ItemManager.drops.getStackForType(DropType.ENCHANTED, 1), 9);
|
||||||
Allele.Arcane.setGenome(BeeGenomeManager.getTemplateArcane());
|
Allele.Arcane.setGenome(BeeGenomeManager.getTemplateArcane());
|
||||||
occult.addMemberSpecies(Allele.Arcane);
|
occult.addMemberSpecies(Allele.Arcane);
|
||||||
breedingMgr.registerBeeTemplate(Allele.Arcane.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Arcane.getGenome());
|
||||||
@@ -119,7 +151,7 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
IClassification otherworldly = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "coeleste", "Coeleste");
|
IClassification otherworldly = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "coeleste", "Coeleste");
|
||||||
otherworldly.setParent(familyBee);
|
otherworldly.setParent(familyBee);
|
||||||
|
|
||||||
Allele.Charmed = new BeeSpecies("Charmed", "<indecipherable scribblings>|Apinomicon",
|
Allele.Charmed = new BeeSpecies("Charmed", "Your first experiments in Thaumaturgical Apiculture have yielded fruit. Buzzing fruit.|Apinomicon",
|
||||||
"larvatus", otherworldly, 0,
|
"larvatus", otherworldly, 0,
|
||||||
0x48EEEC, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
0x48EEEC, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
false, hideSpecies, true, true);
|
false, hideSpecies, true, true);
|
||||||
@@ -128,7 +160,7 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
otherworldly.addMemberSpecies(Allele.Charmed);
|
otherworldly.addMemberSpecies(Allele.Charmed);
|
||||||
breedingMgr.registerBeeTemplate(Allele.Charmed.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Charmed.getGenome());
|
||||||
|
|
||||||
Allele.Enchanted = new BeeSpecies("Enchanted", "<indecipherable scribblings>|Apinomicon",
|
Allele.Enchanted = new BeeSpecies("Enchanted", "Successive generations of Charmed bees have reinforced their connection to the unknown.|Apinomicon",
|
||||||
"cantatus", otherworldly, 0,
|
"cantatus", otherworldly, 0,
|
||||||
0x18e726, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
0x18e726, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
false, hideSpecies, true, true);
|
false, hideSpecies, true, true);
|
||||||
@@ -137,11 +169,12 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
otherworldly.addMemberSpecies(Allele.Enchanted);
|
otherworldly.addMemberSpecies(Allele.Enchanted);
|
||||||
breedingMgr.registerBeeTemplate(Allele.Enchanted.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Enchanted.getGenome());
|
||||||
|
|
||||||
Allele.Supernatural = new BeeSpecies("Supernatural", "<indecipherable scribblings>|Apinomicon",
|
Allele.Supernatural = new BeeSpecies("Supernatural", "These bees walk the line between this world and the unseen.|Apinomicon",
|
||||||
"coeleste", otherworldly, 0,
|
"coeleste", otherworldly, 0,
|
||||||
0x005614, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
0x005614, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
true, hideSpecies, true, true);
|
true, hideSpecies, true, true);
|
||||||
Allele.Supernatural.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 40);
|
Allele.Supernatural.addProduct(ItemManager.combs.getStackForType(CombType.OTHERWORLDLY), 40);
|
||||||
|
Allele.Supernatural.addSpecialty(ItemManager.pollen.getStackForType(PollenType.UNUSUAL), 8);
|
||||||
Allele.Supernatural.setGenome(BeeGenomeManager.getTemplateSupernatural());
|
Allele.Supernatural.setGenome(BeeGenomeManager.getTemplateSupernatural());
|
||||||
otherworldly.addMemberSpecies(Allele.Supernatural);
|
otherworldly.addMemberSpecies(Allele.Supernatural);
|
||||||
breedingMgr.registerBeeTemplate(Allele.Supernatural.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Supernatural.getGenome());
|
||||||
@@ -181,23 +214,23 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
IClassification stark = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "torridus", "Torridus");
|
IClassification stark = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "torridus", "Torridus");
|
||||||
stark.setParent(familyBee);
|
stark.setParent(familyBee);
|
||||||
|
|
||||||
Allele.Stark = new BeeSpecies("Stark", "\"These are unusually attracted to shards. This warrents further investigation.\"|Azanor, Thaumaturge",
|
Allele.Stark = new BeeSpecies("Stark", "\"These are unusually attracted to shards. This warrents further investigation.\"|Azanor, Master Thaumaturge",
|
||||||
"torridae", stark, 0,
|
"torridae", stark, 0,
|
||||||
0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
true, hideSpecies, true, false);
|
true, hideSpecies, true, false);
|
||||||
Allele.Stark.addProduct(ItemManager.combs.getStackForType(CombType.STARK), 5);
|
Allele.Stark.addProduct(ItemManager.combs.getStackForType(CombType.STARK), 10);
|
||||||
Allele.Stark.setGenome(BeeGenomeManager.getTemplateStark());
|
Allele.Stark.setGenome(BeeGenomeManager.getTemplateStark());
|
||||||
breedingMgr.registerBeeTemplate(Allele.Stark.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Stark.getGenome());
|
||||||
|
|
||||||
IClassification magical = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "thaumis", "Thaumis");
|
IClassification magical = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "thaumis", "Thaumis");
|
||||||
magical.setParent(familyBee);
|
magical.setParent(familyBee);
|
||||||
|
|
||||||
Allele.Air = new BeeSpecies("Aura", "They move like the wind itself, making observers feel like slackers.|Apinomicon",
|
Allele.Air = new BeeSpecies("Aura", "\"They work so fast it's breathtaking.\"|Sengir, Mad Apiarist",
|
||||||
"ventosa", magical, 0,
|
"ventosa", magical, 0,
|
||||||
0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
true, hideSpecies, true, true);
|
true, hideSpecies, true, true);
|
||||||
Allele.Air.addProduct(ItemManager.combs.getStackForType(CombType.AIRY), 20);
|
Allele.Air.addProduct(ItemManager.combs.getStackForType(CombType.AIRY), 9);
|
||||||
Allele.Air.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.QUICKSILVER.ordinal()), 10);
|
Allele.Air.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.QUICKSILVER.ordinal()), 2);
|
||||||
Allele.Air.setGenome(BeeGenomeManager.getTemplateAir());
|
Allele.Air.setGenome(BeeGenomeManager.getTemplateAir());
|
||||||
breedingMgr.registerBeeTemplate(Allele.Air.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Air.getGenome());
|
||||||
|
|
||||||
@@ -205,92 +238,226 @@ public class ThaumicBeesPlugin implements IPlugin
|
|||||||
"praefervidus", magical, 0,
|
"praefervidus", magical, 0,
|
||||||
0xE50B0B, 0x95132F, EnumTemperature.HOT, EnumHumidity.ARID,
|
0xE50B0B, 0x95132F, EnumTemperature.HOT, EnumHumidity.ARID,
|
||||||
true, hideSpecies, true, true);
|
true, hideSpecies, true, true);
|
||||||
Allele.Fire.addProduct(ItemManager.combs.getStackForType(CombType.FIREY), 20);
|
Allele.Fire.addProduct(ItemManager.combs.getStackForType(CombType.FIREY), 15);
|
||||||
Allele.Fire.addSpecialty(new ItemStack(Item.blazePowder), 8);
|
Allele.Fire.addSpecialty(new ItemStack(Item.blazePowder), 8);
|
||||||
Allele.Fire.setGenome(BeeGenomeManager.getTemplateFire());
|
Allele.Fire.setGenome(BeeGenomeManager.getTemplateFire());
|
||||||
breedingMgr.registerBeeTemplate(Allele.Fire.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Fire.getGenome());
|
||||||
|
|
||||||
Allele.Water = new BeeSpecies("Aqua", "The purity of their produce is unparalleled.|Apinomicon",
|
// 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,
|
"umidus", magical, 0,
|
||||||
0x36CFD9, 0x1054A1, EnumTemperature.NORMAL, EnumHumidity.DAMP,
|
0x36CFD9, 0x1054A1, EnumTemperature.NORMAL, EnumHumidity.DAMP,
|
||||||
true, hideSpecies, true, true);
|
true, hideSpecies, true, true);
|
||||||
Allele.Water.addProduct(ItemManager.combs.getStackForType(CombType.WATERY), 20);
|
Allele.Water.addProduct(ItemManager.combs.getStackForType(CombType.WATERY), 20);
|
||||||
Allele.Water.addSpecialty(new ItemStack(Block.ice), 8);
|
Allele.Water.addSpecialty(new ItemStack(Block.ice), 1).addSpecialty(forestryItem, 5);
|
||||||
Allele.Water.setGenome(BeeGenomeManager.getTemplateWater());
|
Allele.Water.setGenome(BeeGenomeManager.getTemplateWater());
|
||||||
breedingMgr.registerBeeTemplate(Allele.Water.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Water.getGenome());
|
||||||
|
|
||||||
Allele.Earth = new BeeSpecies("Solum", "<indecipherable scribblings>|Apinomicon",
|
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,
|
"sordida", magical, 0,
|
||||||
0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
true, hideSpecies, true, true);
|
true, hideSpecies, true, true);
|
||||||
Allele.Earth.addProduct(ItemManager.combs.getStackForType(CombType.EARTHY), 30);
|
Allele.Earth.addProduct(ItemManager.combs.getStackForType(CombType.EARTHY), 30);
|
||||||
Allele.Earth.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.AMBER.ordinal()), 10);
|
Allele.Earth.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.AMBER.ordinal()), 6);
|
||||||
Allele.Earth.setGenome(BeeGenomeManager.getTemplateEarth());
|
Allele.Earth.setGenome(BeeGenomeManager.getTemplateEarth());
|
||||||
breedingMgr.registerBeeTemplate(Allele.Earth.getGenome());
|
breedingMgr.registerBeeTemplate(Allele.Earth.getGenome());
|
||||||
|
|
||||||
|
Allele.Infused = new BeeSpecies("Praecantatio", "Beekeeping is magic!|Apinomicon, Preface",
|
||||||
|
"azanorius", magical, 0,
|
||||||
|
0xaa32fc, 0x7A489E, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
true, hideSpecies, true, true);
|
||||||
|
Allele.Infused.addProduct(ItemManager.combs.getStackForType(ItemComb.CombType.INFUSED), 20);
|
||||||
|
Allele.Infused.setGenome(BeeGenomeManager.getTemplateInfused());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Infused.getGenome());
|
||||||
|
|
||||||
|
IClassification aware = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "patibilis", "Patibilis");
|
||||||
|
aware.setParent(familyBee);
|
||||||
|
|
||||||
|
Allele.Aware = new BeeSpecies("Aware", "\"They can see into your soul!\"|Florastar, Expert Beekeeper",
|
||||||
|
"sensibilis", aware, 0,
|
||||||
|
0xb0092e9, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Aware.addProduct(ItemManager.combs.getStackForType(ItemComb.CombType.INTELLECT), 18);
|
||||||
|
Allele.Aware.setGenome(BeeGenomeManager.getTemplateAware());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Aware.getGenome());
|
||||||
|
|
||||||
|
/*Allele.Vis = new BeeSpecies("Vis", "\"They can feel changes in the aura, but are not yet able to affect it...\"|Azanor, research notes",
|
||||||
|
"arcanus saecula", aware, 0,
|
||||||
|
0x004c99, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Vis.addProduct(ItemManager.combs.getStackForType(ItemComb.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, false, false);
|
||||||
|
Allele.Pure.addProduct(ItemManager.combs.getStackForType(ItemComb.CombType.INTELLECT), 20);
|
||||||
|
Allele.Pure.setGenome(BeeGenomeManager.getTemplateAware());
|
||||||
|
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, false, false);
|
||||||
|
Allele.Flux.addProduct(ItemManager.combs.getStackForType(ItemComb.CombType.INTELLECT), 20);
|
||||||
|
Allele.Flux.setGenome(BeeGenomeManager.getTemplateVis());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Flux.getGenome()); */
|
||||||
|
|
||||||
|
IClassification malevolent = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "malevolens", "Malevolens");
|
||||||
|
malevolent.setParent(familyBee);
|
||||||
|
|
||||||
|
Allele.Skulking = new BeeSpecies("Skulking", "These bees have become xenophobic and bad-tempered. Use caution.|Apinomicon",
|
||||||
|
"malevolens", malevolent, 0,
|
||||||
|
0x524827, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Skulking.addProduct(ItemManager.combs.getStackForType(ItemComb.CombType.SKULKING), 10);
|
||||||
|
Allele.Skulking.setGenome(BeeGenomeManager.getTemplateSkulking());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Skulking.getGenome());
|
||||||
|
|
||||||
|
Allele.Brainy = new BeeSpecies("Brainy", "Their combs may be feotid and foul-smelling, but their intelligence is well-developed.|Apinomicon",
|
||||||
|
"cerebrum", malevolent, 0,
|
||||||
|
0x83FF70, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Brainy.addProduct(ItemManager.combs.getStackForType(ItemComb.CombType.SKULKING), 10).addProduct(new ItemStack(Item.rottenFlesh), 6);
|
||||||
|
Allele.Brainy.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.ZOMBIE_BRAIN.ordinal()), 2);
|
||||||
|
Allele.Brainy.setGenome(BeeGenomeManager.getTemplateBrainy());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Brainy.getGenome());
|
||||||
|
|
||||||
|
// Grab the Silky Comb.
|
||||||
|
(forestryItem = ItemInterface.getItem("beeComb")).setItemDamage(6);
|
||||||
|
|
||||||
|
Allele.Gossamer = new BeeSpecies("Gossamer", "As they work, they seem to fade out from light for brief moments.|Apinomicon",
|
||||||
|
"perlucidus", malevolent, 0,
|
||||||
|
0x183f66, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Gossamer.addProduct(forestryItem, 15);
|
||||||
|
Allele.Gossamer.setGenome(BeeGenomeManager.getTemplateGossamer());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Gossamer.getGenome());
|
||||||
|
|
||||||
|
Allele.Wispy = new BeeSpecies("Wispy", "Their language is garbled and unintelligible. It is probable they are speaking to unnatural beings.|Apinomicon",
|
||||||
|
"umbrabilis", malevolent, 0,
|
||||||
|
0x9cb8d5, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Wispy.addProduct(forestryItem, 22);
|
||||||
|
// Get silk wisp
|
||||||
|
(forestryItem = ItemInterface.getItem("craftingMaterial")).setItemDamage(2);
|
||||||
|
Allele.Wispy.addSpecialty(forestryItem, 4);
|
||||||
|
Allele.Wispy.setGenome(BeeGenomeManager.getTemplateWispy());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Wispy.getGenome());
|
||||||
|
|
||||||
|
Allele.Batty = new BeeSpecies("Batty", "They tend to attract bats to their hives through means unknown.|Apinomicon",
|
||||||
|
"chiroptera", malevolent, 0,
|
||||||
|
0x27350d, malevolentBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, true);
|
||||||
|
Allele.Batty.addProduct(ItemManager.combs.getStackForType(ItemComb.CombType.SKULKING), 10);
|
||||||
|
Allele.Batty.addSpecialty(new ItemStack(Item.gunpowder), 4);
|
||||||
|
Allele.Batty.setGenome(BeeGenomeManager.getTemplateBatty());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Batty.getGenome());
|
||||||
|
|
||||||
|
/*Allele.Ghastly = new BeeSpecies("Ghastly", "\"*sigh*... Really, Myst?\"|Taveria",
|
||||||
|
"pallens", malevolent, 0,
|
||||||
|
0xccccee, 0xbf877c, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||||
|
false, hideSpecies, true, false);
|
||||||
|
Allele.Ghastly.addProduct(ItemManager.combs.getStackForType(ItemComb.CombType.SKULKING), 8);
|
||||||
|
Allele.Ghastly.addSpecialty(new ItemStack(Item.ghastTear), 2);
|
||||||
|
Allele.Ghastly.setGenome(BeeGenomeManager.getTemplateGhastly());
|
||||||
|
breedingMgr.registerBeeTemplate(Allele.Ghastly.getGenome());*/
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setupBeeMutations()
|
private void setupBeeMutations()
|
||||||
{
|
{
|
||||||
// Mutations are registered with the BreedingManager in their constructor.
|
// Mutations are registered with the BreedingManager in their constructor.
|
||||||
|
|
||||||
BeeMutation.Esoteric = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric.getGenome(), 10, false);
|
BeeMutation.Esoteric = new BeeMutation(Allele.getBaseSpecies("Imperial"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric, 10);
|
||||||
BeeMutation.Esoteric1 = new BeeMutation(Allele.getBaseSpecies("Heroic"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric.getGenome(), 25, false);
|
BeeMutation.Esoteric1 = new BeeMutation(Allele.getBaseSpecies("Heroic"), Allele.getBaseSpecies("Demonic"), Allele.Esoteric, 25);
|
||||||
BeeMutation.Mysterious = new BeeMutation(Allele.Esoteric, Allele.getBaseSpecies("Ended"), Allele.Mysterious.getGenome(), 10, false);
|
BeeMutation.Mysterious = new BeeMutation(Allele.Esoteric, Allele.getBaseSpecies("Ended"), Allele.Mysterious, 10);
|
||||||
BeeMutation.Arcane = new BeeMutation(Allele.Esoteric, Allele.Mysterious, Allele.Arcane.getGenome(), 8, false);
|
BeeMutation.Arcane = new BeeMutation(Allele.Esoteric, Allele.Mysterious, Allele.Arcane, 8)
|
||||||
BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Cultivated"), Allele.getBaseSpecies("Valiant"), Allele.Charmed.getGenome(), 20, false);
|
.setMoonPhaseBonus(MoonPhase.WANING_CRESCENT, MoonPhase.WAXING_CRESCENT, 1.5f);
|
||||||
BeeMutation.Enchanted = new BeeMutation(Allele.Charmed, Allele.getBaseSpecies("Valiant"), Allele.Enchanted.getGenome(), 8, false);
|
BeeMutation.Charmed = new BeeMutation(Allele.getBaseSpecies("Diligent"), Allele.getBaseSpecies("Valiant"), Allele.Charmed, 20);
|
||||||
BeeMutation.Supernatural = new BeeMutation(Allele.Charmed, Allele.Enchanted, Allele.Supernatural.getGenome(), 8, false);
|
BeeMutation.Enchanted = new BeeMutation(Allele.Charmed, Allele.getBaseSpecies("Valiant"), Allele.Enchanted, 8);
|
||||||
BeeMutation.Pupil = new BeeMutation(Allele.Arcane, Allele.Enchanted, Allele.Pupil.getGenome(), 10, false);
|
BeeMutation.Supernatural = new BeeMutation(Allele.Charmed, Allele.Enchanted, Allele.Supernatural, 8)
|
||||||
BeeMutation.Scholarly = new BeeMutation(Allele.Pupil, Allele.Arcane, Allele.Scholarly.getGenome(), 8, false);
|
.setMoonPhaseBonus(MoonPhase.WAXING_GIBBOUS, MoonPhase.WANING_GIBBOUS, 1.1f);
|
||||||
BeeMutation.Savant = new BeeMutation(Allele.Pupil, Allele.Scholarly, Allele.Savant.getGenome(), 6, false);
|
BeeMutation.Pupil = new BeeMutation(Allele.Arcane, Allele.Enchanted, Allele.Pupil, 10);
|
||||||
BeeMutation.Stark = new BeeMutation(Allele.Arcane, Allele.Supernatural, Allele.Stark.getGenome(), 8, false);
|
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, 9);
|
||||||
|
/*BeeMutation.Vis = new BeeMutation(Allele.Aware, Allele.Arcane, Allele.Vis, 7, false);
|
||||||
|
|
||||||
|
BeeMutation.Pure = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Pure, 5, false);
|
||||||
|
BeeMutation.Flux = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Flux, 5, false);*/
|
||||||
|
|
||||||
|
// Now we get into a little bit of branching...
|
||||||
|
if (ThaumicBees.getInstanceConfig().ExtraBeesInstalled)
|
||||||
|
{
|
||||||
|
BeeMutation.Skulking = new BeeMutation(Allele.Mysterious, Allele.getExtraSpecies("desolate"), Allele.Skulking, 10);
|
||||||
|
BeeMutation.Brainy = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("rotten"), Allele.Brainy, 12);
|
||||||
|
BeeMutation.Gossamer = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("ancient"), Allele.Gossamer, 10);
|
||||||
|
BeeMutation.Batty = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("rock"), Allele.Batty, 14);
|
||||||
|
//BeeMutation.Ghastly = new BeeMutation(Allele.Skulking, Allele.getExtraSpecies("creeper"), Allele.Ghastly, 13);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
BeeMutation.Skulking = new BeeMutation(Allele.Mysterious, Allele.getBaseSpecies("Modest"), Allele.Skulking, 10);
|
||||||
|
BeeMutation.Brainy = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Sinister"), Allele.Brainy, 10);
|
||||||
|
BeeMutation.Gossamer = new BeeMutation(Allele.Skulking, Allele.Supernatural, Allele.Gossamer, 10);
|
||||||
|
BeeMutation.Batty = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Frugal"), Allele.Batty, 11);
|
||||||
|
//BeeMutation.Ghastly = new BeeMutation(Allele.Skulking, Allele.getBaseSpecies("Austere"), Allele.Ghastly, 13);
|
||||||
|
}
|
||||||
|
BeeMutation.Gossamer.setMoonPhaseRestricted(MoonPhase.FULL, MoonPhase.WANING_CRESCENT);
|
||||||
|
BeeMutation.Wispy = new BeeMutation(Allele.Gossamer, Allele.getBaseSpecies("Cultivated"), Allele.Wispy, 8);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setupBeeInfusions(World world)
|
public static void setupBeeInfusions(World world)
|
||||||
{
|
{
|
||||||
try
|
ItemStack starkDrone = Allele.Stark.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
{
|
ItemStack starkPrincess = Allele.Stark.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
ItemStack starkDrone = Allele.Stark.getBeeItem(world, EnumBeeType.DRONE);
|
ItemStack airDrone = Allele.Air.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
ItemStack starkPrincess = Allele.Stark.getBeeItem(world, EnumBeeType.PRINCESS);
|
ItemStack airPrincess = Allele.Air.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
ItemStack airDrone = Allele.Air.getBeeItem(world, EnumBeeType.DRONE);
|
ItemStack waterDrone = Allele.Water.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
ItemStack airPrincess = Allele.Air.getBeeItem(world, EnumBeeType.PRINCESS);
|
ItemStack waterPrincess = Allele.Water.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
ItemStack waterDrone = Allele.Water.getBeeItem(world, EnumBeeType.DRONE);
|
ItemStack earthDrone = Allele.Earth.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
ItemStack waterPrincess = Allele.Water.getBeeItem(world, EnumBeeType.PRINCESS);
|
ItemStack earthPrincess = Allele.Earth.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
ItemStack earthDrone = Allele.Earth.getBeeItem(world, EnumBeeType.DRONE);
|
ItemStack fireDrone = Allele.Fire.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
ItemStack earthPrincess = Allele.Earth.getBeeItem(world, EnumBeeType.PRINCESS);
|
ItemStack firePrincess = Allele.Fire.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
ItemStack fireDrone = Allele.Fire.getBeeItem(world, EnumBeeType.DRONE);
|
ItemStack magicDrone = Allele.Infused.getBeeItem(world, EnumBeeType.DRONE);
|
||||||
ItemStack firePrincess = Allele.Fire.getBeeItem(world, EnumBeeType.PRINCESS);
|
ItemStack magicPrincess = Allele.Infused.getBeeItem(world, EnumBeeType.PRINCESS);
|
||||||
|
|
||||||
Item shard = (Item) Class.forName("thaumcraft.common.Config").getDeclaredField("itemShard").get(null);
|
ObjectTags tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 20);
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, airDrone, new Object[]
|
||||||
ObjectTags tags = (new ObjectTags()).add(EnumTag.WIND, 40).add(EnumTag.MOTION, 20);
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.AIR.ordinal()) } );
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, airDrone, new Object[]
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, airPrincess, new Object[]
|
||||||
{ starkDrone, new ItemStack(shard, 1, 0) });
|
{ starkPrincess, new ItemStack(ItemManager.tcShard, 1, TCShardType.AIR.ordinal()) });
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, airPrincess, new Object[]
|
|
||||||
{ starkPrincess, new ItemStack(shard, 1, 0) });
|
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 20);
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, fireDrone, new Object[]
|
||||||
tags = (new ObjectTags()).add(EnumTag.FIRE, 40).add( EnumTag.POWER, 20);
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.FIRE.ordinal()) } );
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, fireDrone, new Object[]
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, firePrincess, new Object[]
|
||||||
{ starkDrone, new ItemStack(shard, 1, 1) });
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.FIRE.ordinal()) } );
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, firePrincess, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 1) });
|
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 20);
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, waterDrone, new Object[]
|
||||||
tags = (new ObjectTags()).add(EnumTag.WATER, 40).add( EnumTag.COLD, 20);
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.WATER.ordinal()) } );
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, waterDrone, new Object[]
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, waterPrincess, new Object[]
|
||||||
{ starkDrone, new ItemStack(shard, 1, 2) });
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.WATER.ordinal()) } );
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, waterPrincess, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 2) });
|
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 20);
|
||||||
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, earthDrone, new Object[]
|
||||||
tags = (new ObjectTags()).add(EnumTag.EARTH, 40).add( EnumTag.ROCK, 20);
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.EARTH.ordinal()) } );
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, earthDrone, new Object[]
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, earthPrincess, new Object[]
|
||||||
{ starkDrone, new ItemStack(shard, 1, 3) });
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.EARTH.ordinal()) } );
|
||||||
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, earthPrincess, new Object[]
|
|
||||||
{ starkDrone, new ItemStack(shard, 1, 3) });
|
tags = new ObjectTags().add(EnumTag.MAGIC, 40).add(EnumTag.FLUX, 20);
|
||||||
}
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, magicDrone, new Object[]
|
||||||
catch (Exception ex)
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.MAGIC.ordinal()) } );
|
||||||
{
|
ThaumcraftApi.addShapelessInfusionCraftingRecipe("UTFT", 100, tags, magicPrincess, new Object[]
|
||||||
System.out.println("Reflection failed. Could not get Thaumcraft shard. ):");
|
{ starkDrone, new ItemStack(ItemManager.tcShard, 1, TCShardType.MAGIC.ordinal()) } );
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription()
|
public String getDescription()
|
||||||
|
|||||||
@@ -9,24 +9,50 @@ public class Allele implements IAllele
|
|||||||
public static BeeSpecies Esoteric;
|
public static BeeSpecies Esoteric;
|
||||||
public static BeeSpecies Mysterious;
|
public static BeeSpecies Mysterious;
|
||||||
public static BeeSpecies Arcane;
|
public static BeeSpecies Arcane;
|
||||||
|
|
||||||
public static BeeSpecies Charmed;
|
public static BeeSpecies Charmed;
|
||||||
public static BeeSpecies Enchanted;
|
public static BeeSpecies Enchanted;
|
||||||
public static BeeSpecies Supernatural;
|
public static BeeSpecies Supernatural;
|
||||||
|
|
||||||
public static BeeSpecies Pupil;
|
public static BeeSpecies Pupil;
|
||||||
public static BeeSpecies Scholarly;
|
public static BeeSpecies Scholarly;
|
||||||
public static BeeSpecies Savant;
|
public static BeeSpecies Savant;
|
||||||
|
|
||||||
public static BeeSpecies Stark;
|
public static BeeSpecies Stark;
|
||||||
public static BeeSpecies Air;
|
public static BeeSpecies Air;
|
||||||
public static BeeSpecies Water;
|
public static BeeSpecies Water;
|
||||||
public static BeeSpecies Earth;
|
public static BeeSpecies Earth;
|
||||||
public static BeeSpecies Fire;
|
public static BeeSpecies Fire;
|
||||||
|
public static BeeSpecies Infused;
|
||||||
|
|
||||||
|
public static BeeSpecies Aware;
|
||||||
|
public static BeeSpecies Vis;
|
||||||
|
/* Future bees pending TC3 API release.
|
||||||
|
public static BeeSpecies Pure;
|
||||||
|
public static BeeSpecies Flux; */
|
||||||
|
|
||||||
|
public static BeeSpecies Skulking;
|
||||||
|
public static BeeSpecies Brainy;
|
||||||
|
public static BeeSpecies Gossamer;
|
||||||
|
public static BeeSpecies Wispy;
|
||||||
|
public static BeeSpecies Batty;
|
||||||
|
public static BeeSpecies Ghastly;
|
||||||
|
|
||||||
|
public static AlleleInteger fertilityHighDominant;
|
||||||
|
|
||||||
public static AlleleFlower flowerBookshelf;
|
public static AlleleFlower flowerBookshelf;
|
||||||
public static AlleleFlower flowerThaumcraft;
|
public static AlleleFlower flowerThaumcraft;
|
||||||
|
public static AlleleFlower flowerAuraNode;
|
||||||
|
public static AlleleFlower flowerNodePurify;
|
||||||
|
public static AlleleFlower flowerNodeFluxify;
|
||||||
|
|
||||||
public static AlleleEffectCure cleansingEffect;
|
public static AlleleEffectCure cleansingEffect;
|
||||||
public static AlleleEffectPotion digSpeed;
|
public static AlleleEffectPotion digSpeed;
|
||||||
public static AlleleEffectPotion moveSpeed;
|
public static AlleleEffectPotion moveSpeed;
|
||||||
|
public static AlleleEffectSpawnMob spawnBrainyZombie;
|
||||||
|
public static AlleleEffectSpawnMob spawnWisp;
|
||||||
|
public static AlleleEffectSpawnMob spawnBats;
|
||||||
|
public static AlleleEffectSpawnMob spawnGhast;
|
||||||
|
|
||||||
private String uid;
|
private String uid;
|
||||||
private boolean dominant;
|
private boolean dominant;
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package thaumicbees.bees.genetics;
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
|
import net.minecraft.world.World;
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
@@ -8,10 +14,12 @@ import forestry.api.genetics.IEffectData;
|
|||||||
|
|
||||||
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
||||||
{
|
{
|
||||||
|
protected String readableName;
|
||||||
|
|
||||||
public AlleleEffect(String id, boolean isDominant)
|
public AlleleEffect(String id, boolean isDominant, String identifier)
|
||||||
{
|
{
|
||||||
super(id, isDominant);
|
super(id, isDominant);
|
||||||
|
this.readableName = identifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -24,7 +32,10 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
public abstract IEffectData validateStorage(IEffectData storedData);
|
public abstract IEffectData validateStorage(IEffectData storedData);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public abstract String getIdentifier();
|
public String getIdentifier()
|
||||||
|
{
|
||||||
|
return this.readableName;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public abstract IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
public abstract IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing);
|
||||||
@@ -35,9 +46,9 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
int[] area = genome.getTerritory();
|
int[] area = genome.getTerritory();
|
||||||
float mod = housing.getTerritoryModifier(genome);
|
float mod = housing.getTerritoryModifier(genome);
|
||||||
// Check to make sure territory is at least 1 with housing modifications
|
// Check to make sure territory is at least 1 with housing modifications
|
||||||
area[0] = Math.min((int)(area[0] * mod), 1);
|
area[0] = Math.max((int)(area[0] * mod), 1);
|
||||||
area[1] = Math.min((int)(area[1] * mod), 1);
|
area[1] = Math.max((int)(area[1] * mod), 1);
|
||||||
area[2] = Math.min((int)(area[2] * mod), 1);
|
area[2] = Math.max((int)(area[2] * mod), 1);
|
||||||
|
|
||||||
ThaumicBees.proxy.drawBeeEffects(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(),
|
ThaumicBees.proxy.drawBeeEffects(housing.getWorld(), housing.getXCoord(), housing.getYCoord(), housing.getZCoord(),
|
||||||
genome.getPrimaryAsBee().getPrimaryColor(), area[0], area[1], area[2]);
|
genome.getPrimaryAsBee().getPrimaryColor(), area[0], area[1], area[2]);
|
||||||
@@ -55,5 +66,26 @@ public abstract class AlleleEffect extends Allele implements IAlleleBeeEffect
|
|||||||
{
|
{
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected List<Entity> getEntitiesWithinRange(IBeeGenome genome, IBeeHousing housing)
|
||||||
|
{
|
||||||
|
// Get the size of the affected area
|
||||||
|
int[] area = genome.getTerritory();
|
||||||
|
|
||||||
|
// Calculate offset
|
||||||
|
int[] min = new int[3];
|
||||||
|
int[] max = new int[3];
|
||||||
|
min[0] = housing.getXCoord() - area[0] / 2;
|
||||||
|
max[0] = housing.getXCoord() + area[0] / 2;
|
||||||
|
|
||||||
|
min[1] = housing.getYCoord() - area[1] / 2;
|
||||||
|
max[1] = housing.getYCoord() + area[1] / 2;
|
||||||
|
|
||||||
|
min[2] = housing.getZCoord() - area[2] / 2;
|
||||||
|
max[2] = housing.getZCoord() + area[2] / 2;
|
||||||
|
|
||||||
|
AxisAlignedBB bounds = AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(min[0], min[1], min[2], max[0], max[1], max[2]);
|
||||||
|
return housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, bounds);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -2,7 +2,6 @@ package thaumicbees.bees.genetics;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import thaumicbees.bees.EffectData;
|
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
@@ -22,7 +21,7 @@ public class AlleleEffectCure extends AlleleEffect
|
|||||||
|
|
||||||
public AlleleEffectCure(String id, boolean isDominant)
|
public AlleleEffectCure(String id, boolean isDominant)
|
||||||
{
|
{
|
||||||
super(id, isDominant);
|
super(id, isDominant, "Cleansing");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -35,12 +34,6 @@ public class AlleleEffectCure extends AlleleEffect
|
|||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier()
|
|
||||||
{
|
|
||||||
return "Cleansing";
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
{
|
{
|
||||||
@@ -48,23 +41,7 @@ public class AlleleEffectCure extends AlleleEffect
|
|||||||
|
|
||||||
if (count == 200)
|
if (count == 200)
|
||||||
{
|
{
|
||||||
// Get the size of the affected area
|
List<Entity> entityList = this.getEntitiesWithinRange(genome, housing);
|
||||||
int[] area = genome.getTerritory();
|
|
||||||
|
|
||||||
// Calculate offset
|
|
||||||
int[] min = new int[3];
|
|
||||||
int[] max = new int[3];
|
|
||||||
min[0] = housing.getXCoord() - area[0] / 2;
|
|
||||||
max[0] = housing.getXCoord() + area[0] / 2;
|
|
||||||
|
|
||||||
min[1] = housing.getYCoord() - area[1] / 2;
|
|
||||||
max[1] = housing.getYCoord() + area[1] / 2;
|
|
||||||
|
|
||||||
min[2] = housing.getZCoord() - area[2] / 2;
|
|
||||||
max[2] = housing.getZCoord() + area[2] / 2;
|
|
||||||
|
|
||||||
AxisAlignedBB bounds = AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(min[0], min[1], min[2], max[0], max[1], max[2]);
|
|
||||||
List<Entity> entityList = housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, bounds);
|
|
||||||
|
|
||||||
for (Entity e : entityList)
|
for (Entity e : entityList)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||||||
import net.minecraft.potion.Potion;
|
import net.minecraft.potion.Potion;
|
||||||
import net.minecraft.potion.PotionEffect;
|
import net.minecraft.potion.PotionEffect;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import thaumicbees.bees.EffectData;
|
|
||||||
import forestry.api.apiculture.IAlleleBeeEffect;
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
import forestry.api.apiculture.IBeeGenome;
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
import forestry.api.apiculture.IBeeHousing;
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
@@ -18,12 +17,10 @@ public class AlleleEffectPotion extends AlleleEffect
|
|||||||
{
|
{
|
||||||
private int potionId;
|
private int potionId;
|
||||||
private int duration;
|
private int duration;
|
||||||
private String beealyzerId;
|
|
||||||
|
|
||||||
public AlleleEffectPotion(String name, String readableName, Potion potionApplied, int effectDuration, boolean isDominant)
|
public AlleleEffectPotion(String name, String readableName, Potion potionApplied, int effectDuration, boolean isDominant)
|
||||||
{
|
{
|
||||||
super("effect" + name, isDominant);
|
super("effect" + name, isDominant, readableName);
|
||||||
this.beealyzerId = readableName;
|
|
||||||
this.potionId = potionApplied.id;
|
this.potionId = potionApplied.id;
|
||||||
this.duration = 20 * effectDuration;
|
this.duration = 20 * effectDuration;
|
||||||
}
|
}
|
||||||
@@ -38,12 +35,6 @@ public class AlleleEffectPotion extends AlleleEffect
|
|||||||
return storedData;
|
return storedData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public String getIdentifier()
|
|
||||||
{
|
|
||||||
return this.beealyzerId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
{
|
{
|
||||||
@@ -51,23 +42,7 @@ public class AlleleEffectPotion extends AlleleEffect
|
|||||||
|
|
||||||
if (count == 200)
|
if (count == 200)
|
||||||
{
|
{
|
||||||
// Get the size of the affected area
|
List<Entity> entityList = this.getEntitiesWithinRange(genome, housing);
|
||||||
int[] area = genome.getTerritory();
|
|
||||||
|
|
||||||
// Calculate offset
|
|
||||||
int[] min = new int[3];
|
|
||||||
int[] max = new int[3];
|
|
||||||
min[0] = housing.getXCoord() - area[0] / 2;
|
|
||||||
max[0] = housing.getXCoord() + area[0] / 2;
|
|
||||||
|
|
||||||
min[1] = housing.getYCoord() - area[1] / 2;
|
|
||||||
max[1] = housing.getYCoord() + area[1] / 2;
|
|
||||||
|
|
||||||
min[2] = housing.getZCoord() - area[2] / 2;
|
|
||||||
max[2] = housing.getZCoord() + area[2] / 2;
|
|
||||||
|
|
||||||
AxisAlignedBB bounds = AxisAlignedBB.getAABBPool().addOrModifyAABBInPool(min[0], min[1], min[2], max[0], max[1], max[2]);
|
|
||||||
List<Entity> entityList = housing.getWorld().getEntitiesWithinAABB(EntityPlayer.class, bounds);
|
|
||||||
|
|
||||||
for (Entity e : entityList)
|
for (Entity e : entityList)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -0,0 +1,163 @@
|
|||||||
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import thaumicbees.item.ItemArmorApiarist;
|
||||||
|
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityList;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import forestry.api.apiculture.IAlleleBeeEffect;
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
import forestry.api.genetics.IEffectData;
|
||||||
|
|
||||||
|
public class AlleleEffectSpawnMob extends AlleleEffect
|
||||||
|
{
|
||||||
|
protected boolean aggosOnPlayer;
|
||||||
|
protected boolean spawnsWhilePlayerNear;
|
||||||
|
protected String alternateMob;
|
||||||
|
protected String mobName;
|
||||||
|
protected int throttle;
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob(String id, boolean isDominant, String identifier, String mobToSpawn)
|
||||||
|
{
|
||||||
|
super(id, isDominant, identifier);
|
||||||
|
this.aggosOnPlayer = false;
|
||||||
|
this.mobName = mobToSpawn;
|
||||||
|
this.throttle = 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData validateStorage(IEffectData storedData)
|
||||||
|
{
|
||||||
|
if (storedData == null)
|
||||||
|
{
|
||||||
|
// Throttle; Ready to spawn
|
||||||
|
storedData = new EffectData(1, 1, 0);
|
||||||
|
}
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
|
||||||
|
{
|
||||||
|
int count = storedData.getInteger(0);
|
||||||
|
|
||||||
|
if (count >= this.throttle && !storedData.getBoolean(0))
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, true);
|
||||||
|
storedData.setInteger(0, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
storedData.setInteger(0, count + 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if we're ready to spawn the mob.
|
||||||
|
if (storedData.getBoolean(0))
|
||||||
|
{
|
||||||
|
World w = housing.getWorld();
|
||||||
|
|
||||||
|
if (this.spawnsWhilePlayerNear)
|
||||||
|
{
|
||||||
|
List<Entity> entities = this.getEntitiesWithinRange(genome, housing);
|
||||||
|
EntityPlayer target = null;
|
||||||
|
for (Entity e : entities)
|
||||||
|
{
|
||||||
|
if (e instanceof EntityPlayer)
|
||||||
|
{
|
||||||
|
target = (EntityPlayer)e;
|
||||||
|
// Check for wearing armor & cancel
|
||||||
|
if (ItemArmorApiarist.getNumberPiecesWorn(target) >= 4)
|
||||||
|
{
|
||||||
|
// Full armor suit is treated as "invisible."
|
||||||
|
target = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Let's spawn a mob. =D
|
||||||
|
if (target != null)
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, !this.spawnMob(genome, target, w, housing, false));
|
||||||
|
}
|
||||||
|
else if (this.alternateMob != null)
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, !this.spawnMob(genome, null, w, housing, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
storedData.setBoolean(0, !this.spawnMob(genome, null, w, housing, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return storedData;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate)
|
||||||
|
{
|
||||||
|
boolean spawnedFlag = false;
|
||||||
|
|
||||||
|
EntityLiving mob;
|
||||||
|
if (spawnAlternate && this.alternateMob != null)
|
||||||
|
{
|
||||||
|
mob = (EntityLiving) EntityList.createEntityByName(this.alternateMob, world);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mob = (EntityLiving) EntityList.createEntityByName(this.mobName, world);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mob != null)
|
||||||
|
{
|
||||||
|
double pos[] = new double[3];
|
||||||
|
pos[0] = housing.getXCoord() + (world.rand.nextDouble() * (bee.getTerritory()[0] * housing.getTerritoryModifier(bee)) - bee.getTerritory()[0] / 2);
|
||||||
|
pos[1] = housing.getYCoord() + world.rand.nextInt(3) - 1;
|
||||||
|
pos[2] = housing.getYCoord() + (world.rand.nextDouble() * (bee.getTerritory()[2] * housing.getTerritoryModifier(bee)) - bee.getTerritory()[2] / 2);
|
||||||
|
|
||||||
|
mob.setLocationAndAngles(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||||
|
// Success!
|
||||||
|
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||||
|
if (this.aggosOnPlayer && player != null)
|
||||||
|
{
|
||||||
|
if (ItemArmorApiarist.getNumberPiecesWorn(player) < 4)
|
||||||
|
{
|
||||||
|
// Protect fully suited player from initial murder intent.
|
||||||
|
mob.setAttackTarget(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return spawnedFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob setSpawnsOnPlayerNear(String alternateMobToSpawn)
|
||||||
|
{
|
||||||
|
this.spawnsWhilePlayerNear = true;
|
||||||
|
this.alternateMob = alternateMobToSpawn;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob setAggrosPlayerOnSpawn()
|
||||||
|
{
|
||||||
|
this.aggosOnPlayer = true;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AlleleEffectSpawnMob setThrottle(int val)
|
||||||
|
{
|
||||||
|
this.throttle = val;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
import java.lang.reflect.Field;
|
||||||
|
|
||||||
|
import forestry.api.apiculture.IBeeGenome;
|
||||||
|
import forestry.api.apiculture.IBeeHousing;
|
||||||
|
|
||||||
|
import net.minecraft.entity.EntityList;
|
||||||
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
|
||||||
|
{
|
||||||
|
|
||||||
|
private byte[] wispTypes = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47 };
|
||||||
|
|
||||||
|
public AlleleEffectSpawnWisp(String id, boolean isDominant, String identifier, String mobToSpawn)
|
||||||
|
{
|
||||||
|
super(id, isDominant, identifier, mobToSpawn);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected boolean spawnMob(IBeeGenome bee, EntityPlayer player, World world, IBeeHousing housing, boolean spawnAlternate)
|
||||||
|
{
|
||||||
|
boolean spawnedFlag = false;
|
||||||
|
|
||||||
|
EntityLiving mob;
|
||||||
|
if (spawnAlternate && this.alternateMob != null)
|
||||||
|
{
|
||||||
|
mob = (EntityLiving) EntityList.createEntityByName(this.alternateMob, world);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
mob = (EntityLiving) EntityList.createEntityByName(this.mobName, world);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mob != null)
|
||||||
|
{
|
||||||
|
double pos[] = new double[3];
|
||||||
|
pos[0] = housing.getXCoord() + (world.rand.nextDouble() * (bee.getTerritory()[0] * housing.getTerritoryModifier(bee)) - bee.getTerritory()[0] / 2);
|
||||||
|
pos[1] = housing.getYCoord() + world.rand.nextInt(3) - 1;
|
||||||
|
pos[2] = housing.getYCoord() + (world.rand.nextDouble() * (bee.getTerritory()[2] * housing.getTerritoryModifier(bee)) - bee.getTerritory()[2] / 2);
|
||||||
|
|
||||||
|
mob.setLocationAndAngles(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
|
||||||
|
|
||||||
|
// Try some Reflection on TC code. This could be dangerous.
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Class wispEntity = Class.forName("thaumcraft.common.entities.EntityWisp");
|
||||||
|
Field type = wispEntity.getDeclaredField("type");
|
||||||
|
type.setByte(mob, wispTypes[world.rand.nextInt(wispTypes.length)]);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Success!
|
||||||
|
spawnedFlag = world.spawnEntityInWorld(mob);
|
||||||
|
if (this.aggosOnPlayer && player != null)
|
||||||
|
{
|
||||||
|
mob.setAttackTarget(player);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return spawnedFlag;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
import forestry.api.genetics.IAlleleInteger;
|
||||||
|
|
||||||
|
public class AlleleInteger extends Allele implements IAlleleInteger
|
||||||
|
{
|
||||||
|
private int value;
|
||||||
|
|
||||||
|
public AlleleInteger(String id, int val, boolean isDominant)
|
||||||
|
{
|
||||||
|
super(id, isDominant);
|
||||||
|
this.value = val;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getValue()
|
||||||
|
{
|
||||||
|
return this.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -169,6 +169,7 @@ public class BeeGenomeManager
|
|||||||
IAllele[] genome = getTemplateBaseThaumic();
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerThaumcraft;
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerThaumcraft;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
@@ -178,6 +179,7 @@ public class BeeGenomeManager
|
|||||||
IAllele[] genome = getTemplateBaseElemental();
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Stark;
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Stark;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||||
|
|
||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
@@ -243,4 +245,157 @@ public class BeeGenomeManager
|
|||||||
return genome;
|
return genome;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateInfused()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseElemental();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Infused;
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedNorm");
|
||||||
|
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanNormal");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static IAllele[] getTemplateBaseVis()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateAware()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Aware;
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Future bees, pending TC3 API release.
|
||||||
|
/*public static IAllele[] getTemplateVis()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Vis;
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
|
||||||
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("speedSlower");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplatePure()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Pure;
|
||||||
|
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerNodePurify;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateFlux()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseVis();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Flux;
|
||||||
|
genome[EnumBeeChromosome.HUMIDITY_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceNone");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerNodeFluxify;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
private static IAllele[] getTemplateBaseMalevolent()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseThaumic();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedFast");
|
||||||
|
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringFaster");
|
||||||
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.fertilityHighDominant;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateSkulking()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Skulking;
|
||||||
|
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityNormal");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateBrainy()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Brainy;
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnBrainyZombie;
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateGossamer()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Gossamer;
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateWispy()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Wispy;
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnWisp;
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.FERTILITY.ordinal()] = Allele.getBaseAllele("fertilityLow");
|
||||||
|
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerThaumcraft;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateBatty()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Batty;
|
||||||
|
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnBats;
|
||||||
|
genome[EnumBeeChromosome.TERRITORY.ordinal()] = Allele.getBaseAllele("territoryLarge");
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IAllele[] getTemplateGhastly()
|
||||||
|
{
|
||||||
|
IAllele[] genome = getTemplateBaseMalevolent();
|
||||||
|
|
||||||
|
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Ghastly;
|
||||||
|
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceBoth1");
|
||||||
|
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
genome[EnumBeeChromosome.TOLERANT_FLYER.ordinal()] = Allele.getBaseAllele("boolTrue");
|
||||||
|
// Ghast spawning needs to be fixed. ):
|
||||||
|
//genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.spawnGhast;
|
||||||
|
|
||||||
|
return genome;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -20,37 +20,70 @@ public class BeeMutation implements IBeeMutation
|
|||||||
public static BeeMutation Pupil;
|
public static BeeMutation Pupil;
|
||||||
public static BeeMutation Scholarly;
|
public static BeeMutation Scholarly;
|
||||||
public static BeeMutation Savant;
|
public static BeeMutation Savant;
|
||||||
|
public static BeeMutation Aware;
|
||||||
|
public static BeeMutation Vis;
|
||||||
|
public static BeeMutation Pure;
|
||||||
|
public static BeeMutation Flux;
|
||||||
|
public static BeeMutation Skulking;
|
||||||
|
public static BeeMutation Brainy;
|
||||||
|
public static BeeMutation Gossamer;
|
||||||
|
public static BeeMutation Wispy;
|
||||||
|
public static BeeMutation Batty;
|
||||||
|
public static BeeMutation Ghastly;
|
||||||
|
|
||||||
private IAllele parent1;
|
private IAllele parent1;
|
||||||
private IAllele parent2;
|
private IAllele parent2;
|
||||||
private IAllele mutationTemplate[];
|
private IAllele mutationTemplate[];
|
||||||
private int baseChance;
|
private int baseChance;
|
||||||
private boolean isSecret;
|
private boolean isSecret;
|
||||||
|
|
||||||
|
private boolean isMoonRestricted;
|
||||||
|
private MoonPhase moonPhaseStart;
|
||||||
|
private MoonPhase moonPhaseEnd;
|
||||||
|
private float moonPhaseMutationBonus;
|
||||||
|
|
||||||
public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, IAllele producesGenome[], int percentChance, boolean hide)
|
public BeeMutation(IAlleleBeeSpecies species0, IAlleleBeeSpecies species1, BeeSpecies resultSpecies, int percentChance)
|
||||||
{
|
{
|
||||||
parent1 = species0;
|
this.parent1 = species0;
|
||||||
parent2 = species1;
|
this.parent2 = species1;
|
||||||
mutationTemplate = producesGenome;
|
this.mutationTemplate = resultSpecies.getGenome();
|
||||||
baseChance = percentChance;
|
this.baseChance = percentChance;
|
||||||
isSecret = hide;
|
this.isSecret = false;
|
||||||
|
this.isMoonRestricted = false;
|
||||||
|
this.moonPhaseMutationBonus = -1f;
|
||||||
|
|
||||||
BeeManager.breedingManager.registerBeeMutation(this);
|
BeeManager.breedingManager.registerBeeMutation(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
public int getChance(IBeeHousing housing, IAllele allele0, IAllele allele1, IGenome genome0, IGenome genome1)
|
||||||
{
|
{
|
||||||
int chance = 0;
|
int finalChance = 0;
|
||||||
|
float chance = this.baseChance * 1f;
|
||||||
|
|
||||||
if ((this.parent1.getUID().equals(allele0.getUID())) && this.parent2.getUID().equals(allele1.getUID()) ||
|
if (this.isPartner(allele0) && this.isPartner(allele1))
|
||||||
this.parent1.getUID().equals(allele1.getUID()) && this.parent2.getUID().equals(allele0.getUID()))
|
|
||||||
{
|
{
|
||||||
// This mutation applies. Continue calculation.
|
// This mutation applies. Continue calculation.
|
||||||
chance = Math.round((float) this.baseChance * BeeManager.breedingManager.getBeekeepingMode(housing.getWorld()).getMutationModifier((IBeeGenome) genome0, (IBeeGenome) genome1));
|
if (this.moonPhaseStart != null && this.moonPhaseEnd != null)
|
||||||
|
{
|
||||||
|
// Only occurs during the phases.
|
||||||
|
if (this.isMoonRestricted && !MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd))
|
||||||
|
{
|
||||||
|
chance = 0;
|
||||||
|
}
|
||||||
|
else if (this.moonPhaseMutationBonus != -1f)
|
||||||
|
{
|
||||||
|
// There is a bonus to this mutation during moon phases...
|
||||||
|
if (MoonPhase.getMoonPhase(housing.getWorld()).isBetween(this.moonPhaseStart, this.moonPhaseEnd))
|
||||||
|
{
|
||||||
|
chance = (int)(chance * this.moonPhaseMutationBonus);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
finalChance = Math.round(chance * BeeManager.breedingManager.getBeekeepingMode(housing.getWorld()).getMutationModifier((IBeeGenome) genome0, (IBeeGenome) genome1));
|
||||||
}
|
}
|
||||||
|
|
||||||
return chance;
|
return finalChance;
|
||||||
}
|
}
|
||||||
|
|
||||||
public IAllele getAllele0()
|
public IAllele getAllele0()
|
||||||
@@ -85,9 +118,34 @@ public class BeeMutation implements IBeeMutation
|
|||||||
val = parent2;
|
val = parent2;
|
||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BeeMutation setSecret()
|
||||||
|
{
|
||||||
|
this.isSecret = true;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isSecret()
|
public boolean isSecret()
|
||||||
{
|
{
|
||||||
return isSecret;
|
return isSecret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BeeMutation setMoonPhaseRestricted(MoonPhase begin, MoonPhase end)
|
||||||
|
{
|
||||||
|
this.isMoonRestricted = true;
|
||||||
|
this.moonPhaseStart = begin;
|
||||||
|
this.moonPhaseEnd = end;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BeeMutation setMoonPhaseBonus(MoonPhase begin, MoonPhase end, float mutationBonus)
|
||||||
|
{
|
||||||
|
this.moonPhaseMutationBonus = mutationBonus;
|
||||||
|
this.moonPhaseStart = begin;
|
||||||
|
this.moonPhaseEnd = end;
|
||||||
|
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package thaumicbees.bees;
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import forestry.api.genetics.IEffectData;
|
import forestry.api.genetics.IEffectData;
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package thaumicbees.bees.genetics;
|
||||||
|
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class to abstract the moon phase from the world time a bit.
|
||||||
|
*/
|
||||||
|
public enum MoonPhase
|
||||||
|
{
|
||||||
|
FULL,
|
||||||
|
WANING_GIBBOUS,
|
||||||
|
WANING_HALF,
|
||||||
|
WANING_CRESCENT,
|
||||||
|
NEW,
|
||||||
|
WAXING_CRESCENT,
|
||||||
|
WAXING_HALF,
|
||||||
|
WAXING_GIBBOUS;
|
||||||
|
|
||||||
|
public boolean isBetween(MoonPhase first, MoonPhase second)
|
||||||
|
{
|
||||||
|
boolean flag = false;
|
||||||
|
|
||||||
|
if (first.ordinal() <= second.ordinal())
|
||||||
|
{
|
||||||
|
// Straightforward.
|
||||||
|
flag = first.ordinal() <= this.ordinal() && this.ordinal() <= second.ordinal();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Wraps around the boundary.
|
||||||
|
flag = (first.ordinal() <= this.ordinal() && this.ordinal() <= WAXING_GIBBOUS.ordinal()) ||
|
||||||
|
(FULL.ordinal() <= this.ordinal() && this.ordinal() <= second.ordinal());
|
||||||
|
}
|
||||||
|
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static MoonPhase getMoonPhase(World w)
|
||||||
|
{
|
||||||
|
return MoonPhase.values()[(int)(w.getWorldTime() / 24000L) % 8];
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package thaumicbees.compat;
|
||||||
|
|
||||||
|
public enum TCBlockPlant
|
||||||
|
{
|
||||||
|
GREATWOOD_SAPLING, SILVERWOOD_SAPLING, SILVERLEAF, CINDERPEARL;
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package thaumicbees.compat;
|
||||||
|
|
||||||
|
public enum TCEntity
|
||||||
|
{
|
||||||
|
BRAINY_ZOMBIE("entBrainyZombie"),
|
||||||
|
GIANT_BRAINY_ZOMBIE("entGiantBrainyZombie"),
|
||||||
|
WISP("entWisp"),
|
||||||
|
FIREBAT("entFirebat"),
|
||||||
|
;
|
||||||
|
|
||||||
|
public String entityID;
|
||||||
|
|
||||||
|
private TCEntity(String id)
|
||||||
|
{
|
||||||
|
this.entityID = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package thaumicbees.compat;
|
||||||
|
|
||||||
|
public enum TCMiscResource
|
||||||
|
{
|
||||||
|
ALUMENTUM, NITOR, THAUMIUM, QUICKSILVER, MAGIC_TALLOW,
|
||||||
|
ZOMBIE_BRAIN, AMBER, ENCHANTED_FABRIC, FLUX_FILTER, KNOWLEDGE_FRAGMENT;
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package thaumicbees.compat;
|
||||||
|
|
||||||
|
public enum TCShardType
|
||||||
|
{
|
||||||
|
AIR, FIRE, WATER, EARTH, MAGIC, DULL;
|
||||||
|
}
|
||||||
+23
-24
@@ -1,4 +1,4 @@
|
|||||||
package thaumicbees.main;
|
package thaumicbees.compat;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -10,7 +10,9 @@ import thaumicbees.block.BlockManager;
|
|||||||
import thaumicbees.item.ItemComb;
|
import thaumicbees.item.ItemComb;
|
||||||
import thaumicbees.item.ItemManager;
|
import thaumicbees.item.ItemManager;
|
||||||
import thaumicbees.item.ItemMiscResources;
|
import thaumicbees.item.ItemMiscResources;
|
||||||
|
import thaumicbees.item.ItemCapsule.Liquid;
|
||||||
import thaumicbees.item.ItemComb.CombType;
|
import thaumicbees.item.ItemComb.CombType;
|
||||||
|
import thaumicbees.item.ItemDrop.DropType;
|
||||||
import thaumicbees.item.ItemWax.WaxType;
|
import thaumicbees.item.ItemWax.WaxType;
|
||||||
import thaumicbees.storage.BackpackDefinition;
|
import thaumicbees.storage.BackpackDefinition;
|
||||||
|
|
||||||
@@ -29,21 +31,8 @@ import net.minecraftforge.common.Configuration;
|
|||||||
|
|
||||||
public class ThaumcraftCompat
|
public class ThaumcraftCompat
|
||||||
{
|
{
|
||||||
public enum TCBlockPlant
|
|
||||||
{
|
|
||||||
GREATWOOD_SAPLING, SILVERWOOD_SAPLING, SILVERLEAF, CINDERPEARL;
|
|
||||||
}
|
|
||||||
public enum TCMiscResource
|
|
||||||
{
|
|
||||||
ALUMENTUM, NITOR, THAUMIUM, QUICKSILVER, MAGIC_TALLOW,
|
|
||||||
ZOMBIE_BRAIN, AMBER, ENCHANTED_FABRIC, FLUX_FILTER, KNOWLEDGE_FRAGMENT;
|
|
||||||
}
|
|
||||||
public enum TCShardType
|
|
||||||
{
|
|
||||||
AIR, FIRE, WATER, EARTH, MAGIC, DULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void init(String configPath)
|
public static void parseThaumcraftConfig(String configPath)
|
||||||
{
|
{
|
||||||
Configuration tcConfig = new Configuration(new File(configPath + "/Thaumcraft.cfg"));
|
Configuration tcConfig = new Configuration(new File(configPath + "/Thaumcraft.cfg"));
|
||||||
Property p;
|
Property p;
|
||||||
@@ -81,9 +70,6 @@ public class ThaumcraftCompat
|
|||||||
ItemManager.tcGolem = Item.itemsList[p.getInt() + 256];
|
ItemManager.tcGolem = Item.itemsList[p.getInt() + 256];
|
||||||
p = tcConfig.getItem("ItemEssence", 0);
|
p = tcConfig.getItem("ItemEssence", 0);
|
||||||
ItemManager.tcWispEssence = Item.itemsList[p.getInt() + 256];
|
ItemManager.tcWispEssence = Item.itemsList[p.getInt() + 256];
|
||||||
|
|
||||||
// Registers TC items with Forestry's backpacks.
|
|
||||||
setupBackpacks();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setupBackpacks()
|
public static void setupBackpacks()
|
||||||
@@ -129,32 +115,45 @@ public class ThaumcraftCompat
|
|||||||
public static void setupAspects()
|
public static void setupAspects()
|
||||||
{
|
{
|
||||||
ObjectTags tags;
|
ObjectTags tags;
|
||||||
|
ItemStack itemStack;
|
||||||
|
|
||||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.wax.itemID, WaxType.MAGIC.ordinal(), tags);
|
ThaumcraftApi.registerObjectTag(ItemManager.wax.itemID, WaxType.MAGIC.ordinal(), tags);
|
||||||
|
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.drops.itemID, DropType.ENCHANTED.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.drops.itemID, DropType.INTELLECT.ordinal(), tags);
|
||||||
|
|
||||||
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
|
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.miscResources.itemID, ItemMiscResources.ResourceType.LORE_FRAGMENT.ordinal(), tags);
|
ThaumcraftApi.registerObjectTag(ItemManager.miscResources.itemID, ItemMiscResources.ResourceType.LORE_FRAGMENT.ordinal(), tags);
|
||||||
|
|
||||||
tags = new ObjectTags().add(EnumTag.MAGIC, 1).add(EnumTag.INSECT, 2);
|
tags = new ObjectTags().add(EnumTag.MAGIC, 1).add(EnumTag.INSECT, 2).add(EnumTag.CONTROL, 1);
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.STARK.ordinal(), tags);
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.STARK.ordinal(), tags);
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.AIRY.ordinal(), tags);
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.AIRY.ordinal(), tags);
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.FIREY.ordinal(), tags);
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.FIREY.ordinal(), tags);
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.WATERY.ordinal(), tags);
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.WATERY.ordinal(), tags);
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.EARTHY.ordinal(), tags);
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.EARTHY.ordinal(), tags);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.INFUSED.ordinal(), tags);
|
||||||
|
|
||||||
// Tagging capsules.
|
// Tagging capsules.
|
||||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
|
||||||
ThaumcraftApi.registerComplexObjectTag(ItemManager.magicCapsule.itemID, -1, tags);
|
ThaumcraftApi.registerComplexObjectTag(ItemManager.magicCapsule.itemID, -1, tags);
|
||||||
|
|
||||||
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.VOID, 2);
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.VOID, 2);
|
||||||
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, 0, tags);
|
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, 0, tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.WATER, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, Liquid.WATER.ordinal(), tags);
|
||||||
|
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.FIRE, 2);
|
||||||
|
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, Liquid.LAVA.ordinal(), tags);
|
||||||
|
|
||||||
// Tag some Forestry stuff.
|
// Tag some Forestry stuff.
|
||||||
ItemStack itemStack = ItemInterface.getItem("craftingMaterial");
|
// Pulsating propolis
|
||||||
tags = new ObjectTags().add(EnumTag.ELDRITCH, 1).add(EnumTag.DESTRUCTION, 1);
|
itemStack = ItemInterface.getItem("propolis");
|
||||||
|
tags = new ObjectTags().add(EnumTag.ELDRITCH, 1).add(EnumTag.CONTROL, 1);
|
||||||
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, 2 , tags);
|
||||||
|
itemStack = ItemInterface.getItem("craftingMaterial");
|
||||||
// 0: pulsatingDust
|
// 0: pulsatingDust
|
||||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, 0, tags);
|
|
||||||
// 1: "pulsatingMesh";
|
// 1: "pulsatingMesh";
|
||||||
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
|
tags = new ObjectTags().add(EnumTag.ELDRITCH, 2);
|
||||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, 1, tags);
|
ThaumcraftApi.registerObjectTag(itemStack.itemID, 1, tags);
|
||||||
@@ -257,7 +256,7 @@ public class ThaumcraftCompat
|
|||||||
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.FLIGHT, 2);
|
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.FLIGHT, 2);
|
||||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All drones
|
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All drones
|
||||||
|
|
||||||
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.VALUABLE, 4);
|
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.VALUABLE, 4); // Get drone tags & add valuable
|
||||||
itemStack = ItemInterface.getItem("beePrincessGE");
|
itemStack = ItemInterface.getItem("beePrincessGE");
|
||||||
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All princesses.
|
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All princesses.
|
||||||
|
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import forestry.api.apiculture.IArmorApiarist;
|
||||||
|
|
||||||
|
public class ItemArmorApiarist extends Item implements IArmorApiarist
|
||||||
|
{
|
||||||
|
|
||||||
|
public ItemArmorApiarist(int par1)
|
||||||
|
{
|
||||||
|
super(par1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getNumberPiecesWorn(EntityPlayer player)
|
||||||
|
{
|
||||||
|
int count = 0;
|
||||||
|
|
||||||
|
if (wearsHelmet(player)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (wearsChest(player)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (wearsLegs(player)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
if (wearsBoots(player)) {
|
||||||
|
count++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return count;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean wearsHelmet(EntityPlayer player)
|
||||||
|
{
|
||||||
|
ItemStack armorItem = player.inventory.armorInventory[3];
|
||||||
|
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean wearsChest(EntityPlayer player)
|
||||||
|
{
|
||||||
|
ItemStack armorItem = player.inventory.armorInventory[2];
|
||||||
|
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean wearsLegs(EntityPlayer player)
|
||||||
|
{
|
||||||
|
ItemStack armorItem = player.inventory.armorInventory[1];
|
||||||
|
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean wearsBoots(EntityPlayer player)
|
||||||
|
{
|
||||||
|
ItemStack armorItem = player.inventory.armorInventory[0];
|
||||||
|
return armorItem != null && armorItem.getItem() instanceof IArmorApiarist;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -180,80 +180,4 @@ public class ItemCapsule extends Item
|
|||||||
{
|
{
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* @Override
|
|
||||||
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player)
|
|
||||||
{
|
|
||||||
MovingObjectPosition mop = this.getMovingObjectPositionFromPlayer(world, player, true);
|
|
||||||
|
|
||||||
if (mop != null && mop.typeOfHit == EnumMovingObjectType.TILE)
|
|
||||||
{
|
|
||||||
int i = mop.blockX;
|
|
||||||
int j = mop.blockY;
|
|
||||||
int k = mop.blockZ;
|
|
||||||
int targetedId = world.getBlockId(i, j, k);
|
|
||||||
int targetedMeta = world.getBlockMetadata(i, j, k);
|
|
||||||
|
|
||||||
// Check whether there is valid container for the liquid.
|
|
||||||
LiquidContainerData container = LiquidHelper.getEmptyContainer(itemStack, new LiquidStack(targetedId, 2, targetedMeta));
|
|
||||||
if (container != null)
|
|
||||||
{
|
|
||||||
// Search for a slot to stow a filled container in player's
|
|
||||||
// inventory
|
|
||||||
int slot = getMatchingItemSlot(player, container.filled);
|
|
||||||
if (slot >= 0)
|
|
||||||
{
|
|
||||||
if (player.inventory.getStackInSlot(slot) == null)
|
|
||||||
{
|
|
||||||
player.inventory.setInventorySlotContents(slot, container.filled.copy());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
player.inventory.getStackInSlot(slot).stackSize++;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove consumed empty container
|
|
||||||
itemStack.stackSize--;
|
|
||||||
|
|
||||||
// Notify player that his inventory has changed.
|
|
||||||
Proxies.net.inventoryChangeNotify(player);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return itemStack;
|
|
||||||
}
|
|
||||||
|
|
||||||
private int getMatchingItemSlot(EntityPlayer player, ItemStack itemStack)
|
|
||||||
{
|
|
||||||
int matchingSlot = -1;
|
|
||||||
int emptySlot = -1;
|
|
||||||
|
|
||||||
ItemStack[] inventory = player.inventory.mainInventory;
|
|
||||||
for (int i = 0; i < inventory.length; ++i)
|
|
||||||
{
|
|
||||||
// Check to see if this is an empty slot.
|
|
||||||
if (inventory[i] == null)
|
|
||||||
{
|
|
||||||
// Set our empty Slot counter if not already set.
|
|
||||||
if (emptySlot == -1)
|
|
||||||
{
|
|
||||||
emptySlot = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// See if contents of slot matches our target itemStack.
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (matchingSlot == -1)
|
|
||||||
{
|
|
||||||
matchingSlot = emptySlot;
|
|
||||||
}
|
|
||||||
|
|
||||||
return matchingSlot;
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -15,25 +15,32 @@ public class ItemComb extends Item
|
|||||||
{
|
{
|
||||||
public enum CombType
|
public enum CombType
|
||||||
{
|
{
|
||||||
OCCULT("Occult Comb", 0x6e1c6d, 0xff8fff),
|
OCCULT("Occult Comb", 0x6e1c6d, 0xff8fff, true),
|
||||||
OTHERWORLDLY("Otherworldy Comb", 0x000056, 0x765cc1),
|
OTHERWORLDLY("Otherworldy Comb", 0x000056, 0x765cc1, true),
|
||||||
PAPERY("Papery Comb", 0x503900, 0xbd9a30),
|
PAPERY("Papery Comb", 0x503900, 0xbd9a30, true),
|
||||||
STARK("Stark Comb", 0xB0B0BC, 0x6e6e79),
|
STARK("Stark Comb", 0xB0B0BC, 0x6e6e79, false),
|
||||||
AIRY("Airy Comb", 0xffff7e, 0x717600),
|
AIRY("Airy Comb", 0xffff7e, 0x717600, false),
|
||||||
FIREY("Firey Comb", 0xff3C01, 0x740002),
|
FIREY("Firey Comb", 0xff3C01, 0x740002, false),
|
||||||
WATERY("Watery Comb", 0x0090ff, 0x00308c),
|
WATERY("Watery Comb", 0x0090ff, 0x00308c, false),
|
||||||
EARTHY("Earthy Comb", 0x00a000, 0x005100),
|
EARTHY("Earthy Comb", 0x00a000, 0x005100, false),
|
||||||
|
INFUSED("Infused Comb", 0xaa32fc, 0x7A489E, false),
|
||||||
|
INTELLECT("Memory Comb", 0x618fff, 0xb0092e9, false),
|
||||||
|
SKULKING("Furtive Comb", 0x545454, 0xcda6cd, true),
|
||||||
;
|
;
|
||||||
|
|
||||||
private CombType(String pName, int colourA, int colourB)
|
private CombType(String pName, int colourA, int colourB, boolean show)
|
||||||
{
|
{
|
||||||
this.name = pName;
|
this.name = pName;
|
||||||
|
this.combColour = new int[2];
|
||||||
this.combColour[0] = colourA;
|
this.combColour[0] = colourA;
|
||||||
this.combColour[1] = colourB;
|
this.combColour[1] = colourB;
|
||||||
|
|
||||||
|
this.showInList = show;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final String name;
|
public final String name;
|
||||||
public int[] combColour = new int[2];
|
public int[] combColour;
|
||||||
|
public boolean showInList;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemComb(int itemID)
|
public ItemComb(int itemID)
|
||||||
@@ -61,7 +68,10 @@ public class ItemComb extends Item
|
|||||||
super.getSubItems(id, tabs, list);
|
super.getSubItems(id, tabs, list);
|
||||||
for (CombType type : CombType.values())
|
for (CombType type : CombType.values())
|
||||||
{
|
{
|
||||||
list.add(this.getStackForType(type));
|
if (type.showInList)
|
||||||
|
{
|
||||||
|
list.add(this.getStackForType(type));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -73,28 +83,36 @@ public class ItemComb extends Item
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getRenderPasses(int metadata)
|
public int getRenderPasses(int meta)
|
||||||
{
|
{
|
||||||
return 2;
|
int passes = 2;
|
||||||
|
return passes;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getIconIndex(ItemStack stack, int pass)
|
public int getIconIndex(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
|
int idx = 107;
|
||||||
// 107, 108 are the base forestry honeycomb textures.
|
// 107, 108 are the base forestry honeycomb textures.
|
||||||
return (pass >= 1) ? 108 : 107;
|
if (pass >= 1)
|
||||||
|
{
|
||||||
|
idx = 108;
|
||||||
|
}
|
||||||
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
int colour = 0xffffff;
|
int meta = Math.max(0, Math.min(CombType.values().length - 1, stack.getItemDamage()));
|
||||||
int meta = stack.getItemDamage();
|
int colour = CombType.values()[meta].combColour[0];
|
||||||
if (meta >= 0 && meta < CombType.values().length)
|
|
||||||
|
if (pass >= 1)
|
||||||
{
|
{
|
||||||
colour = CombType.values()[meta].combColour[pass % 2];
|
colour = CombType.values()[meta].combColour[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package thaumicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import thaumicbees.item.ItemComb.CombType;
|
||||||
import thaumicbees.item.ItemPollen.PollenType;
|
import thaumicbees.item.ItemPollen.PollenType;
|
||||||
import thaumicbees.main.CommonProxy;
|
import thaumicbees.main.CommonProxy;
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
@@ -16,6 +17,7 @@ public class ItemDrop extends Item
|
|||||||
public enum DropType
|
public enum DropType
|
||||||
{
|
{
|
||||||
ENCHANTED("Enchanting Drop", 0x6e1c6d, 0xff8fff),
|
ENCHANTED("Enchanting Drop", 0x6e1c6d, 0xff8fff),
|
||||||
|
INTELLECT("Intellect Drop", 0x25914D, 0x18E072),
|
||||||
;
|
;
|
||||||
|
|
||||||
private DropType(String pName, int colourA, int colourB)
|
private DropType(String pName, int colourA, int colourB)
|
||||||
@@ -74,20 +76,27 @@ public class ItemDrop extends Item
|
|||||||
@Override
|
@Override
|
||||||
public int getIconIndex(ItemStack stack, int pass)
|
public int getIconIndex(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
|
int idx = 109;
|
||||||
// 109, 110 are the base forestry drop textures.
|
// 109, 110 are the base forestry drop textures.
|
||||||
return 109 + pass;
|
if (pass >= 1)
|
||||||
|
{
|
||||||
|
idx = 110;
|
||||||
|
}
|
||||||
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
int colour = 0xffffff;
|
int meta = Math.max(0, Math.min(DropType.values().length - 1, stack.getItemDamage()));
|
||||||
int meta = stack.getItemDamage();
|
int colour = DropType.values()[meta].combColour[0];
|
||||||
if (meta >= 0 && meta < DropType.values().length)
|
|
||||||
|
if (pass >= 1)
|
||||||
{
|
{
|
||||||
colour = DropType.values()[meta].combColour[pass % 2];
|
colour = DropType.values()[meta].combColour[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
package thaumicbees.item;
|
package thaumicbees.item;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
import cpw.mods.fml.common.registry.GameRegistry;
|
import cpw.mods.fml.common.registry.GameRegistry;
|
||||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||||
|
import thaumicbees.compat.TCMiscResource;
|
||||||
|
import thaumicbees.compat.TCShardType;
|
||||||
|
import thaumicbees.compat.ThaumcraftCompat;
|
||||||
import thaumicbees.item.ItemComb.CombType;
|
import thaumicbees.item.ItemComb.CombType;
|
||||||
import thaumicbees.item.ItemDrop.DropType;
|
import thaumicbees.item.ItemDrop.DropType;
|
||||||
import thaumicbees.item.ItemMiscResources.ResourceType;
|
import thaumicbees.item.ItemMiscResources.ResourceType;
|
||||||
import thaumicbees.item.ItemPropolis.PropolisType;
|
import thaumicbees.item.ItemPropolis.PropolisType;
|
||||||
import thaumicbees.item.ItemWax.WaxType;
|
import thaumicbees.item.ItemWax.WaxType;
|
||||||
import thaumicbees.main.ThaumcraftCompat;
|
import thaumicbees.main.ThaumicBees;
|
||||||
import thaumicbees.storage.BackpackDefinition;
|
import thaumicbees.storage.BackpackDefinition;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
@@ -28,6 +32,7 @@ public class ItemManager
|
|||||||
public static ItemWax wax;
|
public static ItemWax wax;
|
||||||
public static ItemPropolis propolis;
|
public static ItemPropolis propolis;
|
||||||
public static ItemDrop drops;
|
public static ItemDrop drops;
|
||||||
|
public static ItemPollen pollen;
|
||||||
public static ItemMiscResources miscResources;
|
public static ItemMiscResources miscResources;
|
||||||
|
|
||||||
//----- Liquid Capsules --------------------
|
//----- Liquid Capsules --------------------
|
||||||
@@ -68,8 +73,11 @@ public class ItemManager
|
|||||||
ItemManager.thaumaturgeBackpackT2 =
|
ItemManager.thaumaturgeBackpackT2 =
|
||||||
BackpackManager.backpackInterface.addBackpack(configFile.getItem("thaumaturgePack2", itemIDBase++).getInt(),
|
BackpackManager.backpackInterface.addBackpack(configFile.getItem("thaumaturgePack2", itemIDBase++).getInt(),
|
||||||
def, EnumBackpackType.T2);
|
def, EnumBackpackType.T2);
|
||||||
|
// Add additional items from configs to backpack.
|
||||||
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ThaumicBees.getInstanceConfig().ThaumaturgeExtraItems);
|
||||||
|
|
||||||
ItemManager.magicCapsule = new ItemCapsule(ItemCapsule.Type.MAGIC, configFile.getItem("magicCapsule", itemIDBase++).getInt());
|
ItemManager.magicCapsule = new ItemCapsule(ItemCapsule.Type.MAGIC, configFile.getItem("magicCapsule", itemIDBase++).getInt());
|
||||||
|
ItemManager.pollen = new ItemPollen(configFile.getItem("pollen", itemIDBase++).getInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setupCrafting()
|
public static void setupCrafting()
|
||||||
@@ -102,7 +110,7 @@ public class ItemManager
|
|||||||
'W', ItemManager.wax.getStackForType(ItemWax.WaxType.MAGIC)
|
'W', ItemManager.wax.getStackForType(ItemWax.WaxType.MAGIC)
|
||||||
});
|
});
|
||||||
|
|
||||||
output = new ItemStack(tcMiscResource, 1, ThaumcraftCompat.TCMiscResource.KNOWLEDGE_FRAGMENT.ordinal());
|
output = new ItemStack(tcMiscResource, 1, TCMiscResource.KNOWLEDGE_FRAGMENT.ordinal());
|
||||||
GameRegistry.addShapelessRecipe(output, new Object[]
|
GameRegistry.addShapelessRecipe(output, new Object[]
|
||||||
{
|
{
|
||||||
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT),
|
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT),
|
||||||
@@ -120,13 +128,20 @@ public class ItemManager
|
|||||||
'C', Block.chest
|
'C', Block.chest
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// "bottling" Intellect drops
|
||||||
|
GameRegistry.addRecipe(new ItemStack(Item.expBottle), new Object[] {
|
||||||
|
"DDD", "DBD", "DDD",
|
||||||
|
'D', ItemManager.drops.getStackForType(DropType.INTELLECT),
|
||||||
|
'B', Item.glassBottle
|
||||||
|
});
|
||||||
|
|
||||||
// 20 is the 'average' time to centrifuge a comb.
|
// 20 is the 'average' time to centrifuge a comb.
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OCCULT),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OCCULT),
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||||
new int[] { 100, 60 });
|
new int[] { 100, 60 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OTHERWORLDLY),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OTHERWORLDLY),
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||||
new int[] { 60, 100 });
|
new int[] { 50, 20, 100 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.PAPERY),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.PAPERY),
|
||||||
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
|
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemManager.wax.getStackForType(WaxType.MAGIC), new ItemStack(Item.paper) },
|
||||||
new int[] { 80, 20, 5 });
|
new int[] { 80, 20, 5 });
|
||||||
@@ -145,29 +160,42 @@ public class ItemManager
|
|||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.EARTHY),
|
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.EARTHY),
|
||||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.EARTH) },
|
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.EARTH) },
|
||||||
new int[] { 100, 65 });
|
new int[] { 100, 65 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.STARK),
|
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.combs.getStackForType(CombType.INFUSED),
|
||||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.DULL.ordinal())},
|
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.INFUSED) },
|
||||||
new int[] { 20 });
|
new int[] { 100, 50, 65 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.AIR),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.INTELLECT),
|
||||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.AIR.ordinal())},
|
new ItemStack[] { ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeydew"), ItemManager.drops.getStackForType(DropType.INTELLECT) },
|
||||||
new int[] { 18 });
|
new int[] { 90, 40, 2 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.FIRE),
|
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.SKULKING),
|
||||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.FIRE.ordinal())},
|
new ItemStack[] {ItemInterface.getItem("beeswax"), ItemInterface.getItem("propolis"), ItemInterface.getItem("honeydew") },
|
||||||
new int[] { 18 });
|
new int[] { 90, 20, 35 });
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.WATER),
|
|
||||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.WATER.ordinal())},
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.STARK),
|
||||||
new int[] { 18 });
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.DULL.ordinal())},
|
||||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.EARTH),
|
new int[] { 13 });
|
||||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.EARTH.ordinal())},
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.AIR),
|
||||||
new int[] { 18 });
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.AIR.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.FIRE),
|
||||||
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.FIRE.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.WATER),
|
||||||
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.WATER.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.EARTH),
|
||||||
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.EARTH.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
RecipeManagers.centrifugeManager.addRecipe(8, ItemManager.propolis.getStackForType(PropolisType.INFUSED),
|
||||||
|
new ItemStack[] {new ItemStack(tcShard, 1, TCShardType.MAGIC.ordinal())},
|
||||||
|
new int[] { 10 });
|
||||||
|
|
||||||
// Squeezer recipes
|
// Squeezer recipes
|
||||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
||||||
new LiquidStack(Block.lavaStill, 250),
|
new LiquidStack(Block.lavaStill, 250),
|
||||||
new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.FIRE.ordinal()), 15);
|
new ItemStack(tcShard, 1, TCShardType.FIRE.ordinal()), 18);
|
||||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.WATER) },
|
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.WATER) },
|
||||||
new LiquidStack(Block.waterStill, 500),
|
new LiquidStack(Block.waterStill, 500),
|
||||||
new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.WATER.ordinal()), 25);
|
new ItemStack(tcShard, 1, TCShardType.WATER.ordinal()), 18);
|
||||||
|
|
||||||
// Carpenter recipes
|
// Carpenter recipes
|
||||||
inputStack = ItemInterface.getItem("craftingMaterial");
|
inputStack = ItemInterface.getItem("craftingMaterial");
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package thaumicbees.item;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import thaumicbees.item.ItemComb.CombType;
|
||||||
import thaumicbees.main.CommonProxy;
|
import thaumicbees.main.CommonProxy;
|
||||||
import thaumicbees.main.ThaumicBees;
|
import thaumicbees.main.ThaumicBees;
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
@@ -14,8 +15,7 @@ public class ItemPollen extends Item
|
|||||||
{
|
{
|
||||||
public enum PollenType
|
public enum PollenType
|
||||||
{
|
{
|
||||||
UNUSUAL("Unusual Pollen", 0x742700, 0xdbad40),
|
UNUSUAL("Unusual Pollen", 0xA03059, 0xD8417B),
|
||||||
FIBEROUS("Fiberous Pollen", 0x503900, 0xbd9a30),
|
|
||||||
;
|
;
|
||||||
|
|
||||||
private PollenType(String pName, int colourA, int colourB)
|
private PollenType(String pName, int colourA, int colourB)
|
||||||
@@ -73,20 +73,27 @@ public class ItemPollen extends Item
|
|||||||
@Override
|
@Override
|
||||||
public int getIconIndex(ItemStack stack, int pass)
|
public int getIconIndex(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
// 107, 108 are the base forestry honeycomb textures.
|
int idx = 45;
|
||||||
return 107 + pass;
|
// 45, 46 are the base forestry pollen textures.
|
||||||
|
if (pass >= 1)
|
||||||
|
{
|
||||||
|
idx = 46;
|
||||||
|
}
|
||||||
|
return idx;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||||
{
|
{
|
||||||
int colour = 0xffffff;
|
int meta = Math.max(0, Math.min(PollenType.values().length - 1, stack.getItemDamage()));
|
||||||
int meta = stack.getItemDamage();
|
int colour = PollenType.values()[meta].combColour[0];
|
||||||
if (meta >= 0 && meta < PollenType.values().length)
|
|
||||||
|
if (pass >= 1)
|
||||||
{
|
{
|
||||||
colour = PollenType.values()[meta].combColour[pass % 2];
|
colour = PollenType.values()[meta].combColour[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
return colour;
|
return colour;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ public class ItemPropolis extends Item
|
|||||||
FIRE("Firey Propolis", 0x95132F),
|
FIRE("Firey Propolis", 0x95132F),
|
||||||
WATER("Watery Propolis", 0x1054A1),
|
WATER("Watery Propolis", 0x1054A1),
|
||||||
EARTH("Earthen Propolis", 0x00a000),
|
EARTH("Earthen Propolis", 0x00a000),
|
||||||
|
INFUSED("Infused Propolis", 0xaa32fc),
|
||||||
;
|
;
|
||||||
|
|
||||||
private PropolisType(String pName, int overlayColour)
|
private PropolisType(String pName, int overlayColour)
|
||||||
|
|||||||
@@ -24,23 +24,23 @@ public class ClientProxy extends CommonProxy
|
|||||||
public void drawBeeEffects(World world, double xPos, double yPos, double zPos, int colour, int rangeX, int rangeY, int rangeZ)
|
public void drawBeeEffects(World world, double xPos, double yPos, double zPos, int colour, int rangeX, int rangeY, int rangeZ)
|
||||||
{
|
{
|
||||||
// drawParticleEffects flag pulled from Forestry after configs
|
// drawParticleEffects flag pulled from Forestry after configs
|
||||||
if (ThaumicBees.object.configFlags.DrawParticleEffects)
|
if (ThaumicBees.getInstanceConfig().DrawParticleEffects)
|
||||||
{
|
{
|
||||||
double spawnX = xPos;
|
double spawnX;
|
||||||
double spawnY = yPos;
|
double spawnY;
|
||||||
double spawnZ = zPos;
|
double spawnZ;
|
||||||
|
|
||||||
if (world.rand.nextBoolean())
|
if (world.rand.nextBoolean())
|
||||||
{
|
{
|
||||||
spawnX += 0.5;
|
spawnX = xPos + 0.5;
|
||||||
spawnY += 0.5;
|
spawnY = yPos + 0.75;
|
||||||
spawnZ += 0.5;
|
spawnZ = zPos + 0.5;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spawnX += world.rand.nextInt(rangeX * 2) - rangeX;
|
spawnX = xPos + world.rand.nextInt(rangeX * 2) - rangeX;
|
||||||
spawnY += world.rand.nextInt(rangeY);
|
spawnY = yPos + world.rand.nextInt(rangeY);
|
||||||
spawnZ += world.rand.nextInt(rangeZ * 2) - rangeY;
|
spawnZ = zPos + world.rand.nextInt(rangeZ * 2) - rangeZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.getClientInstance().effectRenderer.addEffect(new BeeRenderEffect(world, spawnX, spawnY, spawnZ, 0f, 0f, 0f, colour));
|
this.getClientInstance().effectRenderer.addEffect(new BeeRenderEffect(world, spawnX, spawnY, spawnZ, 0f, 0f, 0f, colour));
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
package thaumicbees.main;
|
|
||||||
|
|
||||||
public class ConfigFlags
|
|
||||||
{
|
|
||||||
public boolean DrawParticleEffects;
|
|
||||||
public boolean ThaumcraftRecipesAdded;
|
|
||||||
public boolean ExtraBeesInstalled;
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -22,6 +22,7 @@ import thaumcraft.api.*;
|
|||||||
import thaumicbees.bees.ThaumicBeesPlugin;
|
import thaumicbees.bees.ThaumicBeesPlugin;
|
||||||
import thaumicbees.bees.genetics.BeeSpecies;
|
import thaumicbees.bees.genetics.BeeSpecies;
|
||||||
import thaumicbees.block.BlockManager;
|
import thaumicbees.block.BlockManager;
|
||||||
|
import thaumicbees.compat.ThaumcraftCompat;
|
||||||
import thaumicbees.item.ItemComb;
|
import thaumicbees.item.ItemComb;
|
||||||
import thaumicbees.item.ItemWax;
|
import thaumicbees.item.ItemWax;
|
||||||
import thaumicbees.item.ItemManager;
|
import thaumicbees.item.ItemManager;
|
||||||
@@ -44,13 +45,13 @@ public class ThaumicBees
|
|||||||
|
|
||||||
private String configsPath;
|
private String configsPath;
|
||||||
private Configuration config;
|
private Configuration config;
|
||||||
public ConfigFlags configFlags;
|
private ThaumicBeesConfiguration modConfig;
|
||||||
|
|
||||||
public ThaumicBees()
|
public ThaumicBees()
|
||||||
{
|
{
|
||||||
this.configFlags = new ConfigFlags();
|
this.modConfig = new ThaumicBeesConfiguration();
|
||||||
|
|
||||||
this.configFlags.ThaumcraftRecipesAdded = false;
|
this.modConfig.ThaumcraftRecipesAdded = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.PreInit
|
@Mod.PreInit
|
||||||
@@ -58,25 +59,35 @@ public class ThaumicBees
|
|||||||
{
|
{
|
||||||
this.configsPath = event.getModConfigurationDirectory().getAbsolutePath();
|
this.configsPath = event.getModConfigurationDirectory().getAbsolutePath();
|
||||||
this.config = new Configuration(event.getSuggestedConfigurationFile());
|
this.config = new Configuration(event.getSuggestedConfigurationFile());
|
||||||
|
|
||||||
|
this.config.load();
|
||||||
|
// Allow us to set up some extra stuff.
|
||||||
|
this.modConfig.doMiscConfig(this.config);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Mod.Init
|
@Mod.Init
|
||||||
public void init(FMLInitializationEvent event)
|
public void init(FMLInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
// Check on ExtraBees & enable content. =D
|
||||||
|
this.modConfig.ExtraBeesInstalled = cpw.mods.fml.common.Loader.isModLoaded("ExtraBees");
|
||||||
|
|
||||||
// Give ThaumcraftCompat a chance to set itself up.
|
// Give ThaumcraftCompat a chance to set itself up.
|
||||||
ThaumcraftCompat.init(configsPath);
|
ThaumcraftCompat.parseThaumcraftConfig(configsPath);
|
||||||
this.proxy.preloadTextures();
|
this.proxy.preloadTextures();
|
||||||
|
|
||||||
// Grab Forestry graphics file path
|
// Grab Forestry graphics file path
|
||||||
proxy.FORESTRY_GFX_ITEMS = ItemInterface.getItem("beeComb").getItem().getTextureFile();
|
proxy.FORESTRY_GFX_ITEMS = ItemInterface.getItem("beeComb").getItem().getTextureFile();
|
||||||
|
|
||||||
this.config.load();
|
|
||||||
BlockManager.setupBlocks(this.config);
|
BlockManager.setupBlocks(this.config);
|
||||||
ItemManager.setupItems(this.config);
|
ItemManager.setupItems(this.config);
|
||||||
this.config.save();
|
this.config.save();
|
||||||
|
|
||||||
ItemManager.setupCrafting();
|
ItemManager.setupCrafting();
|
||||||
|
|
||||||
|
if (this.modConfig.AddThaumcraftItemsToBackpacks)
|
||||||
|
{
|
||||||
|
ThaumcraftCompat.setupBackpacks();
|
||||||
|
}
|
||||||
ThaumcraftCompat.setupResearch();
|
ThaumcraftCompat.setupResearch();
|
||||||
ThaumcraftCompat.setupAspects();
|
ThaumcraftCompat.setupAspects();
|
||||||
}
|
}
|
||||||
@@ -94,10 +105,15 @@ public class ThaumicBees
|
|||||||
@ForgeSubscribe
|
@ForgeSubscribe
|
||||||
public void worldLoad(net.minecraftforge.event.world.WorldEvent.Load event)
|
public void worldLoad(net.minecraftforge.event.world.WorldEvent.Load event)
|
||||||
{
|
{
|
||||||
if (!this.configFlags.ThaumcraftRecipesAdded)
|
if (!this.modConfig.ThaumcraftRecipesAdded)
|
||||||
{
|
{
|
||||||
ThaumicBeesPlugin.setupBeeInfusions(event.world);
|
ThaumicBeesPlugin.setupBeeInfusions(event.world);
|
||||||
this.configFlags.ThaumcraftRecipesAdded = true;
|
this.modConfig.ThaumcraftRecipesAdded = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ThaumicBeesConfiguration getInstanceConfig()
|
||||||
|
{
|
||||||
|
return object.modConfig;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
package thaumicbees.main;
|
||||||
|
|
||||||
|
import net.minecraftforge.common.Configuration;
|
||||||
|
import net.minecraftforge.common.Property;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A class to hold some data related to mod state & functions.
|
||||||
|
* @author MysteriousAges
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ThaumicBeesConfiguration
|
||||||
|
{
|
||||||
|
public boolean DrawParticleEffects;
|
||||||
|
public boolean ThaumcraftRecipesAdded;
|
||||||
|
public boolean ExtraBeesInstalled;
|
||||||
|
public boolean AddThaumcraftItemsToBackpacks;
|
||||||
|
|
||||||
|
public String ThaumaturgeExtraItems;
|
||||||
|
|
||||||
|
public void doMiscConfig(Configuration cfg)
|
||||||
|
{
|
||||||
|
Property p;
|
||||||
|
|
||||||
|
p = cfg.get("general", "backpack.thaumaturge.additionalItems", "");
|
||||||
|
p.comment = "Add additional items to the Thaumaturge's Backpack." +
|
||||||
|
"\n Format is the same as Forestry's: id:meta;id;id:meta (etc)";
|
||||||
|
this.ThaumaturgeExtraItems = p.value;
|
||||||
|
|
||||||
|
p = cfg.get("general", "backpack.forestry.addThaumcraftItems", true);
|
||||||
|
p.comment = "Set to true if you want ThaumicBees to add several Thaumcraft blocks & items to Forestry backpacks." +
|
||||||
|
"\n Set to false to disable.";
|
||||||
|
this.AddThaumcraftItemsToBackpacks = p.getBoolean(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Reference in new issue
Block a user