2013-05-23 21:07:28 -07:00
|
|
|
package magicbees.main;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
|
|
|
|
import java.io.File;
|
2013-05-13 13:11:34 -07:00
|
|
|
import java.lang.reflect.Constructor;
|
2013-04-22 16:03:27 -07:00
|
|
|
import java.lang.reflect.Field;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
2013-05-23 21:07:28 -07:00
|
|
|
import magicbees.block.BlockEffectJar;
|
|
|
|
|
import magicbees.block.BlockHive;
|
|
|
|
|
import magicbees.block.BlockPlanks;
|
|
|
|
|
import magicbees.block.BlockWoodSlab;
|
|
|
|
|
import magicbees.block.types.HiveType;
|
|
|
|
|
import magicbees.item.ItemCapsule;
|
|
|
|
|
import magicbees.item.ItemComb;
|
|
|
|
|
import magicbees.item.ItemCrystalAspect;
|
|
|
|
|
import magicbees.item.ItemDrop;
|
|
|
|
|
import magicbees.item.ItemMagicHiveFrame;
|
|
|
|
|
import magicbees.item.ItemMiscResources;
|
|
|
|
|
import magicbees.item.ItemMoonDial;
|
2013-09-17 19:40:26 -07:00
|
|
|
import magicbees.item.ItemMysteriousMagnet;
|
2013-05-23 21:07:28 -07:00
|
|
|
import magicbees.item.ItemNugget;
|
|
|
|
|
import magicbees.item.ItemPollen;
|
|
|
|
|
import magicbees.item.ItemPropolis;
|
|
|
|
|
import magicbees.item.ItemWax;
|
|
|
|
|
import magicbees.item.types.CapsuleType;
|
|
|
|
|
import magicbees.item.types.HiveFrameType;
|
|
|
|
|
import magicbees.item.types.NuggetType;
|
|
|
|
|
import magicbees.item.types.ResourceType;
|
2013-06-04 13:26:44 -07:00
|
|
|
import magicbees.item.types.WaxType;
|
2013-05-23 21:07:28 -07:00
|
|
|
import magicbees.main.utils.LocalizationManager;
|
|
|
|
|
import magicbees.main.utils.compat.ThaumcraftHelper;
|
|
|
|
|
import magicbees.storage.BackpackDefinition;
|
2013-05-29 11:15:25 -07:00
|
|
|
import magicbees.tileentity.TileEntityEffectJar;
|
2013-04-15 00:17:50 -07:00
|
|
|
import net.minecraft.block.Block;
|
|
|
|
|
import net.minecraft.item.Item;
|
|
|
|
|
import net.minecraft.item.ItemFood;
|
|
|
|
|
import net.minecraft.item.ItemMultiTextureTile;
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
|
import net.minecraft.potion.Potion;
|
|
|
|
|
import net.minecraft.util.WeightedRandomChestContent;
|
|
|
|
|
import net.minecraftforge.common.ChestGenHooks;
|
|
|
|
|
import net.minecraftforge.common.Configuration;
|
|
|
|
|
import net.minecraftforge.common.MinecraftForge;
|
|
|
|
|
import net.minecraftforge.common.Property;
|
|
|
|
|
import net.minecraftforge.oredict.OreDictionary;
|
2013-02-05 01:16:01 -08:00
|
|
|
import cpw.mods.fml.common.FMLLog;
|
|
|
|
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
2013-04-22 16:03:27 -07:00
|
|
|
import cpw.mods.fml.common.registry.GameRegistry;
|
2013-02-26 17:56:57 -08:00
|
|
|
import forestry.api.apiculture.BeeManager;
|
2013-02-05 01:16:01 -08:00
|
|
|
import forestry.api.storage.BackpackManager;
|
|
|
|
|
import forestry.api.storage.EnumBackpackType;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* A class to hold some data related to mod state & functions.
|
|
|
|
|
* @author MysteriousAges
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
public class Config
|
|
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
public boolean DrawParticleEffects;
|
|
|
|
|
public boolean BeeInfusionsAdded;
|
|
|
|
|
public boolean AddThaumcraftItemsToBackpacks;
|
|
|
|
|
public boolean DisableUpdateNotification;
|
|
|
|
|
public boolean AreMagicPlanksFlammable;
|
|
|
|
|
public boolean UseImpregnatedStickInTools;
|
|
|
|
|
public boolean MoonDialShowsPhaseInText;
|
|
|
|
|
public String ThaumaturgeExtraItems;
|
|
|
|
|
public int CapsuleStackSizeMax;
|
|
|
|
|
public boolean DoHiveRetrogen;
|
2013-06-04 13:26:44 -07:00
|
|
|
public boolean ForceHiveRegen;
|
2013-09-04 20:44:03 -07:00
|
|
|
|
2013-09-17 19:40:26 -07:00
|
|
|
public float MagnetBaseRange;
|
|
|
|
|
public float MagnetLevelMultiplier;
|
2013-09-25 21:21:03 -07:00
|
|
|
public int MagnetMaxLevel;
|
2013-09-17 19:40:26 -07:00
|
|
|
|
2013-09-25 21:21:03 -07:00
|
|
|
public boolean ForestryDebugEnabled;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
2013-02-18 12:13:31 -08:00
|
|
|
public static BlockPlanks planksWood;
|
|
|
|
|
public static BlockWoodSlab slabWoodHalf;
|
|
|
|
|
public static BlockWoodSlab slabWoodFull;
|
2013-04-22 16:03:27 -07:00
|
|
|
public static BlockEffectJar effectJar;
|
2013-05-23 21:07:28 -07:00
|
|
|
public static BlockHive hive;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
|
|
|
|
public static ItemComb combs;
|
|
|
|
|
public static ItemWax wax;
|
|
|
|
|
public static ItemPropolis propolis;
|
|
|
|
|
public static ItemDrop drops;
|
|
|
|
|
public static ItemPollen pollen;
|
2013-04-15 00:17:50 -07:00
|
|
|
public static ItemCrystalAspect solidFlux;
|
2013-02-05 01:16:01 -08:00
|
|
|
public static ItemMiscResources miscResources;
|
2013-02-09 14:12:43 -08:00
|
|
|
public static ItemFood jellyBaby;
|
2013-05-13 13:11:34 -07:00
|
|
|
public static Item thaumiumScoop;
|
|
|
|
|
public static Item thaumiumGrafter;
|
2013-04-11 02:40:25 -07:00
|
|
|
public static ItemNugget nuggets;
|
2013-04-15 02:27:33 -07:00
|
|
|
public static ItemMoonDial moonDial;
|
2013-09-17 19:40:26 -07:00
|
|
|
public static ItemMysteriousMagnet magnet;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
|
|
|
|
//----- Liquid Capsules --------------------
|
|
|
|
|
public static ItemCapsule magicCapsule;
|
2013-02-22 16:14:17 -08:00
|
|
|
public static ItemCapsule voidCapsule;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
|
|
|
|
//----- Apiary Frames ----------------------
|
|
|
|
|
public static ItemMagicHiveFrame hiveFrameMagic;
|
|
|
|
|
public static ItemMagicHiveFrame hiveFrameResilient;
|
|
|
|
|
public static ItemMagicHiveFrame hiveFrameGentle;
|
|
|
|
|
public static ItemMagicHiveFrame hiveFrameMetabolic;
|
|
|
|
|
public static ItemMagicHiveFrame hiveFrameNecrotic;
|
2013-02-09 14:12:43 -08:00
|
|
|
public static ItemMagicHiveFrame hiveFrameTemporal;
|
2013-04-11 02:40:25 -07:00
|
|
|
public static ItemMagicHiveFrame hiveFrameOblivion;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
|
|
|
|
//----- Backpacks ------------------------------------------
|
|
|
|
|
public static Item thaumaturgeBackpackT1;
|
|
|
|
|
public static Item thaumaturgeBackpackT2;
|
|
|
|
|
public static BackpackDefinition thaumaturgeBackpackDef;
|
|
|
|
|
|
2013-02-09 14:12:43 -08:00
|
|
|
//----- Forestry Blocks ------------------------------------
|
2013-09-12 19:33:08 -07:00
|
|
|
public static Block fHiveBlock;
|
2013-07-19 15:34:54 -07:00
|
|
|
public static Block fAlvearyBlock;
|
2013-02-09 14:12:43 -08:00
|
|
|
//----- Forestry Items -------------------------------------
|
|
|
|
|
public static Item fBeeComb;
|
2013-06-04 13:26:44 -07:00
|
|
|
public static Item fHoneydew;
|
|
|
|
|
public static Item fHoneyDrop;
|
2013-02-09 14:12:43 -08:00
|
|
|
public static Item fPollen;
|
|
|
|
|
public static Item fCraftingResource;
|
2013-02-05 01:16:01 -08:00
|
|
|
//----- Thaumcraft Blocks ----------------------------------
|
|
|
|
|
public static Block tcPlant;
|
|
|
|
|
public static Block tcCandle;
|
|
|
|
|
public static Block tcCrystal;
|
|
|
|
|
public static Block tcMarker;
|
|
|
|
|
public static Block tcJar;
|
|
|
|
|
public static Block tcLog;
|
|
|
|
|
public static Block tcLeaf;
|
|
|
|
|
public static Block tcWarded;
|
|
|
|
|
//----- Thaumcraft Items -----------------------------------
|
|
|
|
|
public static Item tcFilledJar;
|
|
|
|
|
public static Item tcMiscResource;
|
2013-09-09 23:23:00 -07:00
|
|
|
//public static Item tcEssentiaBottle;
|
2013-02-05 01:16:01 -08:00
|
|
|
public static Item tcShard;
|
|
|
|
|
public static Item tcGolem;
|
2013-09-09 23:23:00 -07:00
|
|
|
//public static Item tcWispEssence;
|
2013-02-06 00:33:51 -08:00
|
|
|
public static Item tcNuggets;
|
2013-04-11 02:40:25 -07:00
|
|
|
public static Item tcNuggetChicken;
|
|
|
|
|
public static Item tcNuggetBeef;
|
|
|
|
|
public static Item tcNuggetPork;
|
2013-04-24 15:43:23 -07:00
|
|
|
//----- Equivalent Exchange Blocks -------------------------
|
2013-04-11 02:40:25 -07:00
|
|
|
//----- Equivalent Exchange Items --------------------------
|
|
|
|
|
public static Item eeMinuimShard;
|
2013-04-24 15:43:23 -07:00
|
|
|
//----- Ars Magica Blocks ----------------------------------
|
2013-09-12 19:33:08 -07:00
|
|
|
public static Block amResourceBlock;
|
2013-04-24 15:43:23 -07:00
|
|
|
public static Block amBlackOrchid;
|
|
|
|
|
public static Block amDesertNova;
|
2013-09-12 19:33:08 -07:00
|
|
|
public static Block amAum;
|
|
|
|
|
public static Block amWakebloom;
|
|
|
|
|
public static Block amTarmaRoot;
|
2013-04-24 15:43:23 -07:00
|
|
|
//----- Ars Magica Items -----------------------------------
|
2013-09-12 19:33:08 -07:00
|
|
|
public static Item amItemResource;
|
|
|
|
|
public static Item amEssence;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
//----- Config State info ----------------------------------
|
2013-05-29 11:15:25 -07:00
|
|
|
private Configuration configuration;
|
2013-02-05 01:16:01 -08:00
|
|
|
|
|
|
|
|
public Config(File configFile)
|
|
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
this.configuration = new Configuration(configFile);
|
|
|
|
|
this.configuration.load();
|
2013-02-05 01:16:01 -08:00
|
|
|
this.doMiscConfig();
|
2013-09-25 21:21:03 -07:00
|
|
|
|
|
|
|
|
this.ForestryDebugEnabled = (new File("./config/forestry/DEBUG.ON")).exists();
|
2013-02-05 01:16:01 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void saveConfigs()
|
|
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
this.configuration.save();
|
2013-02-05 01:16:01 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void setupBlocks()
|
|
|
|
|
{
|
|
|
|
|
int blockIdBase = 1750;
|
|
|
|
|
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
int plankId = configuration.getBlock("planksTC", blockIdBase++).getInt();
|
|
|
|
|
int slabFullId = configuration.getBlock("slabFull", blockIdBase++).getInt();
|
|
|
|
|
int slabHalfId = configuration.getBlock("slabHalf", blockIdBase++).getInt();
|
2013-04-11 02:40:25 -07:00
|
|
|
|
2013-09-12 19:33:08 -07:00
|
|
|
/*if (ThaumcraftHelper.isActive())
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
|
|
|
|
planksWood = new BlockPlanks(plankId);
|
2013-05-29 11:15:25 -07:00
|
|
|
planksWood.setUnlocalizedName("planks");
|
2013-05-23 21:07:28 -07:00
|
|
|
|
|
|
|
|
Item.itemsList[planksWood.blockID] = null;
|
|
|
|
|
Item.itemsList[planksWood.blockID] = new ItemMultiTextureTile(planksWood.blockID - 256, planksWood, PlankType.getAllNames());
|
2013-04-28 22:11:56 -07:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", MagicBees.getConfig().planksWood.blockID + "@" + PlankType.GREATWOOD.ordinal());
|
|
|
|
|
FMLInterModComms.sendMessage("BuildCraft|Transport", "add-facade", MagicBees.getConfig().planksWood.blockID + "@" + PlankType.SILVERWOOD.ordinal());
|
2013-04-11 02:40:25 -07:00
|
|
|
|
|
|
|
|
slabWoodFull = new BlockWoodSlab(slabFullId, true);
|
|
|
|
|
slabWoodHalf = new BlockWoodSlab(slabHalfId, false);
|
|
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
slabWoodFull.setUnlocalizedName("planks");
|
|
|
|
|
slabWoodHalf.setUnlocalizedName("planks");
|
2013-05-23 21:07:28 -07:00
|
|
|
|
|
|
|
|
Item.itemsList[slabWoodHalf.blockID] = null;
|
|
|
|
|
Item.itemsList[slabWoodHalf.blockID] = new ItemSlab(slabWoodHalf.blockID - 256, slabWoodHalf, slabWoodFull, false);
|
|
|
|
|
Item.itemsList[slabWoodFull.blockID] = null;
|
|
|
|
|
Item.itemsList[slabWoodFull.blockID] = new ItemSlab(slabWoodFull.blockID - 256, slabWoodHalf, slabWoodFull, true);
|
2013-04-11 02:40:25 -07:00
|
|
|
|
2013-06-04 13:26:44 -07:00
|
|
|
OreDictionary.registerOre("plankWood", new ItemStack(planksWood, 1, -1));
|
2013-04-11 02:40:25 -07:00
|
|
|
OreDictionary.registerOre("slabWood", new ItemStack(slabWoodHalf, 1, -1));
|
2013-09-12 19:33:08 -07:00
|
|
|
}*/
|
2013-04-11 02:40:25 -07:00
|
|
|
}
|
|
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
effectJar = new BlockEffectJar(configuration.getBlock("effectJar", blockIdBase++).getInt());
|
|
|
|
|
GameRegistry.registerBlock(effectJar, "effectJar");
|
2013-06-04 13:26:44 -07:00
|
|
|
GameRegistry.registerTileEntity(TileEntityEffectJar.class, TileEntityEffectJar.tileEntityName);
|
2013-05-23 21:07:28 -07:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
hive = new BlockHive(configuration.getBlock("hives", blockIdBase++).getInt());
|
|
|
|
|
GameRegistry.registerBlock(hive, "hive");
|
|
|
|
|
|
|
|
|
|
for (HiveType t : HiveType.values())
|
|
|
|
|
{
|
|
|
|
|
MinecraftForge.setBlockHarvestLevel(hive, t.ordinal(), "scoop", 0);
|
|
|
|
|
}
|
2013-05-23 21:07:28 -07:00
|
|
|
|
2013-10-10 23:39:04 -07:00
|
|
|
FMLLog.info("Replacing stupid-block with 'Here, have some delicious textures' ItemBlock. This is 100%% normal.");
|
2013-05-23 21:07:28 -07:00
|
|
|
Item.itemsList[hive.blockID] = null;
|
|
|
|
|
Item.itemsList[hive.blockID] = new ItemMultiTextureTile(hive.blockID - 256, hive, HiveType.getAllNames());
|
2013-02-26 17:56:57 -08:00
|
|
|
}
|
|
|
|
|
|
2013-02-05 01:16:01 -08:00
|
|
|
public void setupItems()
|
2013-09-09 23:23:00 -07:00
|
|
|
{
|
2013-02-05 01:16:01 -08:00
|
|
|
int itemIDBase = 26090;
|
2013-05-13 13:11:34 -07:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
combs= new ItemComb(configuration.getItem("combs", itemIDBase++).getInt() - 256);
|
2013-06-04 13:26:44 -07:00
|
|
|
wax = new ItemWax(configuration.getItem("wax", itemIDBase++).getInt() - 256);
|
2013-05-29 11:15:25 -07:00
|
|
|
propolis = new ItemPropolis(configuration.getItem("propolis", itemIDBase++).getInt() - 256);
|
|
|
|
|
drops = new ItemDrop(configuration.getItem("drop", itemIDBase++).getInt() - 256);
|
|
|
|
|
miscResources = new ItemMiscResources(configuration.getItem("miscResources", itemIDBase++).getInt() - 256);
|
2013-02-05 01:16:01 -08:00
|
|
|
|
2013-02-26 17:56:57 -08:00
|
|
|
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
|
2013-05-29 11:15:25 -07:00
|
|
|
BeeManager.inducers.put(miscResources.getStackForType(ResourceType.AROMATIC_LUMP), 95);
|
2013-02-26 17:56:57 -08:00
|
|
|
|
2013-02-05 01:16:01 -08:00
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
int tier1 = configuration.getItem("thaumaturgePack1", itemIDBase++).getInt() - 256;
|
|
|
|
|
int tier2 = configuration.getItem("thaumaturgePack2", itemIDBase++).getInt() - 256;
|
2013-04-11 02:40:25 -07:00
|
|
|
|
|
|
|
|
if (ThaumcraftHelper.isActive())
|
2013-02-05 01:16:01 -08:00
|
|
|
{
|
2013-04-11 02:40:25 -07:00
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
// 0x8700C6 = purpleish.
|
2013-05-29 11:15:25 -07:00
|
|
|
String backpackName = LocalizationManager.getLocalizedString("backpack.thaumaturge");
|
2013-04-11 02:40:25 -07:00
|
|
|
BackpackDefinition def = new BackpackDefinition("thaumaturge", backpackName, 0x8700C6);
|
2013-06-05 00:11:40 -07:00
|
|
|
thaumaturgeBackpackT1 = BackpackManager.backpackInterface.addBackpack(tier1, def, EnumBackpackType.T1);
|
|
|
|
|
thaumaturgeBackpackT1.setUnlocalizedName("backpack.thaumaturgeT1");
|
2013-04-11 02:40:25 -07:00
|
|
|
thaumaturgeBackpackT2 = BackpackManager.backpackInterface.addBackpack(tier2, def, EnumBackpackType.T2);
|
2013-06-05 00:11:40 -07:00
|
|
|
thaumaturgeBackpackT2.setUnlocalizedName("backpack.thaumaturgeT2");
|
2013-04-11 02:40:25 -07:00
|
|
|
// Add additional items from configs to backpack.
|
2013-05-29 11:15:25 -07:00
|
|
|
if (MagicBees.getConfig().ThaumaturgeExtraItems.length() > 0)
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
FMLLog.info("Attempting to add extra items to Thaumaturge's backpack. If you get an error, check your MagicBees.conf.");
|
|
|
|
|
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + MagicBees.getConfig().ThaumaturgeExtraItems);
|
2013-04-11 02:40:25 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
FMLLog.severe("MagicBees encountered a problem during loading!");
|
2013-04-11 02:40:25 -07:00
|
|
|
FMLLog.severe("Could not register backpacks via Forestry. Check your FML Client log and see if Forestry crashed silently.");
|
|
|
|
|
}
|
2013-02-05 01:16:01 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
magicCapsule = new ItemCapsule(CapsuleType.MAGIC, configuration.getItem("magicCapsule", itemIDBase++).getInt() - 256, this.CapsuleStackSizeMax);
|
|
|
|
|
pollen = new ItemPollen(configuration.getItem("pollen", itemIDBase++).getInt() - 256);
|
2013-04-11 02:40:25 -07:00
|
|
|
|
|
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
int crystalId = configuration.getItem("fluxCrystal", itemIDBase++).getInt() - 256;
|
2013-09-12 19:33:08 -07:00
|
|
|
/*if (ThaumcraftHelper.isActive())
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
2013-04-15 00:17:50 -07:00
|
|
|
solidFlux = new ItemCrystalAspect(crystalId);
|
2013-09-12 19:33:08 -07:00
|
|
|
}*/
|
2013-04-11 02:40:25 -07:00
|
|
|
}
|
2013-02-05 01:16:01 -08:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
hiveFrameMagic = new ItemMagicHiveFrame(configuration.getItem("frameMagic", itemIDBase++).getInt() - 256, HiveFrameType.MAGIC);
|
|
|
|
|
hiveFrameResilient = new ItemMagicHiveFrame(configuration.getItem("frameResilient", itemIDBase++).getInt() - 256, HiveFrameType.RESILIENT);
|
|
|
|
|
hiveFrameGentle = new ItemMagicHiveFrame(configuration.getItem("frameGentle", itemIDBase++).getInt() - 256, HiveFrameType.GENTLE);
|
|
|
|
|
hiveFrameMetabolic = new ItemMagicHiveFrame(configuration.getItem("frameMetabolic", itemIDBase++).getInt() - 256, HiveFrameType.METABOLIC);
|
|
|
|
|
hiveFrameNecrotic = new ItemMagicHiveFrame(configuration.getItem("frameNecrotic", itemIDBase++).getInt() - 256, HiveFrameType.NECROTIC);
|
|
|
|
|
hiveFrameTemporal = new ItemMagicHiveFrame(configuration.getItem("frameTemporal", itemIDBase++).getInt() - 256, HiveFrameType.TEMPORAL);
|
|
|
|
|
hiveFrameOblivion = new ItemMagicHiveFrame(configuration.getItem("frameOblivion", itemIDBase++).getInt() - 256, HiveFrameType.OBLIVION);
|
2013-02-05 01:16:01 -08:00
|
|
|
// Future frames, so they all are clumped together.
|
|
|
|
|
itemIDBase++;
|
|
|
|
|
itemIDBase++;
|
|
|
|
|
itemIDBase++;
|
|
|
|
|
itemIDBase++;
|
|
|
|
|
itemIDBase++;
|
|
|
|
|
itemIDBase++;
|
|
|
|
|
itemIDBase++;
|
|
|
|
|
itemIDBase++;
|
|
|
|
|
|
2013-04-11 02:40:25 -07:00
|
|
|
ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_CORRIDOR, new WeightedRandomChestContent(new ItemStack(hiveFrameOblivion), 1, 1, 18));
|
|
|
|
|
ChestGenHooks.addItem(ChestGenHooks.STRONGHOLD_LIBRARY, new WeightedRandomChestContent(new ItemStack(hiveFrameOblivion), 1, 3, 23));
|
|
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
jellyBaby = new ItemFood(configuration.getItem("jellyBabies", itemIDBase++).getInt() - 256, 1, false).setAlwaysEdible()
|
2013-02-09 14:12:43 -08:00
|
|
|
.setPotionEffect(Potion.moveSpeed.id, 5, 1, 1f);
|
2013-09-17 19:40:26 -07:00
|
|
|
jellyBaby.setUnlocalizedName(CommonProxy.DOMAIN + ":jellyBabies").setTextureName(CommonProxy.DOMAIN + ":jellyBabies");
|
|
|
|
|
GameRegistry.registerItem(jellyBaby, CommonProxy.DOMAIN + ":jellyBabies");
|
2013-05-13 13:11:34 -07:00
|
|
|
|
2013-02-05 01:16:01 -08:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
voidCapsule = new ItemCapsule(CapsuleType.VOID, configuration.getItem("voidCapsule", itemIDBase++).getInt() - 256, this.CapsuleStackSizeMax);
|
2013-02-27 19:29:18 -08:00
|
|
|
|
2013-04-11 02:40:25 -07:00
|
|
|
{
|
2013-05-29 11:15:25 -07:00
|
|
|
int scoopID = configuration.getItem("thaumiumScoop", itemIDBase++).getInt() - 256;
|
|
|
|
|
int grafterID = configuration.getItem("thaumiumGrafter", itemIDBase++).getInt() - 256;
|
2013-04-11 02:40:25 -07:00
|
|
|
if (ThaumcraftHelper.isActive())
|
|
|
|
|
{
|
2013-05-13 13:11:34 -07:00
|
|
|
try {
|
|
|
|
|
// Reflecting avoids the need to directly include the Thaumcraft API in the jar. BAM!
|
2013-05-29 11:15:25 -07:00
|
|
|
Constructor ctor1 = Class.forName("magicbees.item.ItemThaumiumScoop").getConstructor(int.class);
|
2013-05-13 13:11:34 -07:00
|
|
|
thaumiumScoop = (Item)ctor1.newInstance(scoopID);
|
|
|
|
|
MinecraftForge.setToolClass(thaumiumScoop, "scoop", 3);
|
|
|
|
|
GameRegistry.registerItem(thaumiumScoop, thaumiumScoop.getUnlocalizedName());
|
|
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
Constructor ctor2 = Class.forName("magicbees.item.ItemThaumiumGrafter").getConstructor(int.class);
|
2013-05-13 13:11:34 -07:00
|
|
|
thaumiumGrafter = (Item)ctor2.newInstance(grafterID);
|
|
|
|
|
MinecraftForge.setToolClass(thaumiumGrafter, "grafter", 3);
|
|
|
|
|
GameRegistry.registerItem(thaumiumGrafter, thaumiumGrafter.getUnlocalizedName());
|
|
|
|
|
} catch (Exception e) { }
|
2013-04-11 02:40:25 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
moonDial = new ItemMoonDial(configuration.getItem("moonDial", itemIDBase++).getInt() - 256);
|
2013-04-15 02:27:33 -07:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
nuggets = new ItemNugget(configuration.getItem("beeNuggets", itemIDBase++).getInt() - 256);
|
2013-04-11 02:40:25 -07:00
|
|
|
|
2013-09-17 19:40:26 -07:00
|
|
|
magnet = new ItemMysteriousMagnet(configuration.getItem("magicMagnet", itemIDBase++).getInt() - 256);
|
2013-10-06 12:26:24 -07:00
|
|
|
magnet.setBaseRange(MagnetBaseRange);
|
|
|
|
|
magnet.setLevelMultiplier(MagnetLevelMultiplier);
|
|
|
|
|
magnet.setMaximumLevel(MagnetMaxLevel);
|
2013-09-17 19:40:26 -07:00
|
|
|
|
|
|
|
|
for (int level = 0; level <= 8; level++)
|
|
|
|
|
{
|
|
|
|
|
OreDictionary.registerOre("mb.magnet.level" + level, new ItemStack(magnet, 1, level * 2));
|
|
|
|
|
OreDictionary.registerOre("mb.magnet.level" + level, new ItemStack(magnet, 1, level * 2 + 1));
|
|
|
|
|
}
|
|
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
OreDictionary.registerOre("beeComb", new ItemStack(combs, 1, OreDictionary.WILDCARD_VALUE));
|
2013-06-04 13:26:44 -07:00
|
|
|
OreDictionary.registerOre("waxMagical", wax.getStackForType(WaxType.MAGIC));
|
|
|
|
|
OreDictionary.registerOre("waxMagical", wax.getStackForType(WaxType.AMNESIC));
|
2013-04-11 02:40:25 -07:00
|
|
|
OreDictionary.registerOre("nuggetIron", nuggets.getStackForType(NuggetType.IRON));
|
|
|
|
|
OreDictionary.registerOre("nuggetCopper", nuggets.getStackForType(NuggetType.COPPER));
|
|
|
|
|
OreDictionary.registerOre("nuggetTin", nuggets.getStackForType(NuggetType.TIN));
|
|
|
|
|
OreDictionary.registerOre("nuggetSilver", nuggets.getStackForType(NuggetType.SILVER));
|
|
|
|
|
OreDictionary.registerOre("nuggetLead", nuggets.getStackForType(NuggetType.LEAD));
|
|
|
|
|
OreDictionary.registerOre("shardDiamond", nuggets.getStackForType(NuggetType.DIAMOND));
|
|
|
|
|
OreDictionary.registerOre("shardEmerald", nuggets.getStackForType(NuggetType.EMERALD));
|
2013-06-17 16:46:05 -07:00
|
|
|
OreDictionary.registerOre("shardApatite", nuggets.getStackForType(NuggetType.APATITE));
|
2013-02-05 01:16:01 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void doMiscConfig()
|
|
|
|
|
{
|
|
|
|
|
Property p;
|
|
|
|
|
|
2013-04-22 16:03:27 -07:00
|
|
|
// Pull config from Forestry via reflection
|
|
|
|
|
Field f;
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
f = Class.forName("forestry.core.config.Config").getField("enableParticleFX");
|
|
|
|
|
this.DrawParticleEffects = f.getBoolean(null);
|
|
|
|
|
}
|
|
|
|
|
catch (Exception e)
|
|
|
|
|
{
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
p = configuration.get("general", "backpack.thaumaturge.additionalItems", "");
|
2013-02-05 01:16:01 -08:00
|
|
|
p.comment = "Add additional items to the Thaumaturge's Backpack." +
|
|
|
|
|
"\n Format is the same as Forestry's: id:meta;id;id:meta (etc)";
|
2013-04-15 00:17:50 -07:00
|
|
|
this.ThaumaturgeExtraItems = p.getString();
|
2013-02-05 01:16:01 -08:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
p = configuration.get("general", "backpack.forestry.addThaumcraftItems", true);
|
|
|
|
|
p.comment = "Set to true if you want MagicBees to add several Thaumcraft blocks & items to Forestry backpacks." +
|
2013-02-05 01:16:01 -08:00
|
|
|
"\n Set to false to disable.";
|
|
|
|
|
this.AddThaumcraftItemsToBackpacks = p.getBoolean(true);
|
2013-02-22 16:14:17 -08:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
p = configuration.get("general", "capsuleStackSize", 64);
|
|
|
|
|
p.comment = "Allows you to edit the stack size of the capsules in MagicBees if using GregTech, \n" +
|
2013-02-22 16:14:17 -08:00
|
|
|
"or the reduced capsule size in Forestry & Railcraft. Default: 64";
|
2013-04-11 23:08:17 -07:00
|
|
|
this.CapsuleStackSizeMax = p.getInt();
|
2013-03-06 20:44:06 -08:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
p = configuration.get("general", "disableVersionNotification", false);
|
|
|
|
|
p.comment = "Set to true to stop ThaumicBees from notifying you when new updates are available. (Does not supress critical updates)";
|
|
|
|
|
this.DisableUpdateNotification = p.getBoolean(false);
|
2013-03-28 09:21:00 -07:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
p = configuration.get("general", "areMagicPlanksFlammable", false);
|
2013-03-28 09:21:00 -07:00
|
|
|
p.comment = "Set to true to allow Greatwood & Silverwood planks to burn in a fire.";
|
|
|
|
|
this.AreMagicPlanksFlammable = p.getBoolean(false);
|
2013-04-11 02:40:25 -07:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
p = configuration.get("general", "useImpregnatedStickInTools", false);
|
2013-04-11 02:40:25 -07:00
|
|
|
p.comment = "Set to true to make Thaumium Grafter & Scoop require impregnated sticks in the recipe.";
|
|
|
|
|
this.UseImpregnatedStickInTools = p.getBoolean(false);
|
2013-04-21 15:38:52 -07:00
|
|
|
|
2013-05-29 11:15:25 -07:00
|
|
|
p = configuration.get("general", "moonDialShowText", false);
|
2013-04-21 15:38:52 -07:00
|
|
|
p.comment = "set to true to show the current moon phase in mouse-over text.";
|
|
|
|
|
this.MoonDialShowsPhaseInText = p.getBoolean(false);
|
2013-05-29 11:15:25 -07:00
|
|
|
|
2013-06-04 13:26:44 -07:00
|
|
|
p = configuration.get("Retrogen", "doHiveRetrogen", false);
|
2013-05-29 11:15:25 -07:00
|
|
|
p.comment = "Set to true to enable retroactive worldgen of Magic Bees hives.";
|
|
|
|
|
this.DoHiveRetrogen = p.getBoolean(false);
|
2013-06-04 13:26:44 -07:00
|
|
|
|
|
|
|
|
p = configuration.get("Retrogen", "forceHiveRegen", false);
|
|
|
|
|
p.comment = "Set to true to force a regeneration of Magic Bees hives. Will set config option to false after parsed. (Implies doHiveRetrogen=true)";
|
|
|
|
|
this.ForceHiveRegen = p.getBoolean(false);
|
|
|
|
|
|
|
|
|
|
if (this.ForceHiveRegen)
|
|
|
|
|
{
|
|
|
|
|
FMLLog.info("Magic Bees will aggressively regenerate hives in all chunks for this game instance. Config option set to false.");
|
|
|
|
|
p.set(false);
|
|
|
|
|
this.DoHiveRetrogen = true;
|
|
|
|
|
}
|
|
|
|
|
else if (this.DoHiveRetrogen)
|
|
|
|
|
{
|
|
|
|
|
FMLLog.info("Magic Bees will attempt to regenerate hives in chunks that were generated before the mod was added.");
|
|
|
|
|
}
|
2013-09-17 19:40:26 -07:00
|
|
|
|
2013-10-06 12:26:24 -07:00
|
|
|
p = configuration.get("general", "magnetRangeBase", 3.0);
|
2013-09-17 19:40:26 -07:00
|
|
|
p.comment = "Base range (in blocks) of the Mysterious Magnet";
|
|
|
|
|
this.MagnetBaseRange = (float)p.getDouble(3.0);
|
2013-09-04 20:44:03 -07:00
|
|
|
|
2013-09-17 19:40:26 -07:00
|
|
|
p = configuration.get("general", "magnetRangeMultiplier", 0.75);
|
|
|
|
|
p.comment = "Range multiplier per level of the Mysterious Magnet. Total range = base range + level * multiplier";
|
2013-09-25 21:21:03 -07:00
|
|
|
this.MagnetLevelMultiplier = (float)p.getDouble(0.75);
|
|
|
|
|
|
|
|
|
|
p = configuration.get("general", "magnetMaximumLevel", 8);
|
|
|
|
|
p.comment = "Maximum level of the magnets.";
|
2013-10-06 12:26:24 -07:00
|
|
|
this.MagnetMaxLevel = p.getInt();
|
2013-02-05 01:16:01 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|