Compare commits

..
6 Commits
Author SHA1 Message Date
MysteriousAges ead879a913 Fixing error with Node Required mutations without specific type
Tweaking scholarly genome (temp. tolerance both 1 -> both 2)
Tweaking Aura Growth/pull bee effect
2013-02-03 17:07:44 -08:00
MysteriousAges 47a2962bd6 Fixing problems with @SideOnly functions again. 2013-01-30 13:22:26 -08:00
MysteriousAges 105a8d47a0 Tweaking Research for "Stark hint" - indicating more research is required.
Adding extra mutation to Vis bee with extra chance.
2013-01-29 18:43:34 -08:00
MysteriousAges ad16a3b999 Adding Weather aspect to the list of Fluxes the Flux bee doesn't generate. (Because it looks like an internal TC thing.) 2013-01-28 21:04:50 -08:00
MysteriousAges 63bb014de8 Bugfixes:
* Re-enabled capsules being added to the liquid dictionary.
* Discovered cause of items being added to creative tabs twice, and killed it.
2013-01-28 14:22:40 -08:00
MysteriousAges dc40994271 Refinements, bug fixes, the Node bee & effect. 2013-01-28 02:20:09 -08:00
22 changed files with 230 additions and 142 deletions

No files matched your search

+2 -2
View File
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
#Sat Jan 26 13:19:10 PST 2013
build.number=96
#Wed Jan 30 12:06:05 PST 2013
build.number=103
+1 -1
View File
@@ -88,7 +88,7 @@
<filter token="VERSION" value="${thaumicbees.version}" />
<filter token="BUILD_NUMBER" value="${build.number}" />
<filter token="FINGERPRINT" value="${key.fingerprint}" />
<filter token="MODVERSION" value="${VERSION}-${BUILD_NUMBER}" />
<filter token="MODVERSION" value="${thaumicbees.version} - ${build.number}" />
</filterset>
</copy>
@@ -14,7 +14,7 @@ The potential exists for further study. All that is required is some creative th
<longText>The cursory investigation you have completed in the direction of Beekeeping has yielded fruit. Perhaps under the right conditions, you can find a bee mutation that will enable you to infuse them with magic.</longText>
<page type="text">Even bees are susceptible to the influence of magic, some more than others.
Perhaps it would be possible to breed a bee from two species which are affected by Arcane or Supernatural powers. If such a species truly does exist, it could be possible that they could reveal additional secrets.</page>
Perhaps it would be possible to breed a bee from two species which are affected by Arcane or Supernatural powers. If such a species truly does exist, it could be possible that they could reveal additional secrets. Further research may be needed, in addition to a specimen.</page>
</project>
<project id="BEEINFUSION">
@@ -13,19 +13,22 @@ public class FlowerProviderAuraNodeFlux extends FlowerProviderAuraNode
{
@Override
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
{
EnumTag tag;
do
{
if (world.rand.nextInt(10) < 1)
{
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
}
while (tag == EnumTag.UNKNOWN);
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
if (nodeId != -1)
{
int quantity = world.rand.nextInt(2) + 1;
ThaumcraftApi.queueNodeChanges(nodeId, 0, 0, false, new ObjectTags().add(tag, quantity), 0f, 0f, 0f);
EnumTag tag;
do
{
tag = EnumTag.values()[world.rand.nextInt(EnumTag.values().length)];
}
while (tag == EnumTag.UNKNOWN || tag == EnumTag.WEATHER);
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(world, x, y, z, this.nodeRange);
if (nodeId != -1)
{
int quantity = world.rand.nextInt(2) + 1;
ThaumcraftApi.queueNodeChanges(nodeId, 0, 0, false, new ObjectTags().add(tag, quantity), 0f, 0f, 0f);
}
}
return products;
@@ -28,18 +28,21 @@ public class FlowerProviderAuraNodePurify extends FlowerProviderAuraNode
@Override
public ItemStack[] affectProducts(World world, IBeeGenome genome, int x, int y, int z, ItemStack[] products)
{
AuraNode node = this.getNodeWithinRange(world, x, y, z);
if (node != null)
if (world.rand.nextInt(10) < 1)
{
int aspectCount = node.flux.tags.size();
if (aspectCount > 0)
AuraNode node = this.getNodeWithinRange(world, x, y, z);
if (node != null)
{
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
if (selectedTag != null)
int aspectCount = node.flux.tags.size();
if (aspectCount > 0)
{
node.flux.remove(selectedTag, 1);
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().add(selectedTag, -1), 0, 0, 0);
products = addItemToProducts(products, new ItemStack(ItemManager.solidFlux, 1, selectedTag.id));
EnumTag selectedTag = node.flux.getAspectsSorted()[world.rand.nextInt(node.flux.tags.size())];
if (selectedTag != null)
{
node.flux.remove(selectedTag, 1);
ThaumcraftApi.queueNodeChanges(node.key, 0, 0, false, new ObjectTags().add(selectedTag, -1), 0, 0, 0);
products = addItemToProducts(products, new ItemStack(ItemManager.solidFlux, 1, selectedTag.id));
}
}
}
}
@@ -15,6 +15,7 @@ import thaumcraft.api.EnumTag;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import thaumicbees.bees.genetics.Allele;
import thaumicbees.bees.genetics.AlleleEffectAuraNodeGrow;
import thaumicbees.bees.genetics.AlleleEffectCure;
import thaumicbees.bees.genetics.AlleleEffectPotion;
import thaumicbees.bees.genetics.AlleleEffectSpawnMob;
@@ -43,21 +44,12 @@ import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.world.World;
public class ThaumicBeesPlugin
public class TBBeeManager
{
private static int defaultBodyColour = 0xFF6E0D;
private static int malevolentBodyColour = 0xe15236;
private static boolean hideSpecies = true;
public boolean isAvailable()
{
return true;
}
public void preInit()
{
}
public void doInit()
{
try
@@ -94,6 +86,8 @@ public class ThaumicBeesPlugin
Allele.cleansingEffect = new AlleleEffectCure("effectCurative", false);
Allele.digSpeed = new AlleleEffectPotion("effectDigSpeed", "Mining", Potion.digSpeed, 7, false);
Allele.moveSpeed = new AlleleEffectPotion("effectMoveSpeed", "Swiftness", Potion.moveSpeed, 5, false);
Allele.nodeGen = new AlleleEffectAuraNodeGrow("effectNodeGeneration", "Nodeify", false, 800);
Allele.spawnBrainyZombie = new AlleleEffectSpawnMob("effectBrainy", false, "Brainy", TCEntity.BRAINY_ZOMBIE.entityID);
Allele.spawnBrainyZombie.setAggrosPlayerOnSpawn().setThrottle(800).setSpawnsOnPlayerNear(null).setMaxMobsInSpawnZone(2);
@@ -135,7 +129,7 @@ public class ThaumicBeesPlugin
occult.addMemberSpecies(Allele.Mysterious);
breedingMgr.registerBeeTemplate(Allele.Mysterious.getGenome());
Allele.Arcane = new BeeSpecies("Arcane", "The pinnacle of magical bees. It is likely these lead to more powerful mutations...|Azanor, Master Thaumaturge",
Allele.Arcane = new BeeSpecies("Arcane", "\"Their produce is charged with magic.\"|Azanor, Master Thaumaturge",
"arcanus", occult, 0,
0xd242df, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
true, hideSpecies, true, true);
@@ -207,20 +201,18 @@ public class ThaumicBeesPlugin
Allele.Savant.setGenome(BeeGenomeManager.getTemplateSavant());
learned.addMemberSpecies(Allele.Savant);
breedingMgr.registerBeeTemplate(Allele.Savant.getGenome());
IClassification stark = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "torridus", "Torridus");
stark.setParent(familyBee);
IClassification magical = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "thaumis", "Thaumis");
magical.setParent(familyBee);
Allele.Stark = new BeeSpecies("Stark", "\"These are unusually attracted to shards. This warrents further investigation.\"|Azanor, Master Thaumaturge",
"torridae", stark, 0,
"torridae", magical, 0,
0xCCCCCC, 0x999999, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
true, hideSpecies, true, false);
Allele.Stark.addProduct(ItemManager.combs.getStackForType(CombType.STARK), 10);
Allele.Stark.setGenome(BeeGenomeManager.getTemplateStark());
breedingMgr.registerBeeTemplate(Allele.Stark.getGenome());
IClassification magical = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "thaumis", "Thaumis");
magical.setParent(familyBee);
Allele.Air = new BeeSpecies("Aura", "\"They work so fast it's breathtaking.\"|Sengir, Mad Apiarist",
"ventosa", magical, 0,
@@ -280,7 +272,7 @@ public class ThaumicBeesPlugin
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",
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);
@@ -304,6 +296,14 @@ public class ThaumicBeesPlugin
Allele.Flux.setGenome(BeeGenomeManager.getTemplateFlux());
breedingMgr.registerBeeTemplate(Allele.Flux.getGenome());
Allele.Node = new BeeSpecies("Node", "Having undergone a freak mutation, these bees now attract magic to them.|Apinomicon",
"conficiens", aware, 0,
0xFFF266, 0xFF8CE9, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
true, hideSpecies, true, false);
Allele.Node.addProduct(ItemManager.combs.getStackForType(CombType.INTELLECT), 20);
Allele.Node.setGenome(BeeGenomeManager.getTemplateNode());
breedingMgr.registerBeeTemplate(Allele.Node.getGenome());
IClassification malevolent = AlleleManager.alleleRegistry.createAndRegisterClassification(EnumClassLevel.GENUS, "malevolens", "Malevolens");
malevolent.setParent(familyBee);
@@ -383,14 +383,21 @@ public class ThaumicBeesPlugin
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)
.setAuraNodeRequired(15);
BeeMutation.Aware = new BeeMutation(Allele.getBaseSpecies("Demonic"), Allele.getBaseSpecies("Edenic"), Allele.Aware, 12);
BeeMutation.Vis = new BeeMutation(Allele.Aware, Allele.Arcane, Allele.Vis, 7)
.setAuraNodeRequired(40);
BeeMutation.Vis1 = new BeeMutation(Allele.Aware, Allele.Stark, Allele.Vis, 12)
.setAuraNodeRequired(80);
BeeMutation.Pure = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Pure, 5)
.setAuraNodeTypeRequired(5, EnumNodeType.PURE).setMoonPhaseBonus(MoonPhase.NEW, MoonPhase.NEW, 1.6f);
BeeMutation.Flux = new BeeMutation(Allele.Vis, Allele.getBaseSpecies("Edenic"), Allele.Flux, 5)
.setAuraNodeTypeRequired(30, EnumNodeType.UNSTABLE).setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 1.6f);*/
.setAuraNodeTypeRequired(30, EnumNodeType.UNSTABLE).setMoonPhaseBonus(MoonPhase.FULL, MoonPhase.FULL, 1.6f);
BeeMutation.Node = new BeeMutation(Allele.Vis, Allele.Vis, Allele.Node, 2)
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WANING_HALF, MoonPhase.WANING_HALF);
BeeMutation.Node1 = new BeeMutation(Allele.Vis, Allele.Vis, Allele.Node, 2)
.setAuraNodeRequired(4).setMoonPhaseRestricted(MoonPhase.WAXING_HALF, MoonPhase.WAXING_HALF);
// Now we get into a little bit of branching...
if (ThaumicBees.getInstanceConfig().ExtraBeesInstalled)
@@ -413,49 +420,4 @@ public class ThaumicBeesPlugin
BeeMutation.Wispy = new BeeMutation(Allele.Gossamer, Allele.getBaseSpecies("Cultivated"), Allele.Wispy, 8);
}
public String getDescription()
{
return "ThaumicBees";
}
public void generateSurface(World world, Random random, int i, int j)
{
}
public IGuiHandler getGuiHandler()
{
return null;
}
public IPacketHandler getPacketHandler()
{
return null;
}
public IPickupHandler getPickupHandler()
{
return null;
}
public IResupplyHandler getResupplyHandler()
{
return null;
}
public ISaveEventHandler getSaveEventHandler()
{
return null;
}
public IOreDictionaryHandler getDictionaryHandler()
{
return null;
}
public ICommand[] getConsoleCommands()
{
return null;
}
}
@@ -29,6 +29,7 @@ public class Allele implements IAllele
public static BeeSpecies Vis;
public static BeeSpecies Pure;
public static BeeSpecies Flux;
public static BeeSpecies Node;
public static BeeSpecies Skulking;
public static BeeSpecies Brainy;
@@ -52,6 +53,7 @@ public class Allele implements IAllele
public static AlleleEffectSpawnMob spawnWisp;
public static AlleleEffectSpawnMob spawnBats;
public static AlleleEffectSpawnMob spawnGhast;
public static AlleleEffectAuraNodeGrow nodeGen;
private String uid;
private boolean dominant;
@@ -0,0 +1,80 @@
package thaumicbees.bees.genetics;
import java.lang.reflect.Method;
import thaumcraft.api.AuraNode;
import thaumcraft.api.EnumNodeType;
import thaumcraft.api.ObjectTags;
import thaumcraft.api.ThaumcraftApi;
import net.minecraft.world.World;
import forestry.api.apiculture.IBeeGenome;
import forestry.api.apiculture.IBeeHousing;
import forestry.api.genetics.IEffectData;
public class AlleleEffectAuraNodeGrow extends AlleleEffect
{
private int throttle;
public AlleleEffectAuraNodeGrow(String id, String identifier, boolean isDominant, int timeout)
{
super(id, isDominant, identifier);
this.throttle = timeout;
}
@Override
public IEffectData validateStorage(IEffectData storedData)
{
if (storedData == null)
{
storedData = new EffectData(1, 0, 0);
}
return storedData;
}
@Override
public IEffectData doEffect(IBeeGenome genome, IEffectData storedData, IBeeHousing housing)
{
int value = storedData.getInteger(0);
if (value >= throttle)
{
World w = housing.getWorld();
if (w.rand.nextInt(20) < 1)
{
float x = housing.getXCoord();
float y = housing.getYCoord();
float z = housing.getZCoord();
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(w, x, y, z, 1800);
if (nodeId != -1)
{
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
if (node.level >= node.baseLevel * 3 / 4)
{
x = (float)(x - node.xPos);
y = (float)(y - node.yPos);
z = (float)(z - node.zPos);
float distance = (float)Math.sqrt(x * x + y * y + z * z);
x = x / distance;
y = y / distance;
z = z / distance;
x *= 0.0125f;
y *= 0.0125f;
z *= 0.0125f;
ThaumcraftApi.queueNodeChanges(nodeId, node.level * -3 / 8, w.rand.nextInt(1), false, null, x, y, z);
}
}
}
storedData.setInteger(0, 0);
}
else
{
storedData.setInteger(0, value + 1);
}
return storedData;
}
}
@@ -139,8 +139,7 @@ public class AlleleEffectSpawnMob extends AlleleEffect
AxisAlignedBB.getBoundingBox((int)pos[0], (int)pos[1], (int)pos[2], (int)pos[0] + 1, (int)pos[1] + 1, (int)pos[2] + 1)
.expand(8.0D, 4.0D, 8.0D)).size();
mob.setPosition(pos[0], pos[1], pos[2]);
mob.setAngles(world.rand.nextFloat() * 360f, 0f);
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
if (entitiesCount < this.maxMobsInArea && mob.getCanSpawnHere())
{
@@ -49,8 +49,7 @@ public class AlleleEffectSpawnWisp extends AlleleEffectSpawnMob
AxisAlignedBB.getBoundingBox((int)pos[0], (int)pos[1], (int)pos[2], (int)pos[0] + 1, (int)pos[1] + 1, (int)pos[2] + 1)
.expand(8.0D, 4.0D, 8.0D)).size();
mob.setPosition(pos[0], pos[1], pos[2]);
mob.setAngles(world.rand.nextFloat() * 360f, 0f);
mob.setPositionAndRotation(pos[0], pos[1], pos[2], world.rand.nextFloat() * 360f, 0f);
if (entitiesCount < this.maxMobsInArea && mob.getCanSpawnHere())
{
@@ -130,7 +130,7 @@ public class BeeGenomeManager
genome[EnumBeeChromosome.SPEED.ordinal()] = Allele.getBaseAllele("speedSlow");
genome[EnumBeeChromosome.LIFESPAN.ordinal()] = Allele.getBaseAllele("lifespanElongated");
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp1");
genome[EnumBeeChromosome.TEMPERATURE_TOLERANCE.ordinal()] = Allele.getBaseAllele("toleranceUp2");
genome[EnumBeeChromosome.CAVE_DWELLING.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.NOCTURNAL.ordinal()] = Allele.getBaseAllele("boolTrue");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = AlleleFlower.flowerBookshelf;
@@ -319,6 +319,18 @@ public class BeeGenomeManager
return genome;
}
public static IAllele[] getTemplateNode()
{
IAllele[] genome = getTemplateBaseVis();
genome[EnumBeeChromosome.SPECIES.ordinal()] = Allele.Node;
genome[EnumBeeChromosome.FLOWERING.ordinal()] = Allele.getBaseAllele("floweringSlowest");
genome[EnumBeeChromosome.FLOWER_PROVIDER.ordinal()] = Allele.flowerAuraNode;
genome[EnumBeeChromosome.EFFECT.ordinal()] = Allele.nodeGen;
return genome;
}
private static IAllele[] getTemplateBaseMalevolent()
{
IAllele[] genome = getTemplateBaseThaumic();
@@ -27,8 +27,11 @@ public class BeeMutation implements IBeeMutation
public static BeeMutation Savant;
public static BeeMutation Aware;
public static BeeMutation Vis;
public static BeeMutation Vis1;
public static BeeMutation Pure;
public static BeeMutation Flux;
public static BeeMutation Node;
public static BeeMutation Node1;
public static BeeMutation Skulking;
public static BeeMutation Brainy;
public static BeeMutation Gossamer;
@@ -93,12 +96,16 @@ public class BeeMutation implements IBeeMutation
{
int nodeId = ThaumcraftApi.getClosestAuraWithinRange(housing.getWorld(),
housing.getXCoord(), housing.getYCoord(), housing.getZCoord(), this.nodeRange);
if (nodeId >= 0 && this.nodeType != null)
if (nodeId >= 0)
{
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
if (node.type != this.nodeType)
if (this.nodeType != null)
{
chance = 0;
// Needs a _specific_ variety of node
AuraNode node = ThaumcraftApi.getNodeCopy(nodeId);
if (node.type != this.nodeType)
{
chance = 0;
}
}
}
else
@@ -107,7 +114,12 @@ public class BeeMutation implements IBeeMutation
}
}
finalChance = Math.round(chance * BeeManager.breedingManager.getBeekeepingMode(housing.getWorld()).getMutationModifier((IBeeGenome) genome0, (IBeeGenome) genome1));
finalChance = Math.round(chance
* housing.getMutationModifier((IBeeGenome) genome0,
(IBeeGenome) genome1)
* BeeManager.breedingManager.getBeekeepingMode(housing.getWorld())
.getMutationModifier((IBeeGenome) genome0,
(IBeeGenome) genome1));
}
return finalChance;
@@ -34,6 +34,11 @@ public class ItemCapsule extends Item
this.setCreativeTab(Tabs.tabApiculture);
this.setHasSubtypes(true);
}
public CapsuleType getType()
{
return this.capsuleType;
}
@Override
public String getItemDisplayName(ItemStack itemStack)
@@ -36,7 +36,6 @@ public class ItemComb extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (CombType type : CombType.values())
{
if (type.showInList)
@@ -36,7 +36,6 @@ public class ItemDrop extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (DropType type : DropType.values())
{
list.add(this.getStackForType(type));
@@ -9,6 +9,7 @@ import thaumicbees.item.types.CapsuleType;
import thaumicbees.item.types.CombType;
import thaumicbees.item.types.DropType;
import thaumicbees.item.types.HiveFrameType;
import thaumicbees.item.types.LiquidType;
import thaumicbees.item.types.PropolisType;
import thaumicbees.item.types.ResourceType;
import thaumicbees.item.types.WaxType;
@@ -99,8 +100,8 @@ public class ItemManager
}
catch (Exception e)
{
FMLLog.severe("ThaumicBees encountered an error during loading! Please ensure that Forestry did not fail to load.");
e.printStackTrace();
FMLLog.severe("ThaumicBees encountered a problem during loading!");
throw new RuntimeException("Could not register backpacks via Forestry. Check your FML Client log and see if Forestry crashed silently.", e);
}
@@ -328,13 +329,18 @@ public class ItemManager
}
public static void postInit()
{
registerLiquidContainer(ItemManager.magicCapsule);
}
private static void registerLiquidContainer(ItemCapsule baseCapsule)
{
// Forestry liquids aren't registered until PostInit, that's why we wait until now to register them.
/*ItemStack empty = new ItemStack(this, 1, 0);
ItemStack empty = new ItemStack(baseCapsule, 1, 0);
ItemStack filled;
LiquidStack liquid = null;
for (Liquid l : Liquid.values())
for (LiquidType l : LiquidType.values())
{
switch (l)
{
@@ -342,19 +348,19 @@ public class ItemManager
liquid = null;
break;
case WATER:
liquid = new LiquidStack(Block.waterStill, this.capsuleType.capacity);
liquid = new LiquidStack(Block.waterStill, baseCapsule.getType().capacity);
break;
case LAVA:
liquid = new LiquidStack(Block.lavaStill, this.capsuleType.capacity);
liquid = new LiquidStack(Block.lavaStill, baseCapsule.getType().capacity);
break;
default:
liquid = LiquidDictionary.getLiquid(l.liquidID, this.capsuleType.capacity);
liquid = LiquidDictionary.getLiquid(l.liquidID, baseCapsule.getType().capacity);
break;
}
if (liquid != null)
{
filled = new ItemStack(this, 1, l.ordinal());
filled = new ItemStack(baseCapsule, 1, l.ordinal());
LiquidContainerRegistry.registerLiquid(new LiquidContainerData(liquid, filled, empty));
// Register with Squeezer/Bottler
@@ -365,7 +371,7 @@ public class ItemManager
}
}
// Empty will be set to unavailable. Obviously, it always is.
Liquid.EMPTY.available = true;*/
LiquidType.EMPTY.available = true;
}
}
@@ -35,7 +35,6 @@ public class ItemMiscResources extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (ResourceType type : ResourceType.values())
{
if (type.showInList)
@@ -35,7 +35,6 @@ public class ItemPollen extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (PollenType type : PollenType.values())
{
list.add(this.getStackForType(type));
@@ -36,7 +36,6 @@ public class ItemPropolis extends Item
@SideOnly(Side.CLIENT)
public void getSubItems(int id, CreativeTabs tabs, List list)
{
super.getSubItems(id, tabs, list);
for (PropolisType type : PropolisType.values())
{
list.add(this.getStackForType(type));
@@ -21,7 +21,7 @@ import net.minecraftforge.event.EventBus;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.world.WorldEvent;
import thaumcraft.api.*;
import thaumicbees.bees.ThaumicBeesPlugin;
import thaumicbees.bees.TBBeeManager;
import thaumicbees.bees.genetics.BeeSpecies;
import thaumicbees.block.BlockManager;
import thaumicbees.item.ItemComb;
@@ -48,14 +48,14 @@ public class ThaumicBees
private String configsPath;
private Configuration config;
private ThaumicBeesConfiguration modConfig;
private ThaumicBeesPlugin plugin;
private TBBeeManager plugin;
public ThaumicBees()
{
this.modConfig = new ThaumicBeesConfiguration();
this.modConfig.ThaumcraftRecipesAdded = false;
this.plugin = new ThaumicBeesPlugin();
this.plugin = new TBBeeManager();
}
@Mod.PreInit
@@ -67,7 +67,6 @@ public class ThaumicBees
this.config.load();
// Allow us to set up some extra stuff.
this.modConfig.doMiscConfig(this.config);
plugin.preInit();
ThaumcraftCompat.registerResearch();
}
@@ -81,15 +80,24 @@ public class ThaumicBees
// Give ThaumcraftCompat a chance to set itself up.
ThaumcraftCompat.parseThaumcraftConfig(configsPath);
this.proxy.preloadTextures();
// Grab Forestry graphics file path
proxy.FORESTRY_GFX_ITEMS = ItemInterface.getItem("beeComb").getItem().getTextureFile();
try
{
FMLLog.info("[ThaumicBees] Attempting to get Forestry's item graphics file...");
// Grab Forestry graphics file path
proxy.FORESTRY_GFX_ITEMS = ItemInterface.getItem("beeComb").getItem().getTextureFile();
}
catch (Exception e)
{
FMLLog.severe("ThaumicBees encountered a problem while loading!");
throw new RuntimeException("Could not get the Forestry item texture file! Did Forestry load correctly?", e);
}
BlockManager.setupBlocks(this.config);
ItemManager.setupItems(this.config);
this.config.save();
// Vanilla & Forestry mechanics setup
ItemManager.setupCrafting();
// Thaumcraft-specific crafting (Infusions, & Vis-needing)
@@ -3,7 +3,7 @@ package thaumicbees.main;
public class VersionInfo
{
public static final String Version = "@VERSION@";
public static final String Version = "@MODVERSION@";
public static final String MCVersion = "@MCVERSION@";
public static final String Build = "@BUILD_NUMBER@";
@@ -145,7 +145,7 @@ public class ThaumcraftCompat
// Tagging capsules.
tags = new ObjectTags().add(EnumTag.MAGIC, 2);
ThaumcraftApi.registerComplexObjectTag(ItemManager.magicCapsule.itemID, -1, tags);
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, -1, tags);
tags = new ObjectTags().add(EnumTag.MAGIC, 2).add(EnumTag.VOID, 2);
ThaumcraftApi.registerObjectTag(ItemManager.magicCapsule.itemID, 0, tags);
@@ -259,39 +259,41 @@ public class ThaumcraftCompat
// Forestry's wood
itemStack = BlockInterface.getBlock("log1");
tags = new ObjectTags().add(EnumTag.WOOD, 8);
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log2"); // Same tags
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log3"); // Same tags.
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = BlockInterface.getBlock("log4"); // Still same tags.
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
itemStack = ItemInterface.getItem("sapling");
tags = new ObjectTags().add(EnumTag.PLANT, 4).add(EnumTag.WOOD, 2);
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags);
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags);
// BEES!
itemStack = ItemInterface.getItem("beeDroneGE");
tags = new ObjectTags().add(EnumTag.INSECT, 1).add(EnumTag.FLIGHT, 2);
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All drones
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // All drones
tags = new ObjectTags(itemStack.itemID, -1).add(EnumTag.VALUABLE, 4); // Get drone tags & add valuable
itemStack = ItemInterface.getItem("beePrincessGE");
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); // All princesses.
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // All princesses.
tags = new ObjectTags().add(EnumTag.VALUABLE, 8).add(EnumTag.INSECT, 2).add(EnumTag.FLIGHT, 4);
itemStack = ItemInterface.getItem("beeQueenGE");
ThaumcraftApi.registerComplexObjectTag(itemStack.itemID, -1, tags); //All queens.
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); //All queens.
}
public static void setupResearch()
{
ObjectTags tags = new ObjectTags().add(EnumTag.WOOD, 2).add(EnumTag.INSECT, 2);
ResearchItem startNode = new ResearchItem("TBSTARTNODE", tags, 10, 0, ItemManager.miscResources.getStackForType(ResourceType.RESEARCH_StartNode))
ObjectTags tags;
ResearchItem startNode = new ResearchItem("TBSTARTNODE", null, 10, 0, ItemManager.miscResources.getStackForType(ResourceType.RESEARCH_StartNode))
.setAutoUnlock()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.INSECT, 9).add(EnumTag.MAGIC, 2).add(EnumTag.FLUX, 2);
tags = new ObjectTags().add(EnumTag.INSECT, 9).add(EnumTag.MAGIC, 4).add(EnumTag.FLUX, 4);
ResearchItem starkHint = new ResearchItem("STARKHINT", tags, 5, 2, ItemInterface.getItem("beeQueenGE"))
.setParents(startNode)
.registerResearchItem();
@@ -302,7 +304,7 @@ public class ThaumcraftCompat
.setParents(starkHint, ResearchList.getResearch("UTFT")).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.CROP, 20).add(EnumTag.EARTH, 10).add(EnumTag.WATER, 2);
tags = new ObjectTags().add(EnumTag.CROP, 20).add(EnumTag.EARTH, 20).add(EnumTag.WATER, 5);
ResearchItem fertilizer = new ResearchItem("FERTILIZER", tags, 16, 0, ItemInterface.getItem("apatite"))
.setParents(startNode)
.registerResearchItem();
@@ -313,25 +315,25 @@ public class ThaumcraftCompat
.setParents(startNode)
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 15).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6)
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.ARMOR, 5).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.MAGIC, 8);
ResearchItem magicFrame2 = new ResearchItem("HIVEFRAME2", tags, 8, -2, ItemManager.hiveFrameResilient)
.setParents(magicFrame).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 15).add(EnumTag.LIFE, 5).add(EnumTag.EXCHANGE, 6)
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 5).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.HEAL, 2).add(EnumTag.FLOWER, 6);
ResearchItem gentleFrame = new ResearchItem("HIVEFRAMEGENTLE", tags, 12, -2, ItemManager.hiveFrameGentle)
.setParents(magicFrame).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 15).add(EnumTag.LIFE, 12).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.MAGIC, 8).add(EnumTag.MOTION, 5).add(EnumTag.FLESH, 3);
tags = new ObjectTags().add(EnumTag.TOOL, 4).add(EnumTag.INSECT, 10).add(EnumTag.LIFE, 6).add(EnumTag.EXCHANGE, 8)
.add(EnumTag.MAGIC, 8).add(EnumTag.MOTION, 4).add(EnumTag.FLESH, 4);
ResearchItem metabolicFrame = new ResearchItem("HIVEFRAMEMETA", tags, 9, -3, ItemManager.hiveFrameMetabolic)
.setParents(magicFrame).setHidden()
.registerResearchItem();
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 15).add(EnumTag.DEATH, 15).add(EnumTag.EXCHANGE, 6)
tags = new ObjectTags().add(EnumTag.TOOL, 5).add(EnumTag.INSECT, 10).add(EnumTag.DEATH, 15).add(EnumTag.EXCHANGE, 6)
.add(EnumTag.MAGIC, 8).add(EnumTag.POISON, 6);
ResearchItem necroticFrame = new ResearchItem("HIVEFRAMENECRO", tags, 11, -3, ItemManager.hiveFrameNecrotic)
.setParents(magicFrame).setHidden()