mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-19 20:00:03 +00:00
Started work on BloodMagic bees
Created 2 very basic, BM bees. Also fixed a crash when trying to get nuggets from an ingot. Also removed some unneeded nuggets.
This commit is contained in:
1 parent
f5a6ca61ba
commit
2b0b729ad0
6 files changed
+72
-11
No files matched your search
@@ -1,9 +1,11 @@
|
||||
package magicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import magicbees.item.types.NuggetType;
|
||||
import magicbees.main.CommonProxy;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -59,7 +61,7 @@ public class ItemNugget extends Item
|
||||
+ NuggetType.values()[i].name().substring(1).toLowerCase());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta)
|
||||
|
||||
@@ -2,6 +2,7 @@ package magicbees.item.types;
|
||||
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
public enum NuggetType
|
||||
{
|
||||
@@ -12,13 +13,7 @@ public enum NuggetType
|
||||
LEAD,
|
||||
DIAMOND,
|
||||
EMERALD,
|
||||
APATITE,
|
||||
ELECTRUM,
|
||||
PLATINUM,
|
||||
NICKEL,
|
||||
INVAR,
|
||||
BRONZE,
|
||||
ENDERIUM,
|
||||
APATITE,
|
||||
;
|
||||
|
||||
private Item targetIngot;
|
||||
@@ -53,4 +48,5 @@ public enum NuggetType
|
||||
{
|
||||
return LocalizationManager.getLocalizedString("nugget." + this.toString().toLowerCase());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import magicbees.block.types.PlankType;
|
||||
import magicbees.item.*;
|
||||
import magicbees.item.types.*;
|
||||
import magicbees.main.utils.LocalizationManager;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import magicbees.main.utils.VersionInfo;
|
||||
import magicbees.main.utils.compat.ThaumcraftHelper;
|
||||
import magicbees.storage.BackpackDefinition;
|
||||
@@ -170,7 +171,20 @@ public class Config
|
||||
public static FluidStack teFluidCoal;
|
||||
public static FluidStack teFluidRedstone;
|
||||
public static FluidStack teFluidEnder;
|
||||
|
||||
//--- Blood Magic Blocks ---
|
||||
public static Block bmBloodStoneBrick;
|
||||
//--- Blood Magic Items ---
|
||||
public static ItemStack bmIncendium;
|
||||
public static ItemStack bmMagicales;
|
||||
public static ItemStack bmSanctus;
|
||||
public static ItemStack bmAether;
|
||||
public static ItemStack bmCrepitous;
|
||||
public static ItemStack bmCrystallos;
|
||||
public static ItemStack bmTerrae;
|
||||
public static ItemStack bmAquasalus;
|
||||
public static ItemStack bmTennebrae;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -352,7 +366,8 @@ public class Config
|
||||
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));
|
||||
}
|
||||
|
||||
|
||||
|
||||
OreDictionary.registerOre("beeComb", new ItemStack(combs, 1, OreDictionary.WILDCARD_VALUE));
|
||||
OreDictionary.registerOre("waxMagical", wax.getStackForType(WaxType.MAGIC));
|
||||
OreDictionary.registerOre("waxMagical", wax.getStackForType(WaxType.AMNESIC));
|
||||
@@ -364,6 +379,26 @@ public class Config
|
||||
OreDictionary.registerOre("shardDiamond", nuggets.getStackForType(NuggetType.DIAMOND));
|
||||
OreDictionary.registerOre("shardEmerald", nuggets.getStackForType(NuggetType.EMERALD));
|
||||
OreDictionary.registerOre("shardApatite", nuggets.getStackForType(NuggetType.APATITE));
|
||||
|
||||
|
||||
String item;
|
||||
for (NuggetType type: NuggetType.values())
|
||||
{
|
||||
LogHelper.info("Found nugget of type " + type.toString());
|
||||
item = type.toString().toLowerCase();
|
||||
item = Character.toString(item.charAt(0)).toUpperCase() + item.substring(1);
|
||||
if (OreDictionary.getOres("ingot" + item).size() <= 0)
|
||||
{
|
||||
if (OreDictionary.getOres("shard" + item).size() <= 0)
|
||||
{
|
||||
LogHelper.info("Disabled nugget " + type.toString());
|
||||
type.setInactive();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
GameRegistry.registerItem(nuggets, "beeNugget");
|
||||
}
|
||||
|
||||
private void doMiscConfig()
|
||||
|
||||
@@ -63,6 +63,7 @@ public class CraftingManager
|
||||
});
|
||||
|
||||
output = output.copy();
|
||||
output.stackSize = 12;
|
||||
GameRegistry.addRecipe(output, new Object[] {
|
||||
"aaa", "aFa", "aaa",
|
||||
'F', input,
|
||||
|
||||
@@ -10,6 +10,11 @@ public class ItemInterface {
|
||||
return GameRegistry.findItemStack("Forestry", item, 1);
|
||||
}
|
||||
|
||||
public static ItemStack getItemStack(String modId, String item)
|
||||
{
|
||||
return GameRegistry.findItemStack(modId, item, 1);
|
||||
}
|
||||
|
||||
public static ItemStack getItemStack(String modId, String item, int stackSize)
|
||||
{
|
||||
return GameRegistry.findItemStack(modId, item, stackSize);
|
||||
|
||||
@@ -7,6 +7,9 @@ import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import magicbees.bees.BeeSpecies;
|
||||
import magicbees.main.Config;
|
||||
import magicbees.main.utils.BlockInterface;
|
||||
import magicbees.main.utils.ItemInterface;
|
||||
import magicbees.main.utils.LogHelper;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -32,12 +35,31 @@ public class BloodMagicHelper {
|
||||
{
|
||||
if (isActive())
|
||||
{
|
||||
|
||||
getBlocks();
|
||||
getItems();
|
||||
}
|
||||
}
|
||||
|
||||
public static void postInit(){}
|
||||
|
||||
public static void getBlocks()
|
||||
{
|
||||
Config.bmBloodStoneBrick = BlockInterface.getBlock(Name, "bloodStoneBrick");
|
||||
}
|
||||
|
||||
public static void getItems()
|
||||
{
|
||||
Config.bmIncendium = ItemInterface.getItemStack(Name, "incendium");
|
||||
Config.bmMagicales = ItemInterface.getItemStack(Name, "magicales");
|
||||
Config.bmSanctus = ItemInterface.getItemStack(Name, "sanctus");
|
||||
Config.bmAether = ItemInterface.getItemStack(Name, "aether");
|
||||
Config.bmCrepitous = ItemInterface.getItemStack(Name, "crepitous");
|
||||
Config.bmCrystallos = ItemInterface.getItemStack(Name, "crystallos");
|
||||
Config.bmTerrae = ItemInterface.getItemStack(Name, "terrae");
|
||||
Config.bmAquasalus = ItemInterface.getItemStack(Name, "aquasalus");
|
||||
Config.bmTennebrae = ItemInterface.getItemStack(Name, "tennebrae");
|
||||
}
|
||||
|
||||
public static void addAltarRecipe(ItemStack requiredItem, ItemStack result, int minTier, int liquidRequired, int consumptionRate, int drainRate, boolean canBeFilled)
|
||||
{
|
||||
AltarRecipeRegistry.registerAltarRecipe(result, requiredItem, minTier, liquidRequired, consumptionRate, drainRate, canBeFilled);
|
||||
|
||||
Reference in new issue
Block a user