mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-12 16:27:34 +00:00
Backpack update.
This commit is contained in:
1 parent
41bc9d10f8
commit
b49fbd7ccc
13 files changed
+266
-82
No files matched your search
@@ -1,3 +1,3 @@
|
||||
#Build Number for ANT. Do not edit!
|
||||
#Tue Jan 01 04:06:47 PST 2013
|
||||
build.number=51
|
||||
#Sun Jan 06 16:13:04 PST 2013
|
||||
build.number=57
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<property name="mc.version" value="1.4.7"/>
|
||||
<property name="forge.version" value="6.6.0.491"/>
|
||||
<property name="thaumicbees.version" value="1.0.0"/>
|
||||
<property name="thaumicbees.version" value="1.0.701"/>
|
||||
|
||||
<!-- for local deployment only, not used by main -->
|
||||
<property name="deploy.type" value="previews" />
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
storage.backpack.Thaumaturge=Thaumaturge's Backpack
|
||||
@@ -10,13 +10,13 @@ import forestry.api.genetics.IPollinatable;
|
||||
|
||||
public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||
{
|
||||
private ItemStack[] flowers = {new ItemStack(BlockManager.ThaumcraftPlant, 1, 2), new ItemStack(BlockManager.ThaumcraftPlant, 1, 3) };
|
||||
private ItemStack[] flowers = {new ItemStack(BlockManager.tcPlant, 1, 2), new ItemStack(BlockManager.tcPlant, 1, 3) };
|
||||
|
||||
@Override
|
||||
public boolean isAcceptedFlower(World world, IBeeGenome genome, int x, int y, int z)
|
||||
{
|
||||
boolean flag = false;
|
||||
if (world.getBlockId(x, y, z) == BlockManager.ThaumcraftPlant.blockID)
|
||||
if (world.getBlockId(x, y, z) == BlockManager.tcPlant.blockID)
|
||||
{
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (meta == 2 || meta == 3)
|
||||
@@ -35,7 +35,7 @@ public class FlowerProviderThaumcraftFlower implements IFlowerProvider
|
||||
if (world.isAirBlock(x, y, z) && (blockDown == Block.dirt.blockID || blockDown == Block.grass.blockID))
|
||||
{
|
||||
int rand = world.rand.nextInt(10);
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, BlockManager.ThaumcraftPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||
world.setBlockAndMetadataWithNotify(x, y, z, BlockManager.tcPlant.blockID, (rand >= 5) ? 2 : 3);
|
||||
System.out.println(x + ", " + y + ", " + ", " + z + " set to flower.");
|
||||
flag = true;
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ import thaumicbees.item.ItemManager;
|
||||
import thaumicbees.item.ItemComb.CombType;
|
||||
import thaumicbees.item.ItemDrop.DropType;
|
||||
import thaumicbees.item.ItemMiscResources.ResourceType;
|
||||
import thaumicbees.main.ThaumcraftCompat;
|
||||
import thaumicbees.main.ThaumcraftCompat.TCMiscResource;
|
||||
import thaumicbees.main.ThaumicBees;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
@@ -61,7 +63,6 @@ public class ThaumicBeesPlugin implements IPlugin
|
||||
catch (Exception e)
|
||||
{
|
||||
// Could not get Forestry config value.
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,7 +163,7 @@ public class ThaumicBeesPlugin implements IPlugin
|
||||
0x6E0000, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||
false, hideSpecies, true, false);
|
||||
Allele.Scholarly.addProduct(ItemManager.combs.getStackForType(CombType.PAPERY), 25);
|
||||
Allele.Scholarly.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT), 2);
|
||||
Allele.Scholarly.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 2);
|
||||
Allele.Scholarly.setGenome(BeeGenomeManager.getTemplateScholarly());
|
||||
learned.addMemberSpecies(Allele.Scholarly);
|
||||
breedingMgr.registerBeeTemplate(Allele.Scholarly.getGenome());
|
||||
@@ -172,7 +173,7 @@ public class ThaumicBeesPlugin implements IPlugin
|
||||
0x6E1C6D, defaultBodyColour, EnumTemperature.NORMAL, EnumHumidity.ARID,
|
||||
true, hideSpecies, true, false);
|
||||
Allele.Savant.addProduct(ItemManager.combs.getStackForType(CombType.PAPERY), 40);
|
||||
Allele.Savant.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT), 5);
|
||||
Allele.Savant.addSpecialty(ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT), 5);
|
||||
Allele.Savant.setGenome(BeeGenomeManager.getTemplateSavant());
|
||||
learned.addMemberSpecies(Allele.Savant);
|
||||
breedingMgr.registerBeeTemplate(Allele.Savant.getGenome());
|
||||
@@ -196,7 +197,7 @@ public class ThaumicBeesPlugin implements IPlugin
|
||||
0xD9D636, 0xA19E10, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Air.addProduct(ItemManager.combs.getStackForType(CombType.AIRY), 20);
|
||||
Allele.Air.addSpecialty(ItemManager.quicksilver, 10);
|
||||
Allele.Air.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.QUICKSILVER.ordinal()), 10);
|
||||
Allele.Air.setGenome(BeeGenomeManager.getTemplateAir());
|
||||
breedingMgr.registerBeeTemplate(Allele.Air.getGenome());
|
||||
|
||||
@@ -223,7 +224,7 @@ public class ThaumicBeesPlugin implements IPlugin
|
||||
0x005100, 0x00a000, EnumTemperature.NORMAL, EnumHumidity.NORMAL,
|
||||
true, hideSpecies, true, true);
|
||||
Allele.Earth.addProduct(ItemManager.combs.getStackForType(CombType.EARTHY), 30);
|
||||
Allele.Earth.addSpecialty(ItemManager.amber, 10);
|
||||
Allele.Earth.addSpecialty(new ItemStack(ItemManager.tcMiscResource, 1, TCMiscResource.AMBER.ordinal()), 10);
|
||||
Allele.Earth.setGenome(BeeGenomeManager.getTemplateEarth());
|
||||
breedingMgr.registerBeeTemplate(Allele.Earth.getGenome());
|
||||
}
|
||||
|
||||
@@ -6,8 +6,14 @@ import net.minecraftforge.common.Configuration;
|
||||
|
||||
public class BlockManager
|
||||
{
|
||||
|
||||
public static Block ThaumcraftPlant;
|
||||
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;
|
||||
|
||||
public BlockManager() { }
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class ItemComb extends Item
|
||||
public int getIconIndex(ItemStack stack, int pass)
|
||||
{
|
||||
// 107, 108 are the base forestry honeycomb textures.
|
||||
return 107 + pass;
|
||||
return (pass >= 1) ? 108 : 107;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
package thaumicbees.item;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import thaumicbees.item.ItemComb.CombType;
|
||||
import thaumicbees.item.ItemDrop.DropType;
|
||||
import thaumicbees.item.ItemMiscResources.ResourceType;
|
||||
import thaumicbees.item.ItemPropolis.PropolisType;
|
||||
import thaumicbees.item.ItemWax.WaxType;
|
||||
import thaumicbees.main.ThaumcraftCompat;
|
||||
import thaumicbees.storage.BackpackDefinition;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -16,6 +19,8 @@ import forestry.api.apiculture.BeeManager;
|
||||
import forestry.api.core.BlockInterface;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.recipes.*;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
import forestry.api.storage.EnumBackpackType;
|
||||
|
||||
public class ItemManager
|
||||
{
|
||||
@@ -39,16 +44,18 @@ public class ItemManager
|
||||
public static ItemCapsule magicCapsuleIce;
|
||||
|
||||
//----- Thaumcraft Items -------------------
|
||||
public static ItemStack quicksilver;
|
||||
public static ItemStack amber;
|
||||
public static ItemStack fragment;
|
||||
public static ItemStack airShard;
|
||||
public static ItemStack fireShard;
|
||||
public static ItemStack waterShard;
|
||||
public static ItemStack earthShard;
|
||||
public static ItemStack magicShard;
|
||||
public static ItemStack dullShard;
|
||||
public static ItemStack essentiaBottle;
|
||||
public static Item tcFilledJar;
|
||||
public static Item tcMiscResource;
|
||||
public static Item tcEssentiaBottle;
|
||||
public static Item tcShard;
|
||||
public static Item tcGolem;
|
||||
public static Item tcWispEssence;
|
||||
|
||||
//----- Backpacks --------------------------
|
||||
public static Item thaumaturgeBackpackT1;
|
||||
public static Item thaumaturgeBackpackT2;
|
||||
|
||||
public static BackpackDefinition thaumaturgeBackpackDef;
|
||||
|
||||
public ItemManager() { }
|
||||
|
||||
@@ -62,11 +69,20 @@ public class ItemManager
|
||||
ItemManager.propolis = new ItemPropolis(configFile.getItem("propolis", itemIDBase++).getInt());
|
||||
ItemManager.drops = new ItemDrop(configFile.getItem("drop", itemIDBase++).getInt());
|
||||
ItemManager.miscResources = new ItemMiscResources(configFile.getItem("miscResources", itemIDBase++).getInt());
|
||||
|
||||
BackpackDefinition def = new BackpackDefinition("thaumaturge", "Thaumaturge's Backpack", 0x8700C6);
|
||||
ItemManager.thaumaturgeBackpackT1 =
|
||||
BackpackManager.backpackInterface.addBackpack(configFile.getItem("thaumaturgePack1", itemIDBase++).getInt(),
|
||||
def, EnumBackpackType.T1);
|
||||
ItemManager.thaumaturgeBackpackT2 =
|
||||
BackpackManager.backpackInterface.addBackpack(configFile.getItem("thaumaturgePack2", itemIDBase++).getInt(),
|
||||
def, EnumBackpackType.T2);
|
||||
}
|
||||
|
||||
public static void setupCrafting()
|
||||
{
|
||||
ItemStack output = ItemManager.essentiaBottle.copy();
|
||||
ItemStack inputStack; // Variable to hold forestry items
|
||||
ItemStack output = new ItemStack(tcEssentiaBottle);
|
||||
output.stackSize = 8;
|
||||
GameRegistry.addRecipe(output, new Object[]
|
||||
{
|
||||
@@ -75,7 +91,7 @@ public class ItemManager
|
||||
'C', Item.clay,
|
||||
'P', Block.thinGlass
|
||||
});
|
||||
output = ItemManager.essentiaBottle.copy();
|
||||
output = new ItemStack(tcEssentiaBottle);
|
||||
output.stackSize = 4;
|
||||
GameRegistry.addRecipe(output, new Object[]
|
||||
{
|
||||
@@ -83,15 +99,24 @@ public class ItemManager
|
||||
'W', ItemManager.wax
|
||||
});
|
||||
|
||||
output = ItemManager.fragment.copy();
|
||||
output = new ItemStack(tcMiscResource, 1, ThaumcraftCompat.TCMiscResource.KNOWLEDGE_FRAGMENT.ordinal());
|
||||
GameRegistry.addShapelessRecipe(output, new Object[]
|
||||
{
|
||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT),
|
||||
ItemManager.miscResources.getStackForType(ResourceType.KNOWLEDGE_FRAGMENT)
|
||||
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT),
|
||||
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT),
|
||||
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT),
|
||||
ItemManager.miscResources.getStackForType(ResourceType.LORE_FRAGMENT)
|
||||
});
|
||||
|
||||
// T1 Thaumaturge's backpack
|
||||
GameRegistry.addRecipe(new ItemStack(ItemManager.thaumaturgeBackpackT1), new Object[] {
|
||||
"SWS", "NCN", "SWS",
|
||||
'S', Item.silk,
|
||||
'W', Block.cloth,
|
||||
'N', Item.goldNugget,
|
||||
'C', Block.chest
|
||||
});
|
||||
|
||||
// 20 is the 'average' time to centrifuge a comb.
|
||||
RecipeManagers.centrifugeManager.addRecipe(20, ItemManager.combs.getStackForType(CombType.OCCULT),
|
||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemInterface.getItem("honeyDrop") },
|
||||
@@ -118,28 +143,39 @@ public class ItemManager
|
||||
new ItemStack[] {ItemManager.wax.getStackForType(WaxType.MAGIC), ItemManager.propolis.getStackForType(PropolisType.EARTH) },
|
||||
new int[] { 100, 65 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.STARK),
|
||||
new ItemStack[] {ItemManager.dullShard},
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.DULL.ordinal())},
|
||||
new int[] { 20 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.AIR),
|
||||
new ItemStack[] {ItemManager.airShard},
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.AIR.ordinal())},
|
||||
new int[] { 18 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.FIRE),
|
||||
new ItemStack[] {ItemManager.fireShard},
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.FIRE.ordinal())},
|
||||
new int[] { 18 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.WATER),
|
||||
new ItemStack[] {ItemManager.waterShard},
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.WATER.ordinal())},
|
||||
new int[] { 18 });
|
||||
RecipeManagers.centrifugeManager.addRecipe(25, ItemManager.propolis.getStackForType(PropolisType.EARTH),
|
||||
new ItemStack[] {ItemManager.earthShard},
|
||||
new ItemStack[] {new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.EARTH.ordinal())},
|
||||
new int[] { 18 });
|
||||
|
||||
// Squeezer recipes
|
||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.FIRE) },
|
||||
new LiquidStack(Block.lavaStill, 250), ItemManager.fireShard, 15);
|
||||
new LiquidStack(Block.lavaStill, 250),
|
||||
new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.FIRE.ordinal()), 15);
|
||||
RecipeManagers.squeezerManager.addRecipe(20, new ItemStack[] {ItemManager.propolis.getStackForType(PropolisType.WATER) },
|
||||
new LiquidStack(Block.waterStill, 1000), ItemManager.waterShard, 25);
|
||||
new LiquidStack(Block.waterStill, 500),
|
||||
new ItemStack(tcShard, 1, ThaumcraftCompat.TCShardType.WATER.ordinal()), 25);
|
||||
|
||||
// Carpenter recipes
|
||||
inputStack = ItemInterface.getItem("craftingMaterial");
|
||||
inputStack.setItemDamage(3); // Set to Silk Mesh
|
||||
output = new ItemStack(thaumaturgeBackpackT2);
|
||||
RecipeManagers.carpenterManager.addRecipe(200, new LiquidStack(Block.waterStill.blockID, 1000), null, output, new Object[] {
|
||||
"WXW", "WTW", "WWW",
|
||||
'X', Item.diamond,
|
||||
'W', inputStack,
|
||||
'T', new ItemStack(ItemManager.thaumaturgeBackpackT1) });
|
||||
|
||||
output = BlockInterface.getBlock("candle");
|
||||
output.stackSize = 24;
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||
@@ -148,7 +184,7 @@ public class ItemManager
|
||||
'S', Item.silk });
|
||||
output = BlockInterface.getBlock("candle");
|
||||
output.stackSize = 6;
|
||||
ItemStack inputStack = ItemInterface.getItem("craftingMaterial");
|
||||
inputStack = ItemInterface.getItem("craftingMaterial");
|
||||
inputStack.setItemDamage(2); // Set to Silk Wisp
|
||||
RecipeManagers.carpenterManager.addRecipe(30, new LiquidStack(Block.waterStill, 600), null, output, new Object[] {
|
||||
"WSW",
|
||||
|
||||
@@ -15,7 +15,7 @@ public class ItemMiscResources extends Item
|
||||
{
|
||||
public enum ResourceType
|
||||
{
|
||||
KNOWLEDGE_FRAGMENT("Lore Fragment", 2),
|
||||
LORE_FRAGMENT("Lore Fragment", 2),
|
||||
AROMATIC_LUMP("Aromatic Lump", 3),
|
||||
;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package thaumicbees.main;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import thaumcraft.api.EnumTag;
|
||||
import thaumcraft.api.ObjectTags;
|
||||
@@ -9,10 +10,14 @@ import thaumicbees.block.BlockManager;
|
||||
import thaumicbees.item.ItemComb;
|
||||
import thaumicbees.item.ItemManager;
|
||||
import thaumicbees.item.ItemMiscResources;
|
||||
import thaumicbees.item.ItemComb.CombType;
|
||||
import thaumicbees.item.ItemWax.WaxType;
|
||||
import thaumicbees.storage.BackpackDefinition;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import forestry.api.core.ItemInterface;
|
||||
import forestry.api.storage.BackpackManager;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
@@ -23,23 +28,19 @@ import net.minecraftforge.common.Configuration;
|
||||
|
||||
public class ThaumcraftCompat
|
||||
{
|
||||
private static final int blockMetaSilverleaf = 2;
|
||||
private static final int blockMetaCinderpearl = 3;
|
||||
|
||||
private static int itemResourceID;
|
||||
private static final int itemResourceQuicksilverMeta = 3;
|
||||
private static final int itemResourceAmberMeta = 6;
|
||||
private static final int itemResourceFragmentMeta = 9;
|
||||
|
||||
private static int itemShardID;
|
||||
private static final int itemShardAirMeta = 0;
|
||||
private static final int itemShardFireMeta = 1;
|
||||
private static final int itemShardWaterMeta = 2;
|
||||
private static final int itemShardEarthMeta = 3;
|
||||
private static final int itemShardMagicMeta = 4;
|
||||
private static final int itemShardDullMeta = 5;
|
||||
|
||||
private static int itemEssentiaBottle;
|
||||
public enum TCBlockPlant
|
||||
{
|
||||
GREATWOOD_SAPLING, SILVERWOOD_SAPLING, SILVERLEAF, CINDERPEARL;
|
||||
}
|
||||
public enum TCMiscResource
|
||||
{
|
||||
ALUMENTUM, NITOR, THAUMIUM, QUICKSILVER, MAGIC_TALLOW,
|
||||
ZOMBIE_BRAIN, AMBER, ENCHANTED_FABRIC, FLUX_FILTER, KNOWLEDGE_FRAGMENT;
|
||||
}
|
||||
public enum TCShardType
|
||||
{
|
||||
AIR, FIRE, WATER, EARTH, MAGIC, DULL;
|
||||
}
|
||||
|
||||
public static void init(String configPath)
|
||||
{
|
||||
@@ -49,35 +50,78 @@ public class ThaumcraftCompat
|
||||
tcConfig.load();
|
||||
|
||||
// Load blocks out of the Thaumcraft config to get their IDs;
|
||||
p = tcConfig.getBlock("BlockCustomPlant", 2403);
|
||||
BlockManager.ThaumcraftPlant = Block.blocksList[p.getInt()];
|
||||
|
||||
if (BlockManager.ThaumcraftPlant == null)
|
||||
{
|
||||
|
||||
}
|
||||
p = tcConfig.getBlock("BlockCustomPlant", 0);
|
||||
BlockManager.tcPlant = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockCandle", 0);
|
||||
BlockManager.tcCandle = Block.blocksList[ p.getInt()];
|
||||
p = tcConfig.getBlock("BlockCrystal", 0);
|
||||
BlockManager.tcCrystal = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockMarker", 0);
|
||||
BlockManager.tcMarker = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockJar", 0);
|
||||
BlockManager.tcJar = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockMagicalLeaves", 0);
|
||||
BlockManager.tcLeaf = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockMagicalLog", 0);
|
||||
BlockManager.tcLog = Block.blocksList[p.getInt()];
|
||||
p = tcConfig.getBlock("BlockSecure", 0);
|
||||
BlockManager.tcWarded = Block.blocksList[p.getInt()];
|
||||
|
||||
// Load items out of the Thaumcraft config to get their IDs.
|
||||
p = tcConfig.getItem("ItemEssence", 25005);
|
||||
itemEssentiaBottle = p.getInt() + 256;
|
||||
ItemManager.essentiaBottle = new ItemStack(itemEssentiaBottle, 1, 0);
|
||||
p = tcConfig.getItem("ItemResource", 25007);
|
||||
itemResourceID = p.getInt() + 256;
|
||||
ItemManager.quicksilver = new ItemStack(itemResourceID, 1, itemResourceQuicksilverMeta);
|
||||
ItemManager.amber = new ItemStack(itemResourceID, 1, itemResourceAmberMeta);
|
||||
ItemManager.fragment = new ItemStack(itemResourceID, 1, itemResourceFragmentMeta);
|
||||
p = tcConfig.getItem("ItemShard", 25008);
|
||||
itemShardID = p.getInt() + 256;
|
||||
ItemManager.airShard = new ItemStack(itemShardID, 1, itemShardAirMeta);
|
||||
ItemManager.fireShard = new ItemStack(itemShardID, 1, itemShardFireMeta);
|
||||
ItemManager.waterShard = new ItemStack(itemShardID, 1, itemShardWaterMeta);
|
||||
ItemManager.earthShard = new ItemStack(itemShardID, 1, itemShardEarthMeta);
|
||||
ItemManager.magicShard = new ItemStack(itemShardID, 1, itemShardMagicMeta);
|
||||
ItemManager.dullShard = new ItemStack(itemShardID, 1, itemShardDullMeta);
|
||||
p = tcConfig.getItem("ItemEssence", 0);
|
||||
ItemManager.tcEssentiaBottle = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("ItemResource", 0);
|
||||
ItemManager.tcMiscResource = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("ItemShard", 0);
|
||||
ItemManager.tcShard = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("BlockJarFilledItem", 0);
|
||||
ItemManager.tcFilledJar = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("ItemGolemPlacer", 0);
|
||||
ItemManager.tcGolem = Item.itemsList[p.getInt() + 256];
|
||||
p = tcConfig.getItem("ItemEssence", 0);
|
||||
ItemManager.tcWispEssence = Item.itemsList[p.getInt() + 256];
|
||||
|
||||
// Registers TC items with Forestry's backpacks.
|
||||
setupBackpacks();
|
||||
}
|
||||
|
||||
public static void setupBackpacks()
|
||||
{
|
||||
// Add all shards and Thaumium to miner's backpack
|
||||
String ids = ItemManager.tcShard.itemID + ":" + -1 + ";"
|
||||
+ ItemManager.tcMiscResource.itemID + ":" + TCMiscResource.THAUMIUM.ordinal();
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "miner@" + ids);
|
||||
|
||||
// All resources go into Thaumaturge's backpack
|
||||
ids = ItemManager.tcMiscResource.itemID + ":" + -1 + ";"
|
||||
+ ItemManager.tcShard.itemID + ":" + -1 + ";"
|
||||
+ ItemManager.tcFilledJar.itemID + ":" + -1 + ";"
|
||||
+ BlockManager.tcCrystal.blockID + ":" + -1 + ";"
|
||||
+ BlockManager.tcJar.blockID + ":" + -1 + ";"
|
||||
+ ItemManager.tcGolem.itemID + ":" + -1;
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "thaumaturge@" + ids);
|
||||
|
||||
// Add some plants & saplings to Forester's
|
||||
ids = BlockManager.tcPlant.blockID + ":" + "-1" + ";"
|
||||
+ BlockManager.tcLeaf.blockID + ":" + -1 + ";"
|
||||
+ BlockManager.tcLog.blockID + ":" + "-1";
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "forester@" + ids);
|
||||
|
||||
// Add Wisp & brains to Hunter's
|
||||
ids = ItemManager.tcWispEssence.itemID + ":" + -1 + ";"
|
||||
+ ItemManager.tcMiscResource.itemID + ":" + TCMiscResource.ZOMBIE_BRAIN.ordinal();
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "hunter@" + ids);
|
||||
|
||||
// Add Marker, warded stone, candle to builder
|
||||
ids = BlockManager.tcCandle.blockID + ":" + -1 + ";"
|
||||
+ BlockManager.tcMarker.blockID + ":" + -1 + ";"
|
||||
+ BlockManager.tcWarded.blockID + ":" + -1;
|
||||
FMLInterModComms.sendMessage("Forestry", "add-backpack-items", "builder@" + ids);
|
||||
}
|
||||
|
||||
public static void setupResearch()
|
||||
{
|
||||
// TODO: Get the path correct.
|
||||
//ThaumcraftApi.registerResearchXML(CommonProxy.TCBEES_RESEARCH + "/research.xml");
|
||||
}
|
||||
|
||||
@@ -89,7 +133,7 @@ public class ThaumcraftCompat
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.wax.itemID, WaxType.MAGIC.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.KNOWLEDGE, 3);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.miscResources.itemID, ItemMiscResources.ResourceType.KNOWLEDGE_FRAGMENT.ordinal(), tags);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.miscResources.itemID, ItemMiscResources.ResourceType.LORE_FRAGMENT.ordinal(), tags);
|
||||
|
||||
tags = new ObjectTags().add(EnumTag.MAGIC, 1).add(EnumTag.INSECT, 2);
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, ItemComb.CombType.STARK.ordinal(), tags);
|
||||
@@ -144,6 +188,13 @@ public class ThaumcraftCompat
|
||||
itemStack = ItemInterface.getItem("beeComb");
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, -1, tags); // ALL combs plox.
|
||||
ThaumcraftApi.registerObjectTag(ItemManager.combs.itemID, -1, tags);
|
||||
|
||||
itemStack = ItemManager.combs.getStackForType(CombType.OCCULT);
|
||||
tags = new ObjectTags().add(EnumTag.INSECT, 2).add(EnumTag.TRAP, 2).add(EnumTag.MAGIC, 2);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
itemStack = ItemManager.combs.getStackForType(CombType.STARK);
|
||||
ThaumcraftApi.registerObjectTag(itemStack.itemID, itemStack.getItemDamage(), tags);
|
||||
|
||||
// BEES!
|
||||
itemStack = ItemInterface.getItem("beeDroneGE");
|
||||
|
||||
@@ -3,6 +3,7 @@ package thaumicbees.main;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.SidedProxy;
|
||||
import cpw.mods.fml.common.event.*;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import forestry.api.apiculture.EnumBeeType;
|
||||
import forestry.api.core.ItemInterface;
|
||||
|
||||
|
||||
@@ -9,6 +9,6 @@ public class VersionInfo
|
||||
|
||||
public static final String Logo = "/gfx/thaumicbees/logo.png";
|
||||
|
||||
public static final String Depends = "required-after:Forestry@[1.7.0.0,);required-after:Thaumcraft@[3.0.1c,)";
|
||||
public static final String Depends = "required-after:Forestry@[1.7.0.1,);required-after:Thaumcraft@[3.0.1c,)";
|
||||
|
||||
}
|
||||
@@ -0,0 +1,88 @@
|
||||
package thaumicbees.storage;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import forestry.api.storage.IBackpackDefinition;
|
||||
|
||||
/**
|
||||
* Backpack definition for Forestry.
|
||||
* @author MysteriousAges
|
||||
*
|
||||
*/
|
||||
public class BackpackDefinition implements IBackpackDefinition
|
||||
{
|
||||
private ArrayList<ItemStack> items;
|
||||
private String key;
|
||||
private String name;
|
||||
private int colour;
|
||||
|
||||
public BackpackDefinition(String backpackKey, String backpackName, int backpackColour)
|
||||
{
|
||||
items = new ArrayList<ItemStack>();
|
||||
this.name = backpackName;
|
||||
this.key = backpackKey;
|
||||
this.colour = backpackColour;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getKey()
|
||||
{
|
||||
return this.key;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName()
|
||||
{
|
||||
return this.name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getPrimaryColour()
|
||||
{
|
||||
return this.colour;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSecondaryColour()
|
||||
{
|
||||
return 0xFFFFFF;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addValidItem(ItemStack validItem)
|
||||
{
|
||||
if (!this.items.contains(validItem))
|
||||
{
|
||||
this.items.add(validItem);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<ItemStack> getValidItems(EntityPlayer player)
|
||||
{
|
||||
return this.items;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isValidItem(EntityPlayer player, ItemStack itemStack)
|
||||
{
|
||||
boolean flag = false;
|
||||
|
||||
ItemStack stack;
|
||||
for (int i = 0; i < this.items.size() && !flag; i++)
|
||||
{
|
||||
stack = this.items.get(i);
|
||||
// If comparison stack has meta of -1
|
||||
if (stack.itemID == itemStack.itemID)
|
||||
{
|
||||
flag = stack.getItemDamage() == -1 || stack.getItemDamage() == itemStack.getItemDamage();
|
||||
}
|
||||
}
|
||||
|
||||
return flag;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user