mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-20 04:09:48 +00:00
Cleaning up more warnings and unused code.
This commit is contained in:
1 parent
be12564bcc
commit
b1a3223fbe
23 files changed
+114
-283
No files matched your search
@@ -19,7 +19,7 @@ public class ContainerMagicApiary extends ContainerMB {
|
||||
private static final int SLOT_QUEEN = 0;
|
||||
private static final int SLOT_DRONE = 1;
|
||||
private static final int SLOT_FRAME_START = 2;
|
||||
private static final int SLOT_INVENTORY_START = 5;
|
||||
private static final int SLOT_INVENTORY_START = 5;
|
||||
private static final int SLOT_FRAME_COUNT = 3;
|
||||
private static final int SLOT_INVENTORY_COUNT = 7;
|
||||
|
||||
|
||||
@@ -2,20 +2,18 @@ package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.item.types.CapsuleType;
|
||||
import magicbees.item.types.FluidType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemCapsule extends Item
|
||||
{
|
||||
@@ -48,6 +46,7 @@ public class ItemCapsule extends Item
|
||||
return new ItemStack(this, 1, l.ordinal());
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List itemList)
|
||||
|
||||
@@ -36,6 +36,7 @@ public class ItemComb extends Item
|
||||
return new ItemStack(this, count, type.ordinal());
|
||||
}
|
||||
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
package magicbees.item;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.TabMagicBees;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
public class ItemCrystalAspect extends Item
|
||||
{
|
||||
public ItemCrystalAspect()
|
||||
{
|
||||
super();
|
||||
this.setCreativeTab(TabMagicBees.tabMagicBees);
|
||||
this.setHasSubtypes(true);
|
||||
this.setUnlocalizedName("crystalAspect");
|
||||
GameRegistry.registerItem(this, "crystalAspect");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list)
|
||||
{
|
||||
/*for (EnumTag tag : EnumTag.values())
|
||||
{
|
||||
if (tag == EnumTag.UNKNOWN)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
list.add(new ItemStack(this.itemID, 1, tag.id));
|
||||
}*/
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
this.itemIcon = par1IconRegister.registerIcon(CommonProxy.DOMAIN + ":crystalAspect");
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int getColorFromItemStack(ItemStack stack, int pass)
|
||||
{
|
||||
return 0;
|
||||
//return EnumTag.get(stack.getItemDamage()).color;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack)
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("resource.crystalAspect");
|
||||
//return String.format(LocalizationManager.getLocalizedString("resource.crystalAspect"), EnumTag.get(stack.getItemDamage()).name);
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@ public class ItemDrop extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
for (DropType type : DropType.values())
|
||||
|
||||
@@ -39,6 +39,7 @@ public class ItemMiscResources extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
for (ResourceType type : ResourceType.values())
|
||||
|
||||
@@ -48,6 +48,7 @@ public class ItemMoonDial extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List infoList, boolean par4)
|
||||
{
|
||||
if (Config.moonDialShowsPhaseInText &&
|
||||
|
||||
@@ -65,6 +65,7 @@ public class ItemMysteriousMagnet extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
String s = LocalizationManager.getLocalizedString("misc.level", itemStack.getItemDamage() >> 1);
|
||||
@@ -80,6 +81,7 @@ public class ItemMysteriousMagnet extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
for (int i = 0; i <= this.maxLevel; i++)
|
||||
@@ -120,13 +122,13 @@ public class ItemMysteriousMagnet extends Item
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void onUpdate(ItemStack itemStack, World world, Entity entity, int par4, boolean par5)
|
||||
{
|
||||
if (isMagnetActive(itemStack) && entity instanceof EntityPlayer)
|
||||
{
|
||||
EntityPlayer player = (EntityPlayer)entity;
|
||||
int dragCount = player.getCommandSenderName().hashCode();
|
||||
float radius = getRadius(itemStack.getItemDamage()) - fudgeFactor;
|
||||
AxisAlignedBB bounds = player.boundingBox.expand(radius, radius, radius);
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ public class ItemNugget extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list)
|
||||
{
|
||||
for (NuggetType type : NuggetType.values())
|
||||
|
||||
@@ -37,6 +37,7 @@ public class ItemPollen extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
for (PollenType type : PollenType.values())
|
||||
|
||||
@@ -36,6 +36,7 @@ public class ItemPropolis extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
for (PropolisType type : PropolisType.values())
|
||||
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import thaumcraft.api.IRepairableExtended;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
@@ -61,7 +62,8 @@ public class ItemThaumiumGrafter extends ItemGrafter implements IRepairableExten
|
||||
@Optional.Method(modid = ThaumcraftHelper.Name)
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() || super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
return OreDictionary.itemMatches(ThaumcraftApi.toolMatThaumium.getRepairItemStack(), par2ItemStack, true)
|
||||
|| super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -9,6 +9,7 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeHooks;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
@@ -77,7 +78,8 @@ public class ItemThaumiumScoop extends Item implements IRepairable, IToolScoop
|
||||
@Optional.Method(modid = ThaumcraftHelper.Name)
|
||||
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||
{
|
||||
return ThaumcraftApi.toolMatThaumium.customCraftingMaterial == par2ItemStack.getItem() || super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
return OreDictionary.itemMatches(ThaumcraftApi.toolMatThaumium.getRepairItemStack(), par2ItemStack, true)
|
||||
|| super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -54,6 +54,7 @@ public class ItemWax extends Item
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SuppressWarnings({ "unchecked", "rawtypes" })
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list)
|
||||
{
|
||||
for (WaxType type : WaxType.values())
|
||||
|
||||
@@ -7,7 +7,7 @@ public enum FluidType
|
||||
{
|
||||
// Incidentally, Item meta is the liquid ID.
|
||||
|
||||
// Args are: forgeLiquidID, Display Name, Icon idx
|
||||
// Args are: forgeLiquidID
|
||||
EMPTY(""),
|
||||
|
||||
// Vanilla
|
||||
|
||||
@@ -13,7 +13,6 @@ 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.ItemMagicHive;
|
||||
import magicbees.item.ItemMagicHiveFrame;
|
||||
@@ -113,7 +112,6 @@ public class Config
|
||||
public static ItemPropolis propolis;
|
||||
public static ItemDrop drops;
|
||||
public static ItemPollen pollen;
|
||||
public static ItemCrystalAspect solidFlux;
|
||||
public static ItemMiscResources miscResources;
|
||||
public static ItemFood jellyBaby;
|
||||
public static Item manasteelScoop;
|
||||
@@ -257,8 +255,9 @@ public class Config
|
||||
|
||||
public void setupBlocks()
|
||||
{
|
||||
setupEffectJar();
|
||||
setupHives();
|
||||
|
||||
setupEffectJar();
|
||||
setupApiary();
|
||||
|
||||
setupBotaniaBlocks();
|
||||
@@ -272,23 +271,19 @@ public class Config
|
||||
propolis = new ItemPropolis();
|
||||
drops = new ItemDrop();
|
||||
miscResources = new ItemMiscResources();
|
||||
|
||||
setupThaumcraftBackpacks();
|
||||
|
||||
magicCapsule = new ItemCapsule(CapsuleType.MAGIC, capsuleStackSizeMax);
|
||||
pollen = new ItemPollen();
|
||||
|
||||
setupThaumcraftItems();
|
||||
setupBotaniaItems();
|
||||
setupFrames();
|
||||
setupJellyBaby();
|
||||
voidCapsule = new ItemCapsule(CapsuleType.VOID, capsuleStackSizeMax);
|
||||
moonDial = new ItemMoonDial();
|
||||
|
||||
setupJellyBaby();
|
||||
setupNuggets();
|
||||
setupMysteriousMagnet();
|
||||
setupOreDictionaryEntries();
|
||||
setupFrames();
|
||||
magicCapsule = new ItemCapsule(CapsuleType.MAGIC, capsuleStackSizeMax);
|
||||
voidCapsule = new ItemCapsule(CapsuleType.VOID, capsuleStackSizeMax);
|
||||
|
||||
setupThaumcraftItems();
|
||||
setupBotaniaItems();
|
||||
|
||||
setupOreDictionaryEntries();
|
||||
setupMiscForestryItemHooks();
|
||||
}
|
||||
|
||||
@@ -515,31 +510,6 @@ public class Config
|
||||
}
|
||||
}
|
||||
|
||||
private void setupThaumcraftBackpacks() {
|
||||
if (ThaumcraftHelper.isActive() && thaumaturgeBackpackActive) {
|
||||
try {
|
||||
// 0x8700C6 is a purple-y colour, which is associated with Thaumcraft.
|
||||
String backpackName = LocalizationManager.getLocalizedString("backpack.thaumaturge");
|
||||
BackpackDefinition def = new BackpackDefinition("thaumaturge", backpackName, 0x8700C6);
|
||||
thaumaturgeBackpackT1 = BackpackManager.backpackInterface.addBackpack(def, EnumBackpackType.T1);
|
||||
thaumaturgeBackpackT1.setUnlocalizedName("backpack.thaumaturgeT1");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT1, "backpack.thaumaturgeT1");
|
||||
thaumaturgeBackpackT2 = BackpackManager.backpackInterface.addBackpack(def, EnumBackpackType.T2);
|
||||
thaumaturgeBackpackT2.setUnlocalizedName("backpack.thaumaturgeT2");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT2, "backpack.thaumaturgeT2");
|
||||
// Add additional items from configs to backpack.
|
||||
if (thaumaturgeExtraItems.length() > 0) {
|
||||
LogHelper.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@" + thaumaturgeExtraItems);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
LogHelper.error("MagicBees encountered a problem during loading!");
|
||||
LogHelper.error("Could not register backpacks via Forestry. Check your FML Client log and see if Forestry crashed silently.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void setupThaumcraftBlocks() {
|
||||
if (ThaumcraftHelper.isActive()) {
|
||||
visAuraProvider = new BlockVisAuraProvider();
|
||||
@@ -551,6 +521,8 @@ public class Config
|
||||
private void setupThaumcraftItems() {
|
||||
if (ThaumcraftHelper.isActive())
|
||||
{
|
||||
setupThaumcraftBackpacks();
|
||||
|
||||
// Items
|
||||
thaumiumScoop = new ItemThaumiumScoop();
|
||||
GameRegistry.registerItem(thaumiumScoop, thaumiumScoop.getUnlocalizedName(), CommonProxy.DOMAIN);
|
||||
@@ -559,6 +531,29 @@ public class Config
|
||||
GameRegistry.registerItem(thaumiumGrafter, thaumiumGrafter.getUnlocalizedName(), CommonProxy.DOMAIN);
|
||||
}
|
||||
}
|
||||
|
||||
private void setupThaumcraftBackpacks() {
|
||||
try {
|
||||
// 0x8700C6 is a purple-y colour, which is associated with Thaumcraft.
|
||||
String backpackName = LocalizationManager.getLocalizedString("backpack.thaumaturge");
|
||||
BackpackDefinition def = new BackpackDefinition("thaumaturge", backpackName, 0x8700C6);
|
||||
thaumaturgeBackpackT1 = BackpackManager.backpackInterface.addBackpack(def, EnumBackpackType.T1);
|
||||
thaumaturgeBackpackT1.setUnlocalizedName("backpack.thaumaturgeT1");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT1, "backpack.thaumaturgeT1");
|
||||
thaumaturgeBackpackT2 = BackpackManager.backpackInterface.addBackpack(def, EnumBackpackType.T2);
|
||||
thaumaturgeBackpackT2.setUnlocalizedName("backpack.thaumaturgeT2");
|
||||
GameRegistry.registerItem(thaumaturgeBackpackT2, "backpack.thaumaturgeT2");
|
||||
// Add additional items from configs to backpack.
|
||||
if (thaumaturgeExtraItems.length() > 0) {
|
||||
LogHelper.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@" + thaumaturgeExtraItems);
|
||||
}
|
||||
}
|
||||
catch (Exception e) {
|
||||
LogHelper.error("MagicBees encountered a problem during loading!");
|
||||
LogHelper.error("Could not register backpacks via Forestry. Check your FML Client log and see if Forestry crashed silently.");
|
||||
}
|
||||
}
|
||||
|
||||
private void setupMiscForestryItemHooks() {
|
||||
// Make Aromatic Lumps a swarmer inducer. Chance is /1000.
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package magicbees.main;
|
||||
|
||||
import magicbees.bees.BeeManager;
|
||||
import magicbees.bees.allele.effect.TransmutationEffectController;
|
||||
import magicbees.client.gui.GUIHandler;
|
||||
import magicbees.main.utils.CraftingManager;
|
||||
import magicbees.main.utils.IMCManager;
|
||||
|
||||
@@ -1,24 +1,9 @@
|
||||
package magicbees.main.utils;
|
||||
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import magicbees.main.CommonProxy;
|
||||
|
||||
public class LocalizationManager
|
||||
{
|
||||
private enum Locale
|
||||
{
|
||||
de_DE("de_DE"),
|
||||
en_US("en_US"),
|
||||
ru_RU("ru_RU"),
|
||||
zh_CN("zh_CN"),;
|
||||
public String locale;
|
||||
|
||||
private Locale(String loc)
|
||||
{
|
||||
this.locale = loc;
|
||||
}
|
||||
}
|
||||
|
||||
public static String getLocalizedString(String key)
|
||||
{
|
||||
String result = LanguageRegistry.instance().getStringLocalization(key);
|
||||
|
||||
@@ -5,10 +5,9 @@ import magicbees.main.Config;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
|
||||
public class ArsMagicaHelper
|
||||
{
|
||||
public enum ResourceType
|
||||
{
|
||||
public class ArsMagicaHelper {
|
||||
|
||||
public enum ResourceType {
|
||||
VINTEUM_DUST,
|
||||
ARCANE_COMPOUND,
|
||||
ARCANE_ASH,
|
||||
@@ -19,8 +18,7 @@ public class ArsMagicaHelper
|
||||
MOONSTONE,
|
||||
}
|
||||
|
||||
public enum EssenceType
|
||||
{
|
||||
public enum EssenceType {
|
||||
ARCANE,
|
||||
EARTH,
|
||||
AIR,
|
||||
@@ -39,62 +37,38 @@ public class ArsMagicaHelper
|
||||
private static boolean isArsMagicaPresent = false;
|
||||
public static final String Name = "arsmagica2";
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
public static boolean isActive() {
|
||||
return isArsMagicaPresent;
|
||||
}
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.arsMagicaActive)
|
||||
{
|
||||
public static void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.arsMagicaActive) {
|
||||
isArsMagicaPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
public static void init() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
public static void postInit() {
|
||||
}
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
try
|
||||
{
|
||||
Class clazz = Class.forName("am2.blocks.BlocksCommonProxy");
|
||||
Config.amResourceBlock = BlockInterface.getBlock(Name, "AMOres");
|
||||
Config.amBlackOrchid = BlockInterface.getBlock(Name, "blueOrchid");
|
||||
Config.amDesertNova = BlockInterface.getBlock(Name, "desertNova");
|
||||
Config.amAum = BlockInterface.getBlock(Name, "aum");
|
||||
Config.amWakebloom = BlockInterface.getBlock(Name, "wakebloom");
|
||||
Config.amTarmaRoot = BlockInterface.getBlock(Name, "tarmaRoot");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
private static void getBlocks() {
|
||||
Config.amResourceBlock = BlockInterface.getBlock(Name, "AMOres");
|
||||
Config.amBlackOrchid = BlockInterface.getBlock(Name, "blueOrchid");
|
||||
Config.amDesertNova = BlockInterface.getBlock(Name, "desertNova");
|
||||
Config.amAum = BlockInterface.getBlock(Name, "aum");
|
||||
Config.amWakebloom = BlockInterface.getBlock(Name, "wakebloom");
|
||||
Config.amTarmaRoot = BlockInterface.getBlock(Name, "tarmaRoot");
|
||||
}
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
try
|
||||
{
|
||||
Class clazz = Class.forName("am2.items.ItemsCommonProxy");
|
||||
Config.amItemResource = ItemInterface.getItem(Name, "itemOre");
|
||||
Config.amEssence = ItemInterface.getItem(Name, "essence");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
private static void getItems() {
|
||||
Config.amItemResource = ItemInterface.getItem(Name, "itemOre");
|
||||
Config.amEssence = ItemInterface.getItem(Name, "essence");
|
||||
}
|
||||
}
|
||||
@@ -1,54 +1,36 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class EquivalentExchangeHelper
|
||||
{
|
||||
public class EquivalentExchangeHelper {
|
||||
private static boolean isEquivalentExchangePresent = false;
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
public static boolean isActive() {
|
||||
return isEquivalentExchangePresent;
|
||||
}
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded("EE3") && Config.equivalentExchangeActive)
|
||||
{
|
||||
public static void preInit() {
|
||||
if (Loader.isModLoaded("EE3") && Config.equivalentExchangeActive) {
|
||||
isEquivalentExchangePresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
public static void init() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
public static void postInit() {
|
||||
}
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
private static void getBlocks() {
|
||||
}
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
try
|
||||
{
|
||||
Class itemClass = Class.forName("com.pahimar.ee3.item.ModItems");
|
||||
Config.eeMinuimShard = ItemInterface.getItem("EE3", "miniumShard");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
FMLLog.info("Could not get Equivalent Exchange items.");
|
||||
}
|
||||
private static void getItems() {
|
||||
Config.eeMinuimShard = ItemInterface.getItem("EE3", "miniumShard");
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,11 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import java.lang.reflect.Field;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import magicbees.main.Config;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class ExtraBeesHelper
|
||||
{
|
||||
public enum CombType
|
||||
{
|
||||
public class ExtraBeesHelper {
|
||||
|
||||
public enum CombType {
|
||||
BARREN,
|
||||
ROTTEN,
|
||||
BONE,
|
||||
@@ -91,46 +86,26 @@ public class ExtraBeesHelper
|
||||
PULP,
|
||||
MULCH,
|
||||
COMPOST,
|
||||
SAWDUST,;
|
||||
SAWDUST,
|
||||
;
|
||||
}
|
||||
|
||||
private static boolean isEBPresent = false;
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
public static boolean isActive() {
|
||||
return isEBPresent;
|
||||
}
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
public static void preInit() {
|
||||
if (Loader.isModLoaded("ExtraBees") && Config.extraBeesActive)
|
||||
{
|
||||
isEBPresent = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
public static void init() {
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
}
|
||||
|
||||
public static ItemStack getExtraBeeItem(String field)
|
||||
{
|
||||
ItemStack value = null;
|
||||
try
|
||||
{
|
||||
Class src = Class.forName("binnie.extrabees.core.ExtraBeeItem");
|
||||
Field f = src.getDeclaredField(field);
|
||||
|
||||
Item i = (Item)f.get(null);
|
||||
value = new ItemStack(i);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
}
|
||||
return value;
|
||||
public static void postInit() {
|
||||
}
|
||||
}
|
||||
@@ -1,79 +1,47 @@
|
||||
package magicbees.main.utils.compat;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
|
||||
public class RedstoneArsenalHelper
|
||||
{
|
||||
public enum MiscResource
|
||||
{
|
||||
FLUXED_ELECTRUMBLOCK,;
|
||||
public class RedstoneArsenalHelper {
|
||||
public enum MiscResource {
|
||||
FLUXED_ELECTRUMBLOCK, ;
|
||||
}
|
||||
|
||||
public enum NuggetType
|
||||
{
|
||||
ELECTRUMFLUX,;
|
||||
public enum NuggetType {
|
||||
ELECTRUMFLUX, ;
|
||||
}
|
||||
|
||||
|
||||
public static final String Name = "RedstoneArsenal";
|
||||
private static boolean isRedstoneArsenalPresent = false;
|
||||
|
||||
public static boolean isActive()
|
||||
{
|
||||
public static boolean isActive() {
|
||||
return isRedstoneArsenalPresent;
|
||||
}
|
||||
|
||||
public static void preInit()
|
||||
{
|
||||
if (Loader.isModLoaded(Name) && Config.redstoneArsenalActive)
|
||||
{
|
||||
public static void preInit() {
|
||||
if (Loader.isModLoaded(Name) && Config.redstoneArsenalActive) {
|
||||
isRedstoneArsenalPresent = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Switch off RSA-dependant items.
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public static void init()
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
public static void init() {
|
||||
if (isActive()) {
|
||||
getBlocks();
|
||||
getItems();
|
||||
setupCrafting();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit()
|
||||
{
|
||||
public static void postInit() {
|
||||
// if (isActive()) { }
|
||||
}
|
||||
|
||||
|
||||
private static void getBlocks()
|
||||
{
|
||||
private static void getBlocks() {
|
||||
Config.rsaFluxBlock = ItemInterface.getItemStack("RedstoneArsenal", "blockElectrumFlux", 1);
|
||||
}
|
||||
|
||||
private static void getItems()
|
||||
{
|
||||
private static void getItems() {
|
||||
Config.rsaFluxNugget = ItemInterface.getItemStack("RedstoneArsenal", "nuggetElectrumFlux", 1);
|
||||
}
|
||||
|
||||
|
||||
private static void setupCrafting()
|
||||
{
|
||||
ItemStack input, output;
|
||||
|
||||
|
||||
}
|
||||
|
||||
;
|
||||
|
||||
}
|
||||
|
||||
@@ -719,6 +719,7 @@ public class TileEntityMagicApiary extends TileEntity implements ISidedInventory
|
||||
return chunks;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private boolean searchChunkForBooster(Chunk chunk) {
|
||||
Vec3 apiaryPos = Vec3.createVectorHelper(xCoord, yCoord, zCoord);
|
||||
for (Map.Entry<ChunkPosition, TileEntity> entry : ((Map<ChunkPosition, TileEntity>)chunk.chunkTileEntityMap).entrySet()) {
|
||||
|
||||
Reference in new issue
Block a user