mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-18 19:39:06 +00:00
Sorting out problems with initialization order of item fetching, mod helper setup and bee alles & species setup.
Closes #70
This commit is contained in:
1 parent
8ef17ecbc9
commit
e9c1e5cf8c
5 files changed
+26
-22
No files matched your search
@@ -26,14 +26,21 @@ public class BeeManager
|
||||
private static List<Tuple<IAlleleBeeSpecies, Double>> worldgenSpeciesWeights = new ArrayList<Tuple<IAlleleBeeSpecies, Double>>();
|
||||
private static double worldgenSpeciesWeightsTotal = 0;
|
||||
|
||||
public static void ititializeBees()
|
||||
{
|
||||
public static void getBeeRoot() {
|
||||
beeRoot = (IBeeRoot)AlleleManager.alleleRegistry.getSpeciesRoot("rootBees");
|
||||
|
||||
}
|
||||
|
||||
public static void setupAlleles() {
|
||||
Allele.setupAdditionalAlleles();
|
||||
BeeSpecies.setupBeeSpecies();
|
||||
Allele.registerDeprecatedAlleleReplacements();
|
||||
}
|
||||
|
||||
public static void lateBeeInit()
|
||||
{
|
||||
BeeMutation.setupMutations();
|
||||
BeeProductHelper.initBaseProducts();
|
||||
BeeProductHelper.initOreDictSProducts();
|
||||
|
||||
HiveType.initHiveData();
|
||||
|
||||
|
||||
@@ -436,10 +436,6 @@ public enum BeeSpecies implements IAlleleBeeSpecies, IIconProvider
|
||||
BOT_SOMNOLENT.registerGenomeTemplate(BeeGenomeManager.getTemplateBotSomnolent());
|
||||
BOT_DREAMING.registerGenomeTemplate(BeeGenomeManager.getTemplateBotDreaming());
|
||||
BOT_ALFHEIM.registerGenomeTemplate(BeeGenomeManager.getTemplateBotAelfheim());
|
||||
|
||||
BeeProductHelper.initBaseProducts();
|
||||
|
||||
BeeProductHelper.initOreDictSProducts();
|
||||
|
||||
BeeProductHelper.initThaumcraftProducts();
|
||||
if (!ThaumcraftHelper.isActive()) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package magicbees.client.gui;
|
||||
|
||||
import forestry.api.apiculture.IHiveFrame;
|
||||
import forestry.plugins.PluginApiculture;
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import magicbees.tileentity.TileEntityMagicApiary;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -74,8 +74,8 @@ public class ContainerMagicApiary extends ContainerMB {
|
||||
clearSlot = this.mergeItemStack(srcStack, maxSlot + 1, maxSlot + 36, false);
|
||||
}else{
|
||||
if (slotIndex > maxSlot && srcStack != null){
|
||||
if (PluginApiculture.beeInterface.isMember(srcStack)){
|
||||
if (!PluginApiculture.beeInterface.isDrone(srcStack)){
|
||||
if (BeeManager.beeRoot.isMember(srcStack)){
|
||||
if (!BeeManager.beeRoot.isDrone(srcStack)){
|
||||
if (this.getSlot(SLOT_QUEEN).getHasStack() == false) {
|
||||
clearSlot = this.mergeItemStack(srcStack, SLOT_QUEEN, SLOT_QUEEN, false);
|
||||
}
|
||||
|
||||
@@ -60,6 +60,9 @@ public class MagicBees
|
||||
{
|
||||
ModHelper.init();
|
||||
LogHelper.info("Init completed");
|
||||
|
||||
BeeManager.getBeeRoot();
|
||||
BeeManager.setupAlleles();
|
||||
}
|
||||
|
||||
@Mod.EventHandler
|
||||
@@ -67,7 +70,7 @@ public class MagicBees
|
||||
{
|
||||
ModHelper.postInit();
|
||||
|
||||
BeeManager.ititializeBees();
|
||||
BeeManager.lateBeeInit();
|
||||
|
||||
this.guiHandler = new GUIHandler();
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(this, this.guiHandler);
|
||||
|
||||
@@ -29,8 +29,6 @@ import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.research.ResearchCategories;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import forestry.core.config.ForestryBlock;
|
||||
import forestry.core.config.ForestryItem;
|
||||
|
||||
public class ThaumcraftHelper {
|
||||
public enum MiscResource {
|
||||
@@ -548,37 +546,37 @@ public class ThaumcraftHelper {
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(Config.hive), list);
|
||||
|
||||
list = new AspectList().add(Aspect.LIGHT, 1);
|
||||
item = ForestryBlock.candle.getItemStack();
|
||||
item = new ItemStack(BlockInterface.getBlock(ForestryHelper.Name, "candle"));
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
list = new AspectList().add(Aspect.DARKNESS, 1);
|
||||
item = ForestryBlock.stump.getItemStack();
|
||||
item = new ItemStack(BlockInterface.getBlock(ForestryHelper.Name, "stump"));
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
list = new AspectList(new ItemStack(Blocks.glass)).add(Aspect.SENSES, 1);
|
||||
item = ForestryBlock.glass.getItemStack();
|
||||
item = new ItemStack(BlockInterface.getBlock(ForestryHelper.Name, "glass"));
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
|
||||
list = new AspectList().add(Aspect.EARTH, 2).add(Aspect.WATER, 2);
|
||||
item = ForestryBlock.soil.getItemStack();
|
||||
item = new ItemStack(BlockInterface.getBlock(ForestryHelper.Name, "soil"));
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { 1 }, list);
|
||||
|
||||
list = new AspectList(new ItemStack(Blocks.leaves));
|
||||
item = ForestryBlock.leaves.getItemStack();
|
||||
item = ItemInterface.getItemStack(ForestryHelper.Name, "candle");
|
||||
ThaumcraftApi.registerObjectTag(item, new int[] { item.getItemDamage() }, list);
|
||||
|
||||
list = new AspectList(new ItemStack(Blocks.sapling));
|
||||
item = ForestryBlock.saplingGE.getItemStack();
|
||||
item = ItemInterface.getItemStack(ForestryHelper.Name, "candle");
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
|
||||
list = new AspectList()/* .add(Aspect.SEED, 1) */.add(Aspect.PLANT, 1);
|
||||
item = ForestryItem.pollenFertile.getItemStack();
|
||||
item = ItemInterface.getItemStack(ForestryHelper.Name, "candle");
|
||||
ThaumcraftApi.registerObjectTag(item, list);
|
||||
|
||||
list = new AspectList().add(Aspect.CRYSTAL, 1).add(Aspect.EARTH, 2);
|
||||
item = ForestryItem.apatite.getItemStack();
|
||||
item = ItemInterface.getItemStack(ForestryHelper.Name, "candle");
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(item.getItem(), 1,ForestryHelper.BlockResource.APATITE.ordinal()), list.copy());
|
||||
item = ForestryItem.apatite.getItemStack();
|
||||
item = ItemInterface.getItemStack(ForestryHelper.Name, "apatite");
|
||||
ThaumcraftApi.registerObjectTag(new ItemStack(item.getItem(), 1, item.getItemDamage()), list.copy().add(Aspect.CRYSTAL, 2));
|
||||
|
||||
list = new AspectList().add(Aspect.MOTION, 2).add(Aspect.FLIGHT, 1);
|
||||
|
||||
Reference in new issue
Block a user