Update, config does not work correctly.
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 498 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 500 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 480 B |
|
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 500 B |
5
loose redist/assets/forge/lang/en_US.lang
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
commands.forge.usage=Use /forge <subcommand>. Subcommands are tps, track
|
||||||
|
commands.forge.usage.tracking=Use /forge track <type> <duration>. Valid types are te (Tile Entities). Duration is < 60.
|
||||||
|
commands.forge.tps.summary=%s : Mean tick time: %d ms. Mean TPS: %d
|
||||||
|
|
||||||
|
commands.forge.tracking.te.enabled=Tile Entity tracking enabled for %d seconds.
|
||||||
5
loose redist/assets/forge/lang/es_ES.lang
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
commands.forge.usage=Usa /forge <subcomando>. Los subcomandos son tps, track
|
||||||
|
commands.forge.usage.tracking=Usa /forge track <tipo> <duración>. Los tipos válidos te (Tile Entities). La duración es < 60.
|
||||||
|
commands.forge.tps.summary=%s : Tiempo de tick medio: %d ms. TPS medio: %d
|
||||||
|
|
||||||
|
commands.forge.tracking.te.enabled=Rastreo de Tile Entity activado durante %d segundos.
|
||||||
5
loose redist/assets/forge/lang/fr_FR.lang
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
commands.forge.usage=Utilisez /forge <sous-commande>. Les sous-commandes sont tps, track
|
||||||
|
commands.forge.usage.tracking=Utilisez /forge track <type> <durée>. Les types valides sont te (Tile Entities). La durée doit être inférieur à 60.
|
||||||
|
commands.forge.tps.summary=%s : Duré de tick : %d ms. TPS moyen : %d
|
||||||
|
|
||||||
|
commands.forge.tracking.te.enabled=Trackage des Tile Entity activé pour %d secondes.
|
||||||
BIN
loose redist/common/Special_Mentions.class
Normal file
BIN
loose redist/items/base/BlessedSwordBase.class
Normal file
BIN
loose redist/items/ender/EnderSword.class
Normal file
BIN
loose redist/items/tainted/TaintedDiamondHoe.class
Normal file
@@ -3,10 +3,10 @@
|
|||||||
"modid": "divine_equipment",
|
"modid": "divine_equipment",
|
||||||
"name": "Divine Equipment",
|
"name": "Divine Equipment",
|
||||||
"description": "Divine Equipment adds Tools, Armour, Blocks, and Items that are of Blessed, Ender, and Tainted Variations.",
|
"description": "Divine Equipment adds Tools, Armour, Blocks, and Items that are of Blessed, Ender, and Tainted Variations.",
|
||||||
"version": "0.5",
|
"version": "0.3",
|
||||||
"mcversion": "1.6.4",
|
"mcversion": "1.6.4",
|
||||||
"logoFile": "",
|
"logoFile": "",
|
||||||
"url": "https://bitbucket.org/0rthus/divine-equipment",
|
"url": "https://bitbucket.org/zackyd/divine-equipment",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
"authors": ["Zackyd"],
|
"authors": ["Zackyd"],
|
||||||
"credits": "Made by Zackyd",
|
"credits": "Made by Zackyd",
|
||||||
|
|||||||
BIN
loose redist/thaumcraft/api/EnumTag.class
Normal file
BIN
loose redist/thaumcraft/api/IAspectSource.class
Normal file
BIN
loose redist/thaumcraft/api/IVisDiscounter.class
Normal file
BIN
loose redist/thaumcraft/api/IVisRepairable.class
Normal file
BIN
loose redist/thaumcraft/api/ItemApi.class
Normal file
BIN
loose redist/thaumcraft/api/ObjectTags.class
Normal file
BIN
loose redist/thaumcraft/api/ThaumcraftApi.class
Normal file
BIN
loose redist/thaumcraft/api/ThaumcraftApiHelper.class
Normal file
BIN
loose redist/thaumcraft/api/aspects/Aspect.class
Normal file
BIN
loose redist/thaumcraft/api/aura/AuraNode.class
Normal file
BIN
loose redist/thaumcraft/api/aura/EnumNodeType.class
Normal file
BIN
loose redist/thaumcraft/api/crafting/IArcaneRecipe.class
Normal file
BIN
loose redist/thaumcraft/api/crafting/IInfusionRecipe.class
Normal file
BIN
loose redist/thaumcraft/api/crafting/RecipeCrucible.class
Normal file
BIN
loose redist/thaumcraft/api/research/IScanEventHandler.class
Normal file
BIN
loose redist/thaumcraft/api/research/ResearchItem.class
Normal file
BIN
loose redist/thaumcraft/api/research/ResearchList.class
Normal file
BIN
loose redist/thaumcraft/api/research/ResearchPlayer.class
Normal file
BIN
loose redist/thaumcraft/api/research/ScanResult.class
Normal file
|
Before Width: | Height: | Size: 520 B After Width: | Height: | Size: 498 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 504 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 500 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 480 B |
|
Before Width: | Height: | Size: 490 B After Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 508 B After Width: | Height: | Size: 506 B |
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 491 B |
|
Before Width: | Height: | Size: 512 B After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 504 B After Width: | Height: | Size: 500 B |
@@ -87,6 +87,7 @@ public class Divine_Content {
|
|||||||
int BlessedIronHoeID = Divine_Equipment.BlessedIronHoeID;
|
int BlessedIronHoeID = Divine_Equipment.BlessedIronHoeID;
|
||||||
int BlessedStoneHoeID = Divine_Equipment.BlessedStoneHoeID;
|
int BlessedStoneHoeID = Divine_Equipment.BlessedStoneHoeID;
|
||||||
int BlessedWoodHoeID = Divine_Equipment.BlessedWoodHoeID;
|
int BlessedWoodHoeID = Divine_Equipment.BlessedWoodHoeID;
|
||||||
|
int EnderSwordID = Divine_Equipment.EnderSwordID;
|
||||||
|
|
||||||
|
|
||||||
//Blessed Blocks
|
//Blessed Blocks
|
||||||
@@ -181,22 +182,22 @@ public class Divine_Content {
|
|||||||
public static Item BlessedWoodHoe;
|
public static Item BlessedWoodHoe;
|
||||||
|
|
||||||
// Ender
|
// Ender
|
||||||
|
public static Item EnderSword;
|
||||||
// Hidden
|
// Hidden
|
||||||
|
|
||||||
// Init All Tainted materials
|
// Init All Tainted materials
|
||||||
EnumToolMaterial TaintedDiamond;
|
EnumToolMaterial TaintedDiamondTool;
|
||||||
EnumToolMaterial TaintedGold;
|
EnumToolMaterial TaintedGoldTool;
|
||||||
EnumToolMaterial TaintedIron;
|
EnumToolMaterial TaintedIronTool;
|
||||||
EnumToolMaterial TaintedStone;
|
EnumToolMaterial TaintedStoneTool;
|
||||||
EnumToolMaterial TaintedWood;
|
EnumToolMaterial TaintedWoodTool;
|
||||||
|
|
||||||
// Init All Blessed materials
|
// Init All Blessed materials
|
||||||
EnumToolMaterial BlessedDiamond;
|
EnumToolMaterial BlessedDiamondTool;
|
||||||
EnumToolMaterial BlessedGold;
|
EnumToolMaterial BlessedGoldTool;
|
||||||
EnumToolMaterial BlessedIron;
|
EnumToolMaterial BlessedIronTool;
|
||||||
EnumToolMaterial BlessedStone;
|
EnumToolMaterial BlessedStoneTool;
|
||||||
EnumToolMaterial BlessedWood;
|
EnumToolMaterial BlessedWoodTool;
|
||||||
|
|
||||||
public Divine_Content()
|
public Divine_Content()
|
||||||
{
|
{
|
||||||
@@ -235,18 +236,21 @@ public class Divine_Content {
|
|||||||
EMERALD(3, 1561, 8.0F, 3, 10),
|
EMERALD(3, 1561, 8.0F, 3, 10),
|
||||||
GOLD(0, 32, 12.0F, 0, 22);
|
GOLD(0, 32, 12.0F, 0, 22);
|
||||||
*/
|
*/
|
||||||
TaintedDiamond = EnumHelper.addToolMaterial("Tainted Diamond", 3, 1003, 8.0F, 4, 15);
|
TaintedDiamondTool = EnumHelper.addToolMaterial("Tainted Diamond", 3, 1003, 8.0F, 4, 15);
|
||||||
TaintedGold = EnumHelper.addToolMaterial("Tainted Gold", 2, 20, 12.0F, 1, 27);
|
TaintedGoldTool = EnumHelper.addToolMaterial("Tainted Gold", 2, 20, 12.0F, 1, 27);
|
||||||
TaintedIron = EnumHelper.addToolMaterial("Tainted Iron", 2, 58, 8.0F, 3, 19);
|
TaintedIronTool = EnumHelper.addToolMaterial("Tainted Iron", 2, 58, 8.0F, 3, 19);
|
||||||
TaintedStone = EnumHelper.addToolMaterial("Tainted Stone", 1, 88, 4.0F, 2, 10 );
|
TaintedStoneTool = EnumHelper.addToolMaterial("Tainted Stone", 1, 88, 4.0F, 2, 10 );
|
||||||
TaintedWood = EnumHelper.addToolMaterial("Tainted Wood", 0, 40, 2.0F, 1, 20);
|
TaintedWoodTool = EnumHelper.addToolMaterial("Tainted Wood", 0, 40, 2.0F, 1, 20);
|
||||||
|
|
||||||
// Blessed tool Material Properties (Subject to Change)
|
// Blessed tool Material Properties (Subject to Change)
|
||||||
BlessedDiamond = EnumHelper.addToolMaterial("Blessed Diamond", 3, 2850, 10.0F, 3, 22);
|
BlessedDiamondTool = EnumHelper.addToolMaterial("Blessed Diamond", 3, 2850, 10.0F, 3, 22);
|
||||||
BlessedGold = EnumHelper.addToolMaterial("Blessed Gold", 2, 32, 14.00F, 0, 22);
|
BlessedGoldTool = EnumHelper.addToolMaterial("Blessed Gold", 2, 32, 14.00F, 0, 22);
|
||||||
BlessedIron = EnumHelper.addToolMaterial("Blessed Iron", 2, 250, 8.0F, 2, 14);
|
BlessedIronTool = EnumHelper.addToolMaterial("Blessed Iron", 2, 250, 8.0F, 2, 14);
|
||||||
BlessedStone = EnumHelper.addToolMaterial("Blessed Stone", 1, 131, 6.0F, 1, 5);
|
BlessedStoneTool = EnumHelper.addToolMaterial("Blessed Stone", 1, 131, 6.0F, 1, 5);
|
||||||
BlessedWood = EnumHelper.addToolMaterial("Blessed Wood", 0, 59, 4.0F, 0, 15);
|
BlessedWoodTool = EnumHelper.addToolMaterial("Blessed Wood", 0, 59, 4.0F, 0, 15);
|
||||||
|
|
||||||
|
// Ender Materials
|
||||||
|
|
||||||
|
|
||||||
//Telling forge that we are creating stuff
|
//Telling forge that we are creating stuff
|
||||||
// Sigils
|
// Sigils
|
||||||
@@ -272,118 +276,118 @@ public class Divine_Content {
|
|||||||
GameRegistry.addRecipe(new ItemStack(HiddenSigil), "beb", "ene", "tet", 'b', BlessedSigil, 'n', Item.netherStar, 'e', EnderSigil, 't', TaintedSigil );
|
GameRegistry.addRecipe(new ItemStack(HiddenSigil), "beb", "ene", "tet", 'b', BlessedSigil, 'n', Item.netherStar, 'e', EnderSigil, 't', TaintedSigil );
|
||||||
// Tainted Items
|
// Tainted Items
|
||||||
// Tainted Swords
|
// Tainted Swords
|
||||||
TaintedDiamondSword = new items.tainted.TaintedDiamondSword(TaintedDiamondSwordID, TaintedDiamond).setUnlocalizedName("Tainted_Sword_Diamond").setTextureName("divine_equipment:Tainted_Sword_Diamond");
|
TaintedDiamondSword = new items.tainted.TaintedDiamondSword(TaintedDiamondSwordID, TaintedDiamondTool).setUnlocalizedName("Tainted_Sword_Diamond").setTextureName("divine_equipment:Tainted_Sword_Diamond");
|
||||||
LanguageRegistry.addName(TaintedDiamondSword, "Tainted Diamond Sword");
|
LanguageRegistry.addName(TaintedDiamondSword, "Tainted Diamond Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedDiamondSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedDiamondSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
TaintedGoldSword = new items.tainted.TaintedGoldSword(TaintedGoldSwordID, TaintedGold).setUnlocalizedName("Tainted_Sword_Gold").setTextureName("divine_equipment:Tainted_Sword_Gold");
|
TaintedGoldSword = new items.tainted.TaintedGoldSword(TaintedGoldSwordID, TaintedGoldTool).setUnlocalizedName("Tainted_Sword_Gold").setTextureName("divine_equipment:Tainted_Sword_Gold");
|
||||||
LanguageRegistry.addName(TaintedGoldSword, "Tainted Gold Sword");
|
LanguageRegistry.addName(TaintedGoldSword, "Tainted Gold Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedGoldSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedGoldSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
TaintedIronSword = new TaintedIronSword(TaintedIronSwordID, TaintedIron).setUnlocalizedName("Tainted_Sword_Iron").setTextureName("divine_equipment:Tainted_Sword_Iron");
|
TaintedIronSword = new TaintedIronSword(TaintedIronSwordID, TaintedIronTool).setUnlocalizedName("Tainted_Sword_Iron").setTextureName("divine_equipment:Tainted_Sword_Iron");
|
||||||
LanguageRegistry.addName(TaintedIronSword, "Tainted Iron Sword");
|
LanguageRegistry.addName(TaintedIronSword, "Tainted Iron Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedIronSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedIronSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
|
|
||||||
TaintedStoneSword = new TaintedStoneSword(TaintedStoneSwordID, TaintedStone).setUnlocalizedName("Tainted_Sword_Stone").setTextureName("divine_equipment:Tainted_Sword_Stone");
|
TaintedStoneSword = new TaintedStoneSword(TaintedStoneSwordID, TaintedStoneTool).setUnlocalizedName("Tainted_Sword_Stone").setTextureName("divine_equipment:Tainted_Sword_Stone");
|
||||||
LanguageRegistry.addName(TaintedStoneSword, "Tainted Stone Sword");
|
LanguageRegistry.addName(TaintedStoneSword, "Tainted Stone Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedStoneSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedStoneSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
TaintedWoodSword = new TaintedWoodSword(TaintedWoodSwordID, TaintedWood).setUnlocalizedName("Tainted_Sword_Wood").setTextureName("divine_equipment:Tainted_Sword_Wood");
|
TaintedWoodSword = new TaintedWoodSword(TaintedWoodSwordID, TaintedWoodTool).setUnlocalizedName("Tainted_Sword_Wood").setTextureName("divine_equipment:Tainted_Sword_Wood");
|
||||||
LanguageRegistry.addName(TaintedWoodSword, "Tainted Wooden Sword");
|
LanguageRegistry.addName(TaintedWoodSword, "Tainted Wooden Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedWoodSword), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
// Pickaxes
|
// Pickaxes
|
||||||
|
|
||||||
TaintedDiamondPickaxe = new items.tainted.TaintedDiamondPickaxe(TaintedDiamondPickaxeID, TaintedDiamond).setUnlocalizedName("Tainted_Pickaxe_Diamond").setTextureName("divine_equipment:Tainted_Pickaxe_Diamond");
|
TaintedDiamondPickaxe = new items.tainted.TaintedDiamondPickaxe(TaintedDiamondPickaxeID, TaintedDiamondTool).setUnlocalizedName("Tainted_Pickaxe_Diamond").setTextureName("divine_equipment:Tainted_Pickaxe_Diamond");
|
||||||
LanguageRegistry.addName(TaintedDiamondPickaxe, "Tainted Diamond Pickaxe");
|
LanguageRegistry.addName(TaintedDiamondPickaxe, "Tainted Diamond Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedDiamondPickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedDiamondPickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
TaintedGoldPickaxe = new items.tainted.TaintedGoldPickaxe(TaintedGoldPickaxeID, TaintedGold).setUnlocalizedName("Tainted_Pickaxe_Gold").setTextureName("divine_equipment:Tainted_Pickaxe_Gold");
|
TaintedGoldPickaxe = new items.tainted.TaintedGoldPickaxe(TaintedGoldPickaxeID, TaintedGoldTool).setUnlocalizedName("Tainted_Pickaxe_Gold").setTextureName("divine_equipment:Tainted_Pickaxe_Gold");
|
||||||
LanguageRegistry.addName(TaintedGoldPickaxe, "Tainted Gold Pickaxe");
|
LanguageRegistry.addName(TaintedGoldPickaxe, "Tainted Gold Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedGoldPickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedGoldPickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
TaintedIronPickaxe = new items.tainted.TaintedIronPickaxe(TaintedIronPickaxeID, TaintedIron).setUnlocalizedName("Tainted_Pickaxe_Iron").setTextureName("divine_equipment:Tainted_Pickaxe_Iron");
|
TaintedIronPickaxe = new items.tainted.TaintedIronPickaxe(TaintedIronPickaxeID, TaintedIronTool).setUnlocalizedName("Tainted_Pickaxe_Iron").setTextureName("divine_equipment:Tainted_Pickaxe_Iron");
|
||||||
LanguageRegistry.addName(TaintedIronPickaxe, "Tainted Iron Pickaxe");
|
LanguageRegistry.addName(TaintedIronPickaxe, "Tainted Iron Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedIronPickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedIronPickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
|
|
||||||
TaintedStonePickaxe = new TaintedStonePickaxe(TaintedStonePickaxeID, TaintedStone).setUnlocalizedName("Tainted_Pickaxe_Stone").setTextureName("divine_equipment:Tainted_Pickaxe_Stone");
|
TaintedStonePickaxe = new TaintedStonePickaxe(TaintedStonePickaxeID, TaintedStoneTool).setUnlocalizedName("Tainted_Pickaxe_Stone").setTextureName("divine_equipment:Tainted_Pickaxe_Stone");
|
||||||
LanguageRegistry.addName(TaintedStonePickaxe, "Tainted Stone Pickaxe");
|
LanguageRegistry.addName(TaintedStonePickaxe, "Tainted Stone Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedStonePickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedStonePickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
TaintedWoodPickaxe = new TaintedWoodPickaxe(TaintedWoodPickaxeID, TaintedWood).setUnlocalizedName("Tainted_Pickaxe_Wood").setTextureName("divine_equipment:Tainted_Pickaxe_Wood");
|
TaintedWoodPickaxe = new TaintedWoodPickaxe(TaintedWoodPickaxeID, TaintedWoodTool).setUnlocalizedName("Tainted_Pickaxe_Wood").setTextureName("divine_equipment:Tainted_Pickaxe_Wood");
|
||||||
LanguageRegistry.addName(TaintedWoodPickaxe, "Tainted Wooden Pickaxe");
|
LanguageRegistry.addName(TaintedWoodPickaxe, "Tainted Wooden Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodPickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedWoodPickaxe), "mSm", " s ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
// Axes
|
// Axes
|
||||||
|
|
||||||
TaintedDiamondAxe = new items.tainted.TaintedDiamondAxe(TaintedDiamondAxeID, TaintedDiamond).setUnlocalizedName("Tainted_Axe_Diamond").setTextureName("divine_equipment:Tainted_Axe_Diamond");
|
TaintedDiamondAxe = new items.tainted.TaintedDiamondAxe(TaintedDiamondAxeID, TaintedDiamondTool).setUnlocalizedName("Tainted_Axe_Diamond").setTextureName("divine_equipment:Tainted_Axe_Diamond");
|
||||||
LanguageRegistry.addName(TaintedDiamondAxe, "Tainted Diamond Axe");
|
LanguageRegistry.addName(TaintedDiamondAxe, "Tainted Diamond Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedDiamondAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedDiamondAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedDiamondAxe), " Sm", " sm", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedDiamondAxe), " Sm", " sm", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
TaintedGoldAxe = new items.tainted.TaintedGoldAxe(TaintedGoldAxeID, TaintedGold).setUnlocalizedName("Tainted_Axe_Gold").setTextureName("divine_equipment:Tainted_Axe_Gold");
|
TaintedGoldAxe = new items.tainted.TaintedGoldAxe(TaintedGoldAxeID, TaintedGoldTool).setUnlocalizedName("Tainted_Axe_Gold").setTextureName("divine_equipment:Tainted_Axe_Gold");
|
||||||
LanguageRegistry.addName(TaintedGoldAxe, "Tainted Gold Axe");
|
LanguageRegistry.addName(TaintedGoldAxe, "Tainted Gold Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedGoldAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedGoldAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
TaintedIronAxe = new items.tainted.TaintedIronAxe(TaintedIronAxeID, TaintedIron).setUnlocalizedName("Tainted_Axe_Iron").setTextureName("divine_equipment:Tainted_Axe_Iron");
|
TaintedIronAxe = new items.tainted.TaintedIronAxe(TaintedIronAxeID, TaintedIronTool).setUnlocalizedName("Tainted_Axe_Iron").setTextureName("divine_equipment:Tainted_Axe_Iron");
|
||||||
LanguageRegistry.addName(TaintedIronAxe, "Tainted Iron Axe");
|
LanguageRegistry.addName(TaintedIronAxe, "Tainted Iron Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedIronAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedIronAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedGoldAxe), " Sm", " sm", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedGoldAxe), " Sm", " sm", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
TaintedStoneAxe = new TaintedStoneAxe(TaintedStoneAxeID, TaintedStone).setUnlocalizedName("Tainted_Axe_Stone").setTextureName("divine_equipment:Tainted_Axe_Stone");
|
TaintedStoneAxe = new TaintedStoneAxe(TaintedStoneAxeID, TaintedStoneTool).setUnlocalizedName("Tainted_Axe_Stone").setTextureName("divine_equipment:Tainted_Axe_Stone");
|
||||||
LanguageRegistry.addName(TaintedStoneAxe, "Tainted Stone Axe");
|
LanguageRegistry.addName(TaintedStoneAxe, "Tainted Stone Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedStoneAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedStoneAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedStoneAxe), " Sm", " sm", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedStoneAxe), " Sm", " sm", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
TaintedWoodAxe = new TaintedWoodAxe(TaintedWoodAxeID, TaintedWood).setUnlocalizedName("Tainted_Axe_Wood").setTextureName("divine_equipment:Tainted_Axe_Wood");
|
TaintedWoodAxe = new TaintedWoodAxe(TaintedWoodAxeID, TaintedWoodTool).setUnlocalizedName("Tainted_Axe_Wood").setTextureName("divine_equipment:Tainted_Axe_Wood");
|
||||||
LanguageRegistry.addName(TaintedWoodAxe, "Tainted Wooden Axe");
|
LanguageRegistry.addName(TaintedWoodAxe, "Tainted Wooden Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedWoodAxe), "mS ", "ms ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodAxe), " Sm", " sm", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedWoodAxe), " Sm", " sm", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
// Shovels
|
// Shovels
|
||||||
|
|
||||||
TaintedDiamondShovel = new items.tainted.TaintedDiamondShovel(TaintedDiamondShovelID, TaintedDiamond).setUnlocalizedName("Tainted_Shovel_Diamond").setTextureName("divine_equipment:Tainted_Shovel_Diamond");
|
TaintedDiamondShovel = new items.tainted.TaintedDiamondShovel(TaintedDiamondShovelID, TaintedDiamondTool).setUnlocalizedName("Tainted_Shovel_Diamond").setTextureName("divine_equipment:Tainted_Shovel_Diamond");
|
||||||
LanguageRegistry.addName(TaintedDiamondShovel, "Tainted Diamond Shovel");
|
LanguageRegistry.addName(TaintedDiamondShovel, "Tainted Diamond Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedDiamondShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedDiamondShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
TaintedGoldShovel = new items.tainted.TaintedGoldShovel(TaintedGoldShovelID, TaintedGold).setUnlocalizedName("Tainted_Shovel_Gold").setTextureName("divine_equipment:Tainted_Shovel_Gold");
|
TaintedGoldShovel = new items.tainted.TaintedGoldShovel(TaintedGoldShovelID, TaintedGoldTool).setUnlocalizedName("Tainted_Shovel_Gold").setTextureName("divine_equipment:Tainted_Shovel_Gold");
|
||||||
LanguageRegistry.addName(TaintedGoldShovel, "Tainted Gold Shovel");
|
LanguageRegistry.addName(TaintedGoldShovel, "Tainted Gold Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedGoldShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedGoldShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
TaintedIronShovel = new items.tainted.TaintedIronShovel(TaintedIronShovelID, TaintedIron).setUnlocalizedName("Tainted_Shovel_Iron").setTextureName("divine_equipment:Tainted_Shovel_Iron");
|
TaintedIronShovel = new items.tainted.TaintedIronShovel(TaintedIronShovelID, TaintedIronTool).setUnlocalizedName("Tainted_Shovel_Iron").setTextureName("divine_equipment:Tainted_Shovel_Iron");
|
||||||
LanguageRegistry.addName(TaintedIronShovel, "Tainted Iron Shovel");
|
LanguageRegistry.addName(TaintedIronShovel, "Tainted Iron Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedIronShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedIronShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
|
|
||||||
TaintedStoneShovel = new TaintedStoneShovel(TaintedStoneShovelID, TaintedStone).setUnlocalizedName("Tainted_Shovel_Stone").setTextureName("divine_equipment:Tainted_Shovel_Stone");
|
TaintedStoneShovel = new TaintedStoneShovel(TaintedStoneShovelID, TaintedStoneTool).setUnlocalizedName("Tainted_Shovel_Stone").setTextureName("divine_equipment:Tainted_Shovel_Stone");
|
||||||
LanguageRegistry.addName(TaintedStoneShovel, "Tainted Stone Shovel");
|
LanguageRegistry.addName(TaintedStoneShovel, "Tainted Stone Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedStoneShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedStoneShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
TaintedWoodShovel = new TaintedWoodShovel(TaintedWoodShovelID, TaintedWood).setUnlocalizedName("Tainted_Shovel_Wood").setTextureName("divine_equipment:Tainted_Shovel_Wood");
|
TaintedWoodShovel = new TaintedWoodShovel(TaintedWoodShovelID, TaintedWoodTool).setUnlocalizedName("Tainted_Shovel_Wood").setTextureName("divine_equipment:Tainted_Shovel_Wood");
|
||||||
LanguageRegistry.addName(TaintedWoodShovel, "Tainted Wooden Shovel");
|
LanguageRegistry.addName(TaintedWoodShovel, "Tainted Wooden Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedWoodShovel), " m ", " S ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
// Tainted Hoes
|
// Tainted Hoes
|
||||||
|
|
||||||
TaintedDiamondHoe = new TaintedDiamonHoe(TaintedDiamondHoeID, TaintedDiamond).setUnlocalizedName("Tainted_Hoe_Diamond").setTextureName("divine_equipment:Tainted_Hoe_Diamond");
|
TaintedDiamondHoe = new TaintedDiamondHoe(TaintedDiamondHoeID, TaintedDiamondTool).setUnlocalizedName("Tainted_Hoe_Diamond").setTextureName("divine_equipment:Tainted_Hoe_Diamond");
|
||||||
LanguageRegistry.addName(TaintedDiamondHoe, "Tainted Diamond Hoe");
|
LanguageRegistry.addName(TaintedDiamondHoe, "Tainted Diamond Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedDiamondHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedDiamondHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedDiamondHoe), " Sm", " s ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedDiamondHoe), " Sm", " s ", " s ", 'S', TaintedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
TaintedGoldHoe = new items.tainted.TaintedGoldHoe(TaintedGoldHoeID, TaintedGold).setUnlocalizedName("Tainted_Hoe_Gold").setTextureName("divine_equipment:Tainted_Hoe_Gold");
|
TaintedGoldHoe = new items.tainted.TaintedGoldHoe(TaintedGoldHoeID, TaintedGoldTool).setUnlocalizedName("Tainted_Hoe_Gold").setTextureName("divine_equipment:Tainted_Hoe_Gold");
|
||||||
LanguageRegistry.addName(TaintedGoldHoe, "Tainted Gold Hoe");
|
LanguageRegistry.addName(TaintedGoldHoe, "Tainted Gold Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedGoldHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedGoldHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
TaintedIronHoe = new items.tainted.TaintedIronHoe(TaintedIronHoeID, TaintedIron).setUnlocalizedName("Tainted_Hoe_Iron").setTextureName("divine_equipment:Tainted_Hoe_Iron");
|
TaintedIronHoe = new items.tainted.TaintedIronHoe(TaintedIronHoeID, TaintedIronTool).setUnlocalizedName("Tainted_Hoe_Iron").setTextureName("divine_equipment:Tainted_Hoe_Iron");
|
||||||
LanguageRegistry.addName(TaintedIronHoe, "Tainted Iron Hoe");
|
LanguageRegistry.addName(TaintedIronHoe, "Tainted Iron Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedIronHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedIronHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedGoldHoe), " Sm", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedGoldHoe), " Sm", " s ", " s ", 'S', TaintedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
TaintedStoneHoe = new TaintedStoneHoe(TaintedStoneHoeID, TaintedStone).setUnlocalizedName("Tainted_Hoe_Stone").setTextureName("divine_equipment:Tainted_Hoe_Stone");
|
TaintedStoneHoe = new TaintedStoneHoe(TaintedStoneHoeID, TaintedStoneTool).setUnlocalizedName("Tainted_Hoe_Stone").setTextureName("divine_equipment:Tainted_Hoe_Stone");
|
||||||
LanguageRegistry.addName(TaintedStoneHoe, "Tainted Stone Hoe");
|
LanguageRegistry.addName(TaintedStoneHoe, "Tainted Stone Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedStoneHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedStoneHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedStoneHoe), " Sm", " s ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedStoneHoe), " Sm", " s ", " s ", 'S', TaintedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
TaintedWoodHoe = new TaintedWoodHoe(TaintedWoodHoeID, TaintedWood).setUnlocalizedName("Tainted_Hoe_Wood").setTextureName("divine_equipment:Tainted_Hoe_Wood");
|
TaintedWoodHoe = new TaintedWoodHoe(TaintedWoodHoeID, TaintedWoodTool).setUnlocalizedName("Tainted_Hoe_Wood").setTextureName("divine_equipment:Tainted_Hoe_Wood");
|
||||||
LanguageRegistry.addName(TaintedWoodHoe, "Tainted Wooden Hoe");
|
LanguageRegistry.addName(TaintedWoodHoe, "Tainted Wooden Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedWoodHoe), "mS ", " s ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodHoe), " Sm", " s ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(TaintedWoodHoe), " Sm", " s ", " s ", 'S', TaintedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
@@ -392,122 +396,128 @@ public class Divine_Content {
|
|||||||
|
|
||||||
// Blessed Swords
|
// Blessed Swords
|
||||||
|
|
||||||
BlessedDiamondSword = new items.blessed.BlessedDiamondSword(BlessedDiamondSwordID, BlessedDiamond).setUnlocalizedName("Blessed_Sword_Diamond").setTextureName("divine_equipment:Blessed_Sword_Diamond");
|
BlessedDiamondSword = new items.blessed.BlessedDiamondSword(BlessedDiamondSwordID, BlessedDiamondTool).setUnlocalizedName("Blessed_Sword_Diamond").setTextureName("divine_equipment:Blessed_Sword_Diamond");
|
||||||
LanguageRegistry.addName(BlessedDiamondSword, "Blessed Diamond Sword");
|
LanguageRegistry.addName(BlessedDiamondSword, "Blessed Diamond Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedDiamondSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedDiamondSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
BlessedGoldSword = new items.blessed.BlessedGoldSword(BlessedGoldSwordID, BlessedGold).setUnlocalizedName("Blessed_Sword_Gold").setTextureName("divine_equipment:Blessed_Sword_Gold");
|
BlessedGoldSword = new items.blessed.BlessedGoldSword(BlessedGoldSwordID, BlessedGoldTool).setUnlocalizedName("Blessed_Sword_Gold").setTextureName("divine_equipment:Blessed_Sword_Gold");
|
||||||
LanguageRegistry.addName(BlessedGoldSword, "Blessed Gold Sword");
|
LanguageRegistry.addName(BlessedGoldSword, "Blessed Gold Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedGoldSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedGoldSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
BlessedIronSword = new BlessedIronSword(BlessedIronSwordID, BlessedIron).setUnlocalizedName("Blessed_Sword_Iron").setTextureName("divine_equipment:Blessed_Sword_Iron");
|
BlessedIronSword = new BlessedIronSword(BlessedIronSwordID, BlessedIronTool).setUnlocalizedName("Blessed_Sword_Iron").setTextureName("divine_equipment:Blessed_Sword_Iron");
|
||||||
LanguageRegistry.addName(BlessedIronSword, "Blessed Iron Sword");
|
LanguageRegistry.addName(BlessedIronSword, "Blessed Iron Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedIronSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedIronSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
|
|
||||||
BlessedStoneSword = new BlessedStoneSword(BlessedStoneSwordID, BlessedStone).setUnlocalizedName("Blessed_Sword_Stone").setTextureName("divine_equipment:Blessed_Sword_Stone");
|
BlessedStoneSword = new BlessedStoneSword(BlessedStoneSwordID, BlessedStoneTool).setUnlocalizedName("Blessed_Sword_Stone").setTextureName("divine_equipment:Blessed_Sword_Stone");
|
||||||
LanguageRegistry.addName(BlessedStoneSword, "Blessed Stone Sword");
|
LanguageRegistry.addName(BlessedStoneSword, "Blessed Stone Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedStoneSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedStoneSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
BlessedWoodSword = new BlessedWoodSword(BlessedWoodSwordID, BlessedWood).setUnlocalizedName("Blessed_Sword_Wood").setTextureName("divine_equipment:Blessed_Sword_Wood");
|
BlessedWoodSword = new BlessedWoodSword(BlessedWoodSwordID, BlessedWoodTool).setUnlocalizedName("Blessed_Sword_Wood").setTextureName("divine_equipment:Blessed_Sword_Wood");
|
||||||
LanguageRegistry.addName(BlessedWoodSword, "Blessed Wooden Sword");
|
LanguageRegistry.addName(BlessedWoodSword, "Blessed Wooden Sword");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedWoodSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedWoodSword), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
// Pickaxes
|
// Pickaxes
|
||||||
|
|
||||||
BlessedDiamondPickaxe = new items.blessed.BlessedDiamondPickaxe(BlessedDiamondPickaxeID, BlessedDiamond).setUnlocalizedName("Blessed_Pickaxe_Diamond").setTextureName("divine_equipment:Blessed_Pickaxe_Diamond");
|
BlessedDiamondPickaxe = new items.blessed.BlessedDiamondPickaxe(BlessedDiamondPickaxeID, BlessedDiamondTool).setUnlocalizedName("Blessed_Pickaxe_Diamond").setTextureName("divine_equipment:Blessed_Pickaxe_Diamond");
|
||||||
LanguageRegistry.addName(BlessedDiamondPickaxe, "Blessed Diamond Pickaxe");
|
LanguageRegistry.addName(BlessedDiamondPickaxe, "Blessed Diamond Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedDiamondPickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedDiamondPickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
BlessedGoldPickaxe = new items.blessed.BlessedGoldPickaxe(BlessedGoldPickaxeID, BlessedGold).setUnlocalizedName("Blessed_Pickaxe_Gold").setTextureName("divine_equipment:Blessed_Pickaxe_Gold");
|
BlessedGoldPickaxe = new items.blessed.BlessedGoldPickaxe(BlessedGoldPickaxeID, BlessedGoldTool).setUnlocalizedName("Blessed_Pickaxe_Gold").setTextureName("divine_equipment:Blessed_Pickaxe_Gold");
|
||||||
LanguageRegistry.addName(BlessedGoldPickaxe, "Blessed Gold Pickaxe");
|
LanguageRegistry.addName(BlessedGoldPickaxe, "Blessed Gold Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodPickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedGoldPickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
BlessedIronPickaxe = new items.blessed.BlessedIronPickaxe(BlessedIronPickaxeID, BlessedIron).setUnlocalizedName("Blessed_Pickaxe_Iron").setTextureName("divine_equipment:Blessed_Pickaxe_Iron");
|
BlessedIronPickaxe = new items.blessed.BlessedIronPickaxe(BlessedIronPickaxeID, BlessedIronTool).setUnlocalizedName("Blessed_Pickaxe_Iron").setTextureName("divine_equipment:Blessed_Pickaxe_Iron");
|
||||||
LanguageRegistry.addName(BlessedIronPickaxe, "Blessed Iron Pickaxe");
|
LanguageRegistry.addName(BlessedIronPickaxe, "Blessed Iron Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedWoodPickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedIronPickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
|
|
||||||
BlessedStonePickaxe = new BlessedStonePickaxe(BlessedStonePickaxeID, BlessedStone).setUnlocalizedName("Blessed_Pickaxe_Stone").setTextureName("divine_equipment:Blessed_Pickaxe_Stone");
|
BlessedStonePickaxe = new BlessedStonePickaxe(BlessedStonePickaxeID, BlessedStoneTool).setUnlocalizedName("Blessed_Pickaxe_Stone").setTextureName("divine_equipment:Blessed_Pickaxe_Stone");
|
||||||
LanguageRegistry.addName(BlessedStonePickaxe, "Blessed Stone Pickaxe");
|
LanguageRegistry.addName(BlessedStonePickaxe, "Blessed Stone Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(TaintedStonePickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedStonePickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
BlessedWoodPickaxe = new BlessedWoodPickaxe(BlessedWoodPickaxeID, BlessedWood).setUnlocalizedName("Blessed_Pickaxe_Wood").setTextureName("divine_equipment:Blessed_Pickaxe_Wood");
|
BlessedWoodPickaxe = new BlessedWoodPickaxe(BlessedWoodPickaxeID, BlessedWoodTool).setUnlocalizedName("Blessed_Pickaxe_Wood").setTextureName("divine_equipment:Blessed_Pickaxe_Wood");
|
||||||
LanguageRegistry.addName(BlessedWoodPickaxe, "Blessed Wooden Pickaxe");
|
LanguageRegistry.addName(BlessedWoodPickaxe, "Blessed Wooden Pickaxe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedWoodPickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedWoodPickaxe), "mSm", " s ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
// Axes
|
// Axes
|
||||||
|
|
||||||
BlessedDiamondAxe = new BlessedDiamondAxe(BlessedDiamondAxeID, BlessedDiamond).setUnlocalizedName("Blessed_Axe_Diamond").setTextureName("divine_equipment:Blessed_Axe_Diamond");
|
BlessedDiamondAxe = new BlessedDiamondAxe(BlessedDiamondAxeID, BlessedDiamondTool).setUnlocalizedName("Blessed_Axe_Diamond").setTextureName("divine_equipment:Blessed_Axe_Diamond");
|
||||||
LanguageRegistry.addName(BlessedDiamondAxe, "Blessed Diamond Axe");
|
LanguageRegistry.addName(BlessedDiamondAxe, "Blessed Diamond Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedDiamondAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedDiamondAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedDiamondAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedDiamondAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
BlessedGoldAxe = new BlessedGoldAxe(BlessedGoldAxeID, BlessedGold).setUnlocalizedName("Blessed_Axe_Gold").setTextureName("divine_equipment:Blessed_Axe_Gold");
|
BlessedGoldAxe = new BlessedGoldAxe(BlessedGoldAxeID, BlessedGoldTool).setUnlocalizedName("Blessed_Axe_Gold").setTextureName("divine_equipment:Blessed_Axe_Gold");
|
||||||
LanguageRegistry.addName(BlessedGoldAxe, "Blessed Gold Axe");
|
LanguageRegistry.addName(BlessedGoldAxe, "Blessed Gold Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedGoldAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedGoldAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedGoldAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedGoldAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
|
|
||||||
BlessedIronAxe = new BlessedIronAxe(BlessedIronAxeID, BlessedIron).setUnlocalizedName("Blessed_Axe_Iron").setTextureName("divine_equipment:Blessed_Axe_Iron");
|
BlessedIronAxe = new BlessedIronAxe(BlessedIronAxeID, BlessedIronTool).setUnlocalizedName("Blessed_Axe_Iron").setTextureName("divine_equipment:Blessed_Axe_Iron");
|
||||||
LanguageRegistry.addName(BlessedIronAxe, "Blessed Iron Axe");
|
LanguageRegistry.addName(BlessedIronAxe, "Blessed Iron Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedIronAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedIronAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedGoldAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedGoldAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
BlessedStoneAxe = new BlessedStoneAxe(BlessedStoneAxeID, BlessedStone).setUnlocalizedName("Blessed_Axe_Stone").setTextureName("divine_equipment:Blessed_Axe_Stone");
|
BlessedStoneAxe = new BlessedStoneAxe(BlessedStoneAxeID, BlessedStoneTool).setUnlocalizedName("Blessed_Axe_Stone").setTextureName("divine_equipment:Blessed_Axe_Stone");
|
||||||
LanguageRegistry.addName(BlessedStoneAxe, "Blessed Stone Axe");
|
LanguageRegistry.addName(BlessedStoneAxe, "Blessed Stone Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedStoneAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedStoneAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedStoneAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedStoneAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
BlessedWoodAxe = new BlessedWoodAxe(BlessedWoodAxeID, BlessedWood).setUnlocalizedName("Blessed_Axe_Wood").setTextureName("divine_equipment:Blessed_Axe_Wood");
|
BlessedWoodAxe = new BlessedWoodAxe(BlessedWoodAxeID, BlessedWoodTool).setUnlocalizedName("Blessed_Axe_Wood").setTextureName("divine_equipment:Blessed_Axe_Wood");
|
||||||
LanguageRegistry.addName(BlessedWoodAxe, "Blessed Wooden Axe");
|
LanguageRegistry.addName(BlessedWoodAxe, "Blessed Wooden Axe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedWoodAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedWoodAxe), "mS ", "ms ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedWoodAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedWoodAxe), " Sm", " sm", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
// Shovels
|
// Shovels
|
||||||
|
|
||||||
BlessedDiamondShovel = new BlessedDiamondShovel(BlessedDiamondShovelID, BlessedDiamond).setUnlocalizedName("Blessed_Shovel_Diamond").setTextureName("divine_equipment:Blessed_Shovel_Diamond");
|
BlessedDiamondShovel = new BlessedDiamondShovel(BlessedDiamondShovelID, BlessedDiamondTool).setUnlocalizedName("Blessed_Shovel_Diamond").setTextureName("divine_equipment:Blessed_Shovel_Diamond");
|
||||||
LanguageRegistry.addName(BlessedDiamondShovel, "Blessed Diamond Shovel");
|
LanguageRegistry.addName(BlessedDiamondShovel, "Blessed Diamond Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedDiamondShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedDiamondShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
BlessedGoldShovel = new BlessedGoldShovel(BlessedGoldShovelID, BlessedGold).setUnlocalizedName("Blessed_Shovel_Gold").setTextureName("divine_equipment:Blessed_Shovel_Gold");
|
BlessedGoldShovel = new BlessedGoldShovel(BlessedGoldShovelID, BlessedGoldTool).setUnlocalizedName("Blessed_Shovel_Gold").setTextureName("divine_equipment:Blessed_Shovel_Gold");
|
||||||
LanguageRegistry.addName(BlessedGoldShovel, "Blessed Gold Shovel");
|
LanguageRegistry.addName(BlessedGoldShovel, "Blessed Gold Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedGoldShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedGoldShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
BlessedIronShovel = new BlessedIronShovel(BlessedIronShovelID, BlessedIron).setUnlocalizedName("Blessed_Shovel_Iron").setTextureName("divine_equipment:Blessed_Shovel_Iron");
|
BlessedIronShovel = new BlessedIronShovel(BlessedIronShovelID, BlessedIronTool).setUnlocalizedName("Blessed_Shovel_Iron").setTextureName("divine_equipment:Blessed_Shovel_Iron");
|
||||||
LanguageRegistry.addName(BlessedIronShovel, "Blessed Iron Shovel");
|
LanguageRegistry.addName(BlessedIronShovel, "Blessed Iron Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedIronShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedIronShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
|
|
||||||
BlessedStoneShovel = new BlessedStoneShovel(BlessedStoneShovelID, BlessedStone).setUnlocalizedName("Blessed_Shovel_Stone").setTextureName("divine_equipment:Blessed_Shovel_Stone");
|
BlessedStoneShovel = new BlessedStoneShovel(BlessedStoneShovelID, BlessedStoneTool).setUnlocalizedName("Blessed_Shovel_Stone").setTextureName("divine_equipment:Blessed_Shovel_Stone");
|
||||||
LanguageRegistry.addName(BlessedStoneShovel, "Blessed Stone Shovel");
|
LanguageRegistry.addName(BlessedStoneShovel, "Blessed Stone Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedStoneShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedStoneShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
BlessedWoodShovel = new BlessedWoodShovel(BlessedWoodShovelID, BlessedWood).setUnlocalizedName("Blessed_Shovel_Wood").setTextureName("divine_equipment:Blessed_Shovel_Wood");
|
BlessedWoodShovel = new BlessedWoodShovel(BlessedWoodShovelID, BlessedWoodTool).setUnlocalizedName("Blessed_Shovel_Wood").setTextureName("divine_equipment:Blessed_Shovel_Wood");
|
||||||
LanguageRegistry.addName(BlessedWoodShovel, "Blessed Wooden Shovel");
|
LanguageRegistry.addName(BlessedWoodShovel, "Blessed Wooden Shovel");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedWoodShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedWoodShovel), " m ", " S ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
// Blessed Hoes
|
// Blessed Hoes
|
||||||
|
|
||||||
BlessedDiamondHoe = new BlessedDiamondHoe(BlessedDiamondHoeID, BlessedDiamond).setUnlocalizedName("Blessed_Hoe_Diamond").setTextureName("divine_equipment:Blessed_Hoe_Diamond");
|
BlessedDiamondHoe = new BlessedDiamondHoe(BlessedDiamondHoeID, BlessedDiamondTool).setUnlocalizedName("Blessed_Hoe_Diamond").setTextureName("divine_equipment:Blessed_Hoe_Diamond");
|
||||||
LanguageRegistry.addName(BlessedDiamondHoe, "Blessed Diamond Hoe");
|
LanguageRegistry.addName(BlessedDiamondHoe, "Blessed Diamond Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedDiamondHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedDiamondHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedDiamondHoe), " Sm", " s ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedDiamondHoe), " Sm", " s ", " s ", 'S', BlessedSigil, 'm', Item.diamond, 's', Item.stick);
|
||||||
|
|
||||||
BlessedGoldHoe = new BlessedGoldHoe(BlessedGoldHoeID, BlessedGold).setUnlocalizedName("Blessed_Hoe_Gold").setTextureName("divine_equipment:Blessed_Hoe_Gold");
|
BlessedGoldHoe = new BlessedGoldHoe(BlessedGoldHoeID, BlessedGoldTool).setUnlocalizedName("Blessed_Hoe_Gold").setTextureName("divine_equipment:Blessed_Hoe_Gold");
|
||||||
LanguageRegistry.addName(BlessedGoldHoe, "Blessed Gold Hoe");
|
LanguageRegistry.addName(BlessedGoldHoe, "Blessed Gold Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedGoldHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedGoldHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
BlessedIronHoe = new BlessedIronHoe(BlessedIronHoeID, BlessedIron).setUnlocalizedName("Blessed_Hoe_Iron").setTextureName("divine_equipment:Blessed_Hoe_Iron");
|
BlessedIronHoe = new BlessedIronHoe(BlessedIronHoeID, BlessedIronTool).setUnlocalizedName("Blessed_Hoe_Iron").setTextureName("divine_equipment:Blessed_Hoe_Iron");
|
||||||
LanguageRegistry.addName(BlessedIronHoe, "Blessed Iron Hoe");
|
LanguageRegistry.addName(BlessedIronHoe, "Blessed Iron Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedIronHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedIronHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotIron, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedGoldHoe), " Sm", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedGoldHoe), " Sm", " s ", " s ", 'S', BlessedSigil, 'm', Item.ingotGold, 's', Item.stick);
|
||||||
|
|
||||||
BlessedStoneHoe = new BlessedStoneHoe(BlessedStoneHoeID, BlessedStone).setUnlocalizedName("Blessed_Hoe_Stone").setTextureName("divine_equipment:Blessed_Hoe_Stone");
|
BlessedStoneHoe = new BlessedStoneHoe(BlessedStoneHoeID, BlessedStoneTool).setUnlocalizedName("Blessed_Hoe_Stone").setTextureName("divine_equipment:Blessed_Hoe_Stone");
|
||||||
LanguageRegistry.addName(BlessedStoneHoe, "Blessed Stone Hoe");
|
LanguageRegistry.addName(BlessedStoneHoe, "Blessed Stone Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedStoneHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedStoneHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedStoneHoe), " Sm", " s ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedStoneHoe), " Sm", " s ", " s ", 'S', BlessedSigil, 'm', Block.stone, 's', Item.stick);
|
||||||
|
|
||||||
BlessedWoodHoe = new BlessedWoodHoe(BlessedWoodHoeID, BlessedWood).setUnlocalizedName("Blessed_Hoe_Wood").setTextureName("divine_equipment:Blessed_Hoe_Wood");
|
BlessedWoodHoe = new BlessedWoodHoe(BlessedWoodHoeID, BlessedWoodTool).setUnlocalizedName("Blessed_Hoe_Wood").setTextureName("divine_equipment:Blessed_Hoe_Wood");
|
||||||
LanguageRegistry.addName(BlessedWoodHoe, "Blessed Wooden Hoe");
|
LanguageRegistry.addName(BlessedWoodHoe, "Blessed Wooden Hoe");
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedWoodHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedWoodHoe), "mS ", " s ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
GameRegistry.addRecipe(new ItemStack(BlessedWoodHoe), " Sm", " s ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
GameRegistry.addRecipe(new ItemStack(BlessedWoodHoe), " Sm", " s ", " s ", 'S', BlessedSigil, 'm', Block.planks, 's', Item.stick);
|
||||||
|
|
||||||
|
// Ender Items
|
||||||
|
|
||||||
|
EnderSword = new items.ender.EnderSword(EnderSwordID, EnumToolMaterial.EMERALD).setUnlocalizedName("Ender_Sword").setTextureName("divine_equipment:EnderSword");
|
||||||
|
LanguageRegistry.addName(EnderSword, "Ender Sword");
|
||||||
|
GameRegistry.addRecipe(new ItemStack(EnderSword), " s ", " s ", " S ", 's', EnderSigil, 'S', Item.stick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
8
src/divine_equipment/common/Special_Mentions.java
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
package common;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User: Orthus
|
||||||
|
* Date: 11/14/13
|
||||||
|
*/
|
||||||
|
public class Special_Mentions {
|
||||||
|
}
|
||||||
@@ -5,16 +5,19 @@ package divine_equipment; /**
|
|||||||
|
|
||||||
import common.Divine_Achievements;
|
import common.Divine_Achievements;
|
||||||
import common.Divine_Content;
|
import common.Divine_Content;
|
||||||
|
import cpw.mods.fml.common.Loader;
|
||||||
import cpw.mods.fml.common.Mod;
|
import cpw.mods.fml.common.Mod;
|
||||||
import cpw.mods.fml.common.Mod.Instance;
|
import cpw.mods.fml.common.Mod.Instance;
|
||||||
|
import cpw.mods.fml.common.SidedProxy;
|
||||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||||
import cpw.mods.fml.common.network.NetworkMod;
|
import cpw.mods.fml.common.network.NetworkMod;
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
|
import common.Special_Mentions;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@SuppressWarnings("ALL")
|
@SuppressWarnings("ALL")
|
||||||
@Mod(modid = "divine_equipment", name = "Divine Equipment",version = "V0.5")
|
@Mod(modid = "divine_equipment", name = "Divine Equipment",version = "V0.3")
|
||||||
@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = { "DEquipment" })
|
@NetworkMod(clientSideRequired = true, serverSideRequired = false, channels = { "DEquipment" })
|
||||||
public class Divine_Equipment
|
public class Divine_Equipment
|
||||||
{
|
{
|
||||||
@@ -91,10 +94,19 @@ public class Divine_Equipment
|
|||||||
public static int BlessedIronHoeID;
|
public static int BlessedIronHoeID;
|
||||||
public static int BlessedStoneHoeID;
|
public static int BlessedStoneHoeID;
|
||||||
public static int BlessedWoodHoeID;
|
public static int BlessedWoodHoeID;
|
||||||
|
// Ender Items
|
||||||
|
public static int EnderSwordID;
|
||||||
|
|
||||||
@Instance("Divine_Equipment")
|
@Instance("Divine_Equipment")
|
||||||
public static Divine_Equipment INSTANCE;
|
public static Divine_Equipment INSTANCE;
|
||||||
|
public Divine_Equipment()
|
||||||
|
{
|
||||||
|
mentions = new Special_Mentions();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@Mod.EventHandler
|
@Mod.EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event){
|
public void preInit(FMLPreInitializationEvent event){
|
||||||
Configuration DivineEquipment = new Configuration(event.getSuggestedConfigurationFile());
|
Configuration DivineEquipment = new Configuration(event.getSuggestedConfigurationFile());
|
||||||
@@ -162,7 +174,7 @@ public class Divine_Equipment
|
|||||||
BlessedStoneHoeID = DivineEquipment.getItem("Blessed Stone Hoe", 6618).getInt();
|
BlessedStoneHoeID = DivineEquipment.getItem("Blessed Stone Hoe", 6618).getInt();
|
||||||
BlessedWoodHoeID = DivineEquipment.getItem("Blessed Wood Hoe", 6619).getInt();
|
BlessedWoodHoeID = DivineEquipment.getItem("Blessed Wood Hoe", 6619).getInt();
|
||||||
|
|
||||||
|
EnderSwordID = DivineEquipment.getItem("Ender Sword", 6620).getInt();
|
||||||
|
|
||||||
DivineEquipment.save();
|
DivineEquipment.save();
|
||||||
content = new Divine_Content();
|
content = new Divine_Content();
|
||||||
@@ -170,4 +182,5 @@ public class Divine_Equipment
|
|||||||
}
|
}
|
||||||
public static Divine_Content content;
|
public static Divine_Content content;
|
||||||
public static Divine_Achievements achivements;
|
public static Divine_Achievements achivements;
|
||||||
|
public static Special_Mentions mentions;
|
||||||
}
|
}
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
<orderEntry type="inheritedJdk" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
<orderEntry type="module" module-name="minecraft" />
|
<orderEntry type="module" module-name="minecraft" />
|
||||||
|
<orderEntry type="library" name="guava-14.0" level="project" />
|
||||||
</component>
|
</component>
|
||||||
</module>
|
</module>
|
||||||
|
|
||||||
|
|||||||
153
src/divine_equipment/items/base/BlessedSwordBase.java
Normal file
@@ -0,0 +1,153 @@
|
|||||||
|
package items.base;
|
||||||
|
|
||||||
|
import com.google.common.collect.Multimap;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
|
import net.minecraft.entity.ai.attributes.AttributeModifier;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.EnumAction;
|
||||||
|
import net.minecraft.item.EnumToolMaterial;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public class BlessedSwordBase extends Item
|
||||||
|
{
|
||||||
|
private float weaponDamage;
|
||||||
|
private final EnumToolMaterial toolMaterial;
|
||||||
|
|
||||||
|
public BlessedSwordBase(int par1, EnumToolMaterial par2EnumToolMaterial)
|
||||||
|
{
|
||||||
|
super(par1);
|
||||||
|
this.toolMaterial = par2EnumToolMaterial;
|
||||||
|
this.maxStackSize = 1;
|
||||||
|
this.setMaxDamage(par2EnumToolMaterial.getMaxUses());
|
||||||
|
this.setCreativeTab(CreativeTabs.tabCombat);
|
||||||
|
this.weaponDamage = 4.0F + par2EnumToolMaterial.getDamageVsEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
public float func_82803_g()
|
||||||
|
{
|
||||||
|
return this.toolMaterial.getDamageVsEntity();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the strength of the stack against a given block. 1.0F base, (Quality+1)*2 if correct blocktype, 1.5F if
|
||||||
|
* sword
|
||||||
|
*/
|
||||||
|
public float getStrVsBlock(ItemStack par1ItemStack, Block par2Block)
|
||||||
|
{
|
||||||
|
if (par2Block.blockID == Block.web.blockID)
|
||||||
|
{
|
||||||
|
return 15.0F;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Material material = par2Block.blockMaterial;
|
||||||
|
return material != Material.plants && material != Material.vine && material != Material.coral && material != Material.leaves && material != Material.pumpkin ? 1.0F : 1.5F;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Current implementations of this method in child classes do not use the entry argument beside ev. They just raise
|
||||||
|
* the damage on the stack.
|
||||||
|
*/
|
||||||
|
public boolean hitEntity(ItemStack par1ItemStack, EntityLivingBase par2EntityLivingBase, EntityLivingBase par3EntityLivingBase)
|
||||||
|
{
|
||||||
|
par1ItemStack.damageItem(1, par3EntityLivingBase);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean onBlockDestroyed(ItemStack par1ItemStack, World par2World, int par3, int par4, int par5, int par6, EntityLivingBase par7EntityLivingBase)
|
||||||
|
{
|
||||||
|
if ((double)Block.blocksList[par3].getBlockHardness(par2World, par4, par5, par6) != 0.0D)
|
||||||
|
{
|
||||||
|
par1ItemStack.damageItem(2, par7EntityLivingBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns True is the item is renderer in full 3D when hold.
|
||||||
|
*/
|
||||||
|
public boolean isFull3D()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* returns the action that specifies what animation to play when the items is being used
|
||||||
|
*/
|
||||||
|
// Right Click
|
||||||
|
public EnumAction getItemUseAction(ItemStack par1ItemStack)
|
||||||
|
{
|
||||||
|
return EnumAction.bow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* How long it takes to use or consume an item
|
||||||
|
*/
|
||||||
|
public int getMaxItemUseDuration(ItemStack par1ItemStack)
|
||||||
|
{
|
||||||
|
return 72000;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
|
||||||
|
*/
|
||||||
|
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||||
|
{
|
||||||
|
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
|
||||||
|
return par1ItemStack;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns if the item (tool) can harvest results from the block type.
|
||||||
|
*/
|
||||||
|
public boolean canHarvestBlock(Block par1Block)
|
||||||
|
{
|
||||||
|
return par1Block.blockID == Block.web.blockID;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the enchantability factor of the item, most of the time is based on material.
|
||||||
|
*/
|
||||||
|
public int getItemEnchantability()
|
||||||
|
{
|
||||||
|
return this.toolMaterial.getEnchantability();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the name for this tool's material.
|
||||||
|
*/
|
||||||
|
public String getToolMaterialName()
|
||||||
|
{
|
||||||
|
return this.toolMaterial.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return whether this item is repairable in an anvil.
|
||||||
|
*/
|
||||||
|
public boolean getIsRepairable(ItemStack par1ItemStack, ItemStack par2ItemStack)
|
||||||
|
{
|
||||||
|
return this.toolMaterial.getToolCraftingMaterial() == par2ItemStack.itemID ? true : super.getIsRepairable(par1ItemStack, par2ItemStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets a map of item attribute modifiers, used by ItemSword to increase hit damage.
|
||||||
|
*/
|
||||||
|
public Multimap getItemAttributeModifiers()
|
||||||
|
{
|
||||||
|
Multimap multimap = super.getItemAttributeModifiers();
|
||||||
|
multimap.put(SharedMonsterAttributes.attackDamage.getAttributeUnlocalizedName(), new AttributeModifier(field_111210_e, "Weapon modifier", (double)this.weaponDamage, 0));
|
||||||
|
return multimap;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package items.blessed;
|
package items.blessed;
|
||||||
|
|
||||||
|
import items.base.BlessedSwordBase;
|
||||||
import net.minecraft.creativetab.*;
|
import net.minecraft.creativetab.*;
|
||||||
import net.minecraft.item.EnumToolMaterial;
|
import net.minecraft.item.EnumToolMaterial;
|
||||||
import net.minecraft.item.ItemSword;
|
import net.minecraft.item.ItemSword;
|
||||||
@@ -8,7 +9,7 @@ import net.minecraft.item.ItemSword;
|
|||||||
* User: Orthus
|
* User: Orthus
|
||||||
* Date: 9/30/13
|
* Date: 9/30/13
|
||||||
*/
|
*/
|
||||||
public class BlessedDiamondSword extends ItemSword {
|
public class BlessedDiamondSword extends BlessedSwordBase {
|
||||||
public BlessedDiamondSword(int id, EnumToolMaterial material){
|
public BlessedDiamondSword(int id, EnumToolMaterial material){
|
||||||
super(id, material);
|
super(id, material);
|
||||||
setCreativeTab(CreativeTabs.tabCombat);
|
setCreativeTab(CreativeTabs.tabCombat);
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
package items.blessed;
|
package items.blessed;
|
||||||
|
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* User: Orthus
|
* User: Orthus
|
||||||
@@ -12,4 +16,9 @@ public class BlessedSigil extends Item {
|
|||||||
super(id);
|
super(id);
|
||||||
setCreativeTab(CreativeTabs.tabMaterials);
|
setCreativeTab(CreativeTabs.tabMaterials);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||||
|
return super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer); //To change body of overridden methods use File | Settings | File Templates.
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
src/divine_equipment/items/ender/EnderSword.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package items.ender;
|
||||||
|
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.item.EnumToolMaterial;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemSword;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* User: Orthus
|
||||||
|
* Date: 10/12/13
|
||||||
|
*/
|
||||||
|
public class EnderSword extends ItemSword {
|
||||||
|
public EnderSword(int id, EnumToolMaterial material){
|
||||||
|
super(id, material);
|
||||||
|
setCreativeTab(CreativeTabs.tabCombat);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,8 +8,8 @@ import net.minecraft.item.ItemHoe;
|
|||||||
* User: Orthus
|
* User: Orthus
|
||||||
* Date: 10/8/13
|
* Date: 10/8/13
|
||||||
*/
|
*/
|
||||||
public class TaintedDiamonHoe extends ItemHoe {
|
public class TaintedDiamondHoe extends ItemHoe {
|
||||||
public TaintedDiamonHoe(int par1, EnumToolMaterial par2EnumToolMaterial) {
|
public TaintedDiamondHoe(int par1, EnumToolMaterial par2EnumToolMaterial) {
|
||||||
super(par1, par2EnumToolMaterial);
|
super(par1, par2EnumToolMaterial);
|
||||||
setCreativeTab(CreativeTabs.tabTools);
|
setCreativeTab(CreativeTabs.tabTools);
|
||||||
}
|
}
|
||||||
@@ -3,10 +3,10 @@
|
|||||||
"modid": "divine_equipment",
|
"modid": "divine_equipment",
|
||||||
"name": "Divine Equipment",
|
"name": "Divine Equipment",
|
||||||
"description": "Divine Equipment adds Tools, Armour, Blocks, and Items that are of Blessed, Ender, and Tainted Variations.",
|
"description": "Divine Equipment adds Tools, Armour, Blocks, and Items that are of Blessed, Ender, and Tainted Variations.",
|
||||||
"version": "0.5",
|
"version": "0.3",
|
||||||
"mcversion": "1.6.4",
|
"mcversion": "1.6.4",
|
||||||
"logoFile": "",
|
"logoFile": "",
|
||||||
"url": "https://bitbucket.org/0rthus/divine-equipment",
|
"url": "https://bitbucket.org/zackyd/divine-equipment",
|
||||||
"updateUrl": "",
|
"updateUrl": "",
|
||||||
"authors": ["Zackyd"],
|
"authors": ["Zackyd"],
|
||||||
"credits": "Made by Zackyd",
|
"credits": "Made by Zackyd",
|
||||||
|
|||||||
106
src/thaumcraft/api/EnumTag.java
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
package thaumcraft.api;
|
||||||
|
|
||||||
|
import java.util.EnumSet;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public enum EnumTag {
|
||||||
|
UNKNOWN (63,"Obscurus","Unknown, Obscured",1,false,0x282828),
|
||||||
|
|
||||||
|
WIND (0,"Aura","Air, Wind, Breath, Movement",1,false,0xc0c0d7),
|
||||||
|
FIRE (6,"Ignis","Fire, Heat, Burn, Light",2,true,0xff5a01),
|
||||||
|
ROCK (11,"Saxum","Earth, Stone, Ground, Foundation",4,false,0x5c4842),
|
||||||
|
WATER (21,"Aqua","Water, Fluid, Cold",3,false,0x3cd4fc),
|
||||||
|
|
||||||
|
PLANT (36,"Herba","Herb, Plant, Grass",4,false,0x01ac00),
|
||||||
|
BEAST (53,"Bestia","Animal, Beast",3,true,0x9f6409),
|
||||||
|
FLESH (54,"Corpus","Body, Flesh, Physique",3,false,0xee478d),
|
||||||
|
METAL (12,"Metallum","Metal, Mine, Ore",4,false,0xd8d8d8),
|
||||||
|
CRYSTAL (20,"Vitreus","Glass, Crystal, Gem, Transparent",1,false,0x80ffff),
|
||||||
|
SOUND (24,"Sonus","Sound, Noise, Din",3,false,0x10c9c0),
|
||||||
|
|
||||||
|
EXCHANGE (14,"Permutatio","Exchange, Change, Barter",4,false,0x578357),
|
||||||
|
LIFE (26,"Victus","Life force, Food, Sustenance",3,false,0xde0005),
|
||||||
|
DEATH (27,"Mortuus","Death, Decay, Undead",6,true,0x404040),
|
||||||
|
SPIRIT (30,"Animus","Soul, Spirit",1,false,0xe0e0e0),
|
||||||
|
VOID (2,"Vacuos","Empty, Void, Insubstantial",1,true,0xc0c0d7),
|
||||||
|
VISION (3,"Visum","Sight, Vision, Appearance",3,false,0xd5d4ec),
|
||||||
|
KNOWLEDGE (4,"Cognitio","Learning, Knowledge, Inquiry",1,false,0x8080ee),
|
||||||
|
DESTRUCTION (7,"Fractus","Destruction, Fragmented, Shattered",2,true,0x506050),
|
||||||
|
POWER (9,"Potentia","Power, Energy, Strength",2,true,0xc0ffff),
|
||||||
|
MECHANISM (10,"Machina","Mechanism, Machine, Device",2,false,0x8080a0),
|
||||||
|
ARMOR (17,"Tutamen","Defense, Protection, Security",4,false,0x00c0c0),
|
||||||
|
WEAPON (18,"Telum","Arrow, Sword, Weapon",2,true,0xc05050),
|
||||||
|
TOOL (19,"Instrumentum","Instrument, Tool, Implement",4,false,0x4040ee),
|
||||||
|
POISON (29,"Venenum","Poison, Drug, Impure",3,true,0x89f000),
|
||||||
|
VALUABLE (31,"Carus","Expensive, Precious, Valuable",4,false,0xe6be44),
|
||||||
|
PURE (37,"Purus","Pure, Clean, Stainless",3,false,0xa5fffd),
|
||||||
|
MAGIC (40,"Praecantatio","Magic, Sorcery",5,false,0x9700c0),
|
||||||
|
TIME (41,"Tempus","Time, Moment, Season",5,false,0x9070e0),
|
||||||
|
CONTROL (48,"Imperito","Control, Command, Dominate",5,false,0x98994b),
|
||||||
|
DARK (49,"Tenebris","Dark, Night, Blindness",5,true,0x252525),
|
||||||
|
CRAFT (50,"Fabrico","Create, Construct, Work",2,false,0x809d80),
|
||||||
|
EVIL (56,"Malum","Evil, The Nether, Malice",5,true,0x700000),
|
||||||
|
FLUX (57,"Mutatio","Flux, Chaos",5,true,0xb80bb9),
|
||||||
|
ELDRITCH (58,"Alienis","Eldritch, The End, Strange, Alien",5,true,0x805080),
|
||||||
|
|
||||||
|
|
||||||
|
//TOREMOVE
|
||||||
|
TRAP (28,"Vinculum","Bind, Imprison, Trap",4,true,0x9a8080),
|
||||||
|
INSECT (55,"Bestiola","Spider, Web, Insects",3,false,0x808880),
|
||||||
|
MOTION (1,"Motus","Motion, Movement, Speed",1,false,0xcdccf4),
|
||||||
|
FLIGHT (5,"Volito","Flight, Leap",1,false,0xe7e7d7),
|
||||||
|
LIGHT (8,"Lux","Light, Brightness, Day",2,false,0xfff663),
|
||||||
|
CLOTH (15,"Pannus","Cloth, Fabric, Garment, Thread",3,false,0xeaeac2),
|
||||||
|
EARTH (16,"Solum","Earth, Soil, Ground, Foundation",4,false,0x713f2d),
|
||||||
|
WEATHER (22,"Aer","Weather, Mist, Climate",3,false,0xc0ffff),
|
||||||
|
COLD (23,"Gelum","Cold, Ice, Frost",3,true,0xe1ffff),
|
||||||
|
HEAL (25,"Sano","Heal, Repair, Make Sound",3,false, 0xff8184),
|
||||||
|
WOOD (32,"Lignum","Wood, Forest, Tree",4,false,0x058105),
|
||||||
|
FLOWER (33,"Flos","Flower, Bloom, Blossom",4,false,0xffff40),
|
||||||
|
FUNGUS (34,"Fungus","Mushroom, Toadstool, Fungi",4,false,0xf7e5c7),
|
||||||
|
CROP (35,"Messis","Crops, Harvest",4,false,0xe3ff80),
|
||||||
|
;
|
||||||
|
|
||||||
|
// Attributes
|
||||||
|
public final int id;
|
||||||
|
public final String name;
|
||||||
|
public final String meaning;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* rough categories for the aspect types. Mostly just used to determine the common aspect type in certain biomes.
|
||||||
|
*/
|
||||||
|
public final int element; //1-air, 2-fire, 3-water, 4-earth, 5-mystical, 6-dead/aggressive, 999-deprecated
|
||||||
|
|
||||||
|
/**
|
||||||
|
* will wisps spawned from this fluxtype be aggressive?
|
||||||
|
*/
|
||||||
|
public final boolean aggro;
|
||||||
|
|
||||||
|
public final int color;
|
||||||
|
|
||||||
|
private EnumTag(int id, String name, String meaning, int element,boolean aggro, int color ) {
|
||||||
|
this.id = id;
|
||||||
|
this.name = name;
|
||||||
|
this.meaning = meaning;
|
||||||
|
this.element = element;
|
||||||
|
this.color = color;
|
||||||
|
this.aggro = aggro;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lookup
|
||||||
|
private static final Map<Integer,EnumTag> lookup = new HashMap<Integer,EnumTag>();
|
||||||
|
|
||||||
|
static { for(EnumTag s : EnumSet.allOf(EnumTag.class)) lookup.put(s.getId(), s); }
|
||||||
|
|
||||||
|
public int getId() { return id; }
|
||||||
|
|
||||||
|
public static EnumTag get(int id) {
|
||||||
|
if (lookup.get(id)==null||lookup.get(id).element==999)
|
||||||
|
return EnumTag.FLUX;
|
||||||
|
else
|
||||||
|
return lookup.get(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
63
src/thaumcraft/api/IAspectSource.java
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
package thaumcraft.api;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Azanor
|
||||||
|
*
|
||||||
|
* This interface is implemented by tile entites (or possibly anything else) like jars, alembics and the
|
||||||
|
* crucible so that they can act as an essentia source for blocks like the infusion altar.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface IAspectSource {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is used to add a certain amount of an aspect to the tile entity.
|
||||||
|
* @param tag
|
||||||
|
* @param amount
|
||||||
|
* @return the amount of aspect left over that could not be added.
|
||||||
|
*/
|
||||||
|
public int addToSource(EnumTag tag, int amount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a certain amount of a specific aspect from the tile entity
|
||||||
|
* @param tag
|
||||||
|
* @param amount
|
||||||
|
* @return true if that amount of aspect was available and was removed
|
||||||
|
*/
|
||||||
|
public boolean takeFromSource(EnumTag tag, int amount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* removes a bunch of different aspects and amounts from the tile entity.
|
||||||
|
* @param ot the ObjectTags object that contains the aspects and their amounts.
|
||||||
|
* @return true if all the aspects and their amounts were available and successfully removed
|
||||||
|
*/
|
||||||
|
public boolean takeFromSource(ObjectTags ot);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the tile entity contains the listed amount (or more) of the aspect
|
||||||
|
* @param tag
|
||||||
|
* @param amount
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean doesSourceContainAmount(EnumTag tag,int amount);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the tile entity contains all the listed aspects and their amounts
|
||||||
|
* @param ot the ObjectTags object that contains the aspects and their amounts.
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean doesSourceContain(ObjectTags ot);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns how much of the aspect this tile entity contains
|
||||||
|
* @param tag
|
||||||
|
* @return the amount of that aspect found
|
||||||
|
*/
|
||||||
|
public int sourceContains(EnumTag tag);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns all the aspects and their amounts that this tile entity contains
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ObjectTags getSourceTags();
|
||||||
|
}
|
||||||
15
src/thaumcraft/api/IVisDiscounter.java
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
package thaumcraft.api;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Azanor
|
||||||
|
* ItemArmor with this interface will grant a discount to the vis cost of actions the wearer performs with casting wands.
|
||||||
|
* The amount returned is the percentage by which the cost is discounted. There is a built-int max discount of 50%, but
|
||||||
|
* individual items really shouldn't have a discount more than 5%
|
||||||
|
*/
|
||||||
|
public interface IVisDiscounter {
|
||||||
|
|
||||||
|
int getVisDiscount();
|
||||||
|
|
||||||
|
}
|
||||||
27
src/thaumcraft/api/IVisRepairable.java
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package thaumcraft.api;
|
||||||
|
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Azanor
|
||||||
|
* Items and tools with this interface can receive the Repair enchantment.
|
||||||
|
* Armor, weapons and tools are handled automatically.
|
||||||
|
* Usually 1 vis equals 1 point of durability every 2 seconds (1 second for repair II)
|
||||||
|
* Repair enchant values over II also grants a reduction in speed, but at a much
|
||||||
|
* reduced rate (about 2 ticks per rating over II)
|
||||||
|
* Some sample code:<p>
|
||||||
|
* <i>
|
||||||
|
* public void doRepair(ItemStack is, Entity e) {<br>
|
||||||
|
* if (AuraManager.decreaseClosestAura(e.worldObj,e.posX, e.posY, e.posZ, 1)) {<br>
|
||||||
|
* is.damageItem(-1,(EntityLiving) e);<br>
|
||||||
|
* }<br>
|
||||||
|
* }<br><br>
|
||||||
|
*</i>
|
||||||
|
*/
|
||||||
|
public interface IVisRepairable {
|
||||||
|
|
||||||
|
void doRepair(ItemStack stack, Entity e);
|
||||||
|
|
||||||
|
}
|
||||||
58
src/thaumcraft/api/ItemApi.java
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
package thaumcraft.api;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Azanor
|
||||||
|
*
|
||||||
|
* This is used to gain access to the items in my mod.
|
||||||
|
* I only give some examples and it will probably still
|
||||||
|
* require a bit of work for you to get hold of everything you need.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ItemApi {
|
||||||
|
|
||||||
|
public static ItemStack getItem(String itemString, int meta) {
|
||||||
|
ItemStack item = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
String itemClass = "thaumcraft.common.Config";
|
||||||
|
Object obj = Class.forName(itemClass).getField(itemString).get(null);
|
||||||
|
if (obj instanceof Item) {
|
||||||
|
item = new ItemStack((Item) obj,1,meta);
|
||||||
|
} else if (obj instanceof Block) {
|
||||||
|
item = new ItemStack((Block) obj,1,meta);
|
||||||
|
} else if (obj instanceof ItemStack) {
|
||||||
|
item = (ItemStack) obj;
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft] Could not retrieve item or block identified by: " + itemString);
|
||||||
|
}
|
||||||
|
|
||||||
|
return item;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Some examples
|
||||||
|
*
|
||||||
|
* Casting Wands:
|
||||||
|
* itemWandCastingApprentice, itemWandCastingAdept, itemWandCastingMage
|
||||||
|
*
|
||||||
|
* Elemental Wands:
|
||||||
|
* itemWandFire, itemWandLightning, itemWandFrost, itemWandTrade, itemWandExcavation, itemHellrod
|
||||||
|
*
|
||||||
|
* Resources:
|
||||||
|
* itemEssence, itemWispEssence, itemResource, itemShard, itemNugget,
|
||||||
|
* itemNuggetChicken, itemNuggetBeef, itemNuggetPork, itemTripleMeatTreat,
|
||||||
|
* blockWooden, blockMarker
|
||||||
|
*
|
||||||
|
* Research:
|
||||||
|
* itemResearchNotes, itemInkwell, itemThaumonomicon
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
171
src/thaumcraft/api/ObjectTags.java
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
package thaumcraft.api;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public class ObjectTags implements Serializable {
|
||||||
|
|
||||||
|
public Map<EnumTag,Integer> tags = new HashMap<EnumTag,Integer>();//aspects associated with this object
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* this creates a new aspect list with preloaded values based off the aspects of the given item.
|
||||||
|
* @param id the item/block id of an existing item
|
||||||
|
* @param meta the damage value of an existing item
|
||||||
|
*/
|
||||||
|
public ObjectTags(int id, int meta) {
|
||||||
|
ObjectTags temp = ThaumcraftApiHelper.getObjectTags(new ItemStack(id,1,meta));
|
||||||
|
if (temp!=null)
|
||||||
|
for (EnumTag tag:temp.getAspects()) {
|
||||||
|
add(tag,temp.getAmount(tag));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectTags() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return the amount of different aspects in this collection
|
||||||
|
*/
|
||||||
|
public int size() {
|
||||||
|
return tags.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return an array of all the aspects in this collection
|
||||||
|
*/
|
||||||
|
public EnumTag[] getAspects() {
|
||||||
|
EnumTag[] q = new EnumTag[1];
|
||||||
|
return tags.keySet().toArray(q);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return an array of all the aspects in this collection sorted by name
|
||||||
|
*/
|
||||||
|
public EnumTag[] getAspectsSorted() {
|
||||||
|
EnumTag[] out = tags.keySet().toArray(new EnumTag[1]);
|
||||||
|
boolean change=false;
|
||||||
|
do {
|
||||||
|
change=false;
|
||||||
|
for(int a=0;a<out.length-1;a++) {
|
||||||
|
EnumTag e1 = out[a];
|
||||||
|
EnumTag e2 = out[a+1];
|
||||||
|
if (e1!=null && e2!=null && e1.name.compareTo(e2.name)>0) {
|
||||||
|
out[a] = e2;
|
||||||
|
out[a+1] = e1;
|
||||||
|
change = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while (change==true);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return an array of all the aspects in this collection sorted by name
|
||||||
|
*/
|
||||||
|
public EnumTag[] getAspectsSortedAmount() {
|
||||||
|
EnumTag[] out = tags.keySet().toArray(new EnumTag[1]);
|
||||||
|
boolean change=false;
|
||||||
|
do {
|
||||||
|
change=false;
|
||||||
|
for(int a=0;a<out.length-1;a++) {
|
||||||
|
int e1 = getAmount(out[a]);
|
||||||
|
int e2 = getAmount(out[a+1]);
|
||||||
|
if (e1>0 && e2>0 && e2>e1) {
|
||||||
|
EnumTag ea = out[a];
|
||||||
|
EnumTag eb = out[a+1];
|
||||||
|
out[a] = eb;
|
||||||
|
out[a+1] = ea;
|
||||||
|
change = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while (change==true);
|
||||||
|
return out;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key
|
||||||
|
* @return the amount associated with the given aspect in this collection
|
||||||
|
*/
|
||||||
|
public int getAmount(EnumTag key) {
|
||||||
|
return tags.get(key)==null?0:tags.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reduces the amount of an aspect in this collection by the given amount.
|
||||||
|
* If reduced below 0 the aspect will be removed completely.
|
||||||
|
* @param key
|
||||||
|
* @param amount
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public boolean reduceAmount(EnumTag key, int amount) {
|
||||||
|
if (getAmount(key)>=amount) {
|
||||||
|
int am = getAmount(key)-amount;
|
||||||
|
if (am<=0) tags.remove(key); else
|
||||||
|
tags.put(key, am);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reduces the amount of an aspect in this collection by the given amount.
|
||||||
|
* If reduced below 0 the aspect will be removed completely.
|
||||||
|
* If the aspect does not exist then a negative value will be added.
|
||||||
|
* Only used by aura internals for flux management.
|
||||||
|
* @param key
|
||||||
|
* @param amount
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ObjectTags remove(EnumTag key, int amount) {
|
||||||
|
if (getAmount(key)>=amount) {
|
||||||
|
int am = getAmount(key)-amount;
|
||||||
|
if (am<=0) tags.remove(key); else
|
||||||
|
this.tags.put(key, am);
|
||||||
|
} else if (getAmount(key)==0) {
|
||||||
|
this.tags.put(key, -amount);
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds this aspect and amount to the collection.
|
||||||
|
* If the aspect exists then its value will be increased by the given amount.
|
||||||
|
* @param aspect
|
||||||
|
* @param amount
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ObjectTags add(EnumTag aspect, int amount) {
|
||||||
|
if (this.tags.containsKey(aspect)) {
|
||||||
|
int oldamount = this.tags.get(aspect);
|
||||||
|
amount+=oldamount;
|
||||||
|
}
|
||||||
|
this.tags.put( aspect, amount );
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adds this aspect and amount to the collection.
|
||||||
|
* If the aspect exists then only the highest of the old or new amount will be used.
|
||||||
|
* @param aspect
|
||||||
|
* @param amount
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public ObjectTags merge(EnumTag aspect, int amount) {
|
||||||
|
if (this.tags.containsKey(aspect)) {
|
||||||
|
int oldamount = this.tags.get(aspect);
|
||||||
|
if (amount<oldamount) amount=oldamount;
|
||||||
|
}
|
||||||
|
this.tags.put( aspect, amount );
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
817
src/thaumcraft/api/ThaumcraftApi.java
Normal file
@@ -0,0 +1,817 @@
|
|||||||
|
package thaumcraft.api;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.EnumArmorMaterial;
|
||||||
|
import net.minecraft.item.EnumToolMaterial;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.common.EnumHelper;
|
||||||
|
|
||||||
|
import org.w3c.dom.Document;
|
||||||
|
|
||||||
|
import thaumcraft.api.aura.AuraNode;
|
||||||
|
import thaumcraft.api.crafting.IArcaneRecipe;
|
||||||
|
import thaumcraft.api.crafting.IInfusionRecipe;
|
||||||
|
import thaumcraft.api.crafting.RecipeCrucible;
|
||||||
|
import thaumcraft.api.crafting.ShapedArcaneCraftingRecipes;
|
||||||
|
import thaumcraft.api.crafting.ShapedInfusionCraftingRecipes;
|
||||||
|
import thaumcraft.api.crafting.ShapelessArcaneCraftingRecipes;
|
||||||
|
import thaumcraft.api.crafting.ShapelessInfusionCraftingRecipes;
|
||||||
|
import thaumcraft.api.research.IScanEventHandler;
|
||||||
|
import thaumcraft.api.research.ResearchList;
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
import cpw.mods.fml.common.Mod;
|
||||||
|
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Azanor
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* IMPORTANT: If you are adding your own aspects to items it is a good idea to do it AFTER Thaumcraft adds its aspects, otherwise odd things may happen.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ThaumcraftApi {
|
||||||
|
|
||||||
|
//Materials
|
||||||
|
public static EnumToolMaterial toolMatThaumium = EnumHelper.addToolMaterial("THAUMIUM", 3, 400, 7F, 2, 22);
|
||||||
|
public static EnumToolMaterial toolMatElemental = EnumHelper.addToolMaterial("THAUMIUM_ELEMENTAL", 3, 1500, 10F, 3, 18);
|
||||||
|
public static EnumArmorMaterial armorMatThaumium = EnumHelper.addArmorMaterial("THAUMIUM", 25, new int[] { 2, 6, 5, 2 }, 25);
|
||||||
|
public static EnumArmorMaterial armorMatSpecial = EnumHelper.addArmorMaterial("SPECIAL", 25, new int[] { 1, 3, 2, 1 }, 25);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//Miscellaneous
|
||||||
|
/**
|
||||||
|
* Portable Hole Block-id Blacklist.
|
||||||
|
* Simply add the block-id's of blocks you don't want the portable hole to go through.
|
||||||
|
*/
|
||||||
|
public static ArrayList<Integer> portableHoleBlackList = new ArrayList<Integer>();
|
||||||
|
|
||||||
|
|
||||||
|
//RESEARCH/////////////////////////////////////////
|
||||||
|
public static Document researchDoc = null;
|
||||||
|
public static ArrayList<String> apiResearchFiles = new ArrayList<String>();
|
||||||
|
public static ArrayList<IScanEventHandler> scanEventhandlers = new ArrayList<IScanEventHandler>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to add your own xml files that the research system will check of recipes and descriptions of custom research
|
||||||
|
* @param resourceLoc The xml file. For example The default file used by TC is
|
||||||
|
* "/thaumcraft/resources/research.xml"
|
||||||
|
*/
|
||||||
|
public static void registerResearchXML(String resourceLoc) {
|
||||||
|
if (!apiResearchFiles.contains(resourceLoc)) apiResearchFiles.add(resourceLoc);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void registerScanEventhandler(IScanEventHandler scanEventHandler) {
|
||||||
|
scanEventhandlers.add(scanEventHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
//RECIPES/////////////////////////////////////////
|
||||||
|
private static ArrayList crucibleRecipes = new ArrayList();
|
||||||
|
private static List craftingRecipes = new ArrayList();
|
||||||
|
private static HashMap<List,ItemStack> smeltingBonus = new HashMap<List,ItemStack>();
|
||||||
|
private static ArrayList<List> smeltingBonusExlusion = new ArrayList<List>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This method is used to determine what bonus items are generated when the infernal furnace smelts items
|
||||||
|
* @param in The result (not input) of the smelting operation. e.g. new ItemStack(ingotGold)
|
||||||
|
* @param out The bonus item that can be produced from the smelting operation e.g. new ItemStack(nuggetGold,0,0).
|
||||||
|
* Stacksize should be 0 unless you want to guarantee that at least 1 item is always produced.
|
||||||
|
*/
|
||||||
|
public static void addSmeltingBonus(ItemStack in, ItemStack out) {
|
||||||
|
smeltingBonus.put(
|
||||||
|
Arrays.asList(in.itemID,in.getItemDamage()),
|
||||||
|
new ItemStack(out.itemID,0,out.getItemDamage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the bonus item produced from a smelting operation in the infernal furnace
|
||||||
|
* @param in The result of the smelting operation. e.g. new ItemStack(ingotGold)
|
||||||
|
* @return the The bonus item that can be produced
|
||||||
|
*/
|
||||||
|
public static ItemStack getSmeltingBonus(ItemStack in) {
|
||||||
|
return smeltingBonus.get(Arrays.asList(in.itemID,in.getItemDamage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Excludes specific items from producing bonus items when they are smelted in the infernal furnace, even
|
||||||
|
* if their smelt result would normally produce a bonus item.
|
||||||
|
* @param in The item to be smelted that should never produce a bonus item (e.g. the various macerated dusts form IC2)
|
||||||
|
* Even though they produce gold, iron, etc. ingots, they should NOT produce bonus nuggets as well.
|
||||||
|
*/
|
||||||
|
public static void addSmeltingBonusExclusion(ItemStack in) {
|
||||||
|
smeltingBonusExlusion.add(Arrays.asList(in.itemID,in.getItemDamage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sees if an item is allowed to produce bonus items when smelted in the infernal furnace
|
||||||
|
* @param in The item you wish to check
|
||||||
|
* @return true or false
|
||||||
|
*/
|
||||||
|
public static boolean isSmeltingBonusExluded(ItemStack in) {
|
||||||
|
return smeltingBonusExlusion.contains(Arrays.asList(in.itemID,in.getItemDamage()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static List getCraftingRecipes() {
|
||||||
|
return craftingRecipes;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* NOTE:
|
||||||
|
* All arcane and infusion crafting recipes are NBT sensitive.
|
||||||
|
* Simply add as much nbt data to the crafting ingredient itemstacks as you wish
|
||||||
|
* to match with the actual input items. For example this recipe will turn a warded
|
||||||
|
* jar filled with crystal essentia into a stack of diamonds:
|
||||||
|
*
|
||||||
|
* ItemStack is = new ItemStack(itemJarFilled);
|
||||||
|
* is.setTagInfo("tag", new NBTTagByte("tag", (byte) EnumTag.CRYSTAL.id));
|
||||||
|
* is.setTagInfo("amount", new NBTTagByte("amount", (byte) 64));
|
||||||
|
* ThaumcraftApi.addShapelessArcaneCraftingRecipe("THEJARISNOWDIAMONDS", 50,
|
||||||
|
* new ItemStack(Item.diamond,64,0), new Object[] { is });
|
||||||
|
*
|
||||||
|
* If no tag was added for "amount" then the jar would simply have had to contain any
|
||||||
|
* amount of crystal essentia.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key the research key required for this recipe to work. Leave blank if it will work without research
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param par1ItemStack the recipe output
|
||||||
|
* @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes
|
||||||
|
*/
|
||||||
|
public static void addArcaneCraftingRecipe(String key, int cost, ItemStack par1ItemStack, Object ... par2ArrayOfObj)
|
||||||
|
{
|
||||||
|
String var3 = "";
|
||||||
|
int var4 = 0;
|
||||||
|
int var5 = 0;
|
||||||
|
int var6 = 0;
|
||||||
|
int var9;
|
||||||
|
|
||||||
|
if (par2ArrayOfObj[var4] instanceof String[])
|
||||||
|
{
|
||||||
|
String[] var7 = (String[])((String[])par2ArrayOfObj[var4++]);
|
||||||
|
String[] var8 = var7;
|
||||||
|
var9 = var7.length;
|
||||||
|
|
||||||
|
for (int var10 = 0; var10 < var9; ++var10)
|
||||||
|
{
|
||||||
|
String var11 = var8[var10];
|
||||||
|
++var6;
|
||||||
|
var5 = var11.length();
|
||||||
|
var3 = var3 + var11;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (par2ArrayOfObj[var4] instanceof String)
|
||||||
|
{
|
||||||
|
String var13 = (String)par2ArrayOfObj[var4++];
|
||||||
|
++var6;
|
||||||
|
var5 = var13.length();
|
||||||
|
var3 = var3 + var13;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HashMap var14;
|
||||||
|
|
||||||
|
for (var14 = new HashMap(); var4 < par2ArrayOfObj.length; var4 += 2)
|
||||||
|
{
|
||||||
|
Character var16 = (Character)par2ArrayOfObj[var4];
|
||||||
|
ItemStack var17 = null;
|
||||||
|
|
||||||
|
if (par2ArrayOfObj[var4 + 1] instanceof Item)
|
||||||
|
{
|
||||||
|
var17 = new ItemStack((Item)par2ArrayOfObj[var4 + 1]);
|
||||||
|
}
|
||||||
|
else if (par2ArrayOfObj[var4 + 1] instanceof Block)
|
||||||
|
{
|
||||||
|
var17 = new ItemStack((Block)par2ArrayOfObj[var4 + 1], 1, -1);
|
||||||
|
}
|
||||||
|
else if (par2ArrayOfObj[var4 + 1] instanceof ItemStack)
|
||||||
|
{
|
||||||
|
var17 = (ItemStack)par2ArrayOfObj[var4 + 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
var14.put(var16, var17);
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack[] var15 = new ItemStack[var5 * var6];
|
||||||
|
|
||||||
|
for (var9 = 0; var9 < var5 * var6; ++var9)
|
||||||
|
{
|
||||||
|
char var18 = var3.charAt(var9);
|
||||||
|
|
||||||
|
if (var14.containsKey(Character.valueOf(var18)))
|
||||||
|
{
|
||||||
|
var15[var9] = ((ItemStack)var14.get(Character.valueOf(var18))).copy();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var15[var9] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
craftingRecipes.add(new ShapedArcaneCraftingRecipes(key, var5, var6, var15, par1ItemStack,cost));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key the research key required for this recipe to work. Leave blank if it will work without research
|
||||||
|
* @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param par1ItemStack the recipe output
|
||||||
|
* @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes
|
||||||
|
*/
|
||||||
|
public static void addArcaneCraftingRecipe(String key, String recipeKey, int cost, ItemStack par1ItemStack, Object ... par2ArrayOfObj) {
|
||||||
|
addArcaneCraftingRecipe(key,cost,par1ItemStack,par2ArrayOfObj);
|
||||||
|
ResearchList.craftingRecipesForResearch.put(recipeKey, Arrays.asList(getCraftingRecipes().size()-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key the research key required for this recipe to work. Leave blank if it will work without research
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param par1ItemStack the recipe output
|
||||||
|
* @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes
|
||||||
|
*/
|
||||||
|
public static void addShapelessArcaneCraftingRecipe(String key, int cost, ItemStack par1ItemStack, Object ... par2ArrayOfObj)
|
||||||
|
{
|
||||||
|
ArrayList var3 = new ArrayList();
|
||||||
|
Object[] var4 = par2ArrayOfObj;
|
||||||
|
int var5 = par2ArrayOfObj.length;
|
||||||
|
|
||||||
|
for (int var6 = 0; var6 < var5; ++var6)
|
||||||
|
{
|
||||||
|
Object var7 = var4[var6];
|
||||||
|
|
||||||
|
if (var7 instanceof ItemStack)
|
||||||
|
{
|
||||||
|
var3.add(((ItemStack)var7).copy());
|
||||||
|
}
|
||||||
|
else if (var7 instanceof Item)
|
||||||
|
{
|
||||||
|
var3.add(new ItemStack((Item)var7));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!(var7 instanceof Block))
|
||||||
|
{
|
||||||
|
throw new RuntimeException("Invalid shapeless recipe!");
|
||||||
|
}
|
||||||
|
|
||||||
|
var3.add(new ItemStack((Block)var7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
craftingRecipes.add(new ShapelessArcaneCraftingRecipes(key, par1ItemStack, var3, cost));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key the research key required for this recipe to work. Leave blank if it will work without research
|
||||||
|
* @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param par1ItemStack the recipe output
|
||||||
|
* @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes
|
||||||
|
*/
|
||||||
|
public static void addShapelessArcaneCraftingRecipe(String key, String recipeKey, int cost, ItemStack par1ItemStack, Object ... par2ArrayOfObj) {
|
||||||
|
addShapelessArcaneCraftingRecipe(key,cost,par1ItemStack,par2ArrayOfObj);
|
||||||
|
ResearchList.craftingRecipesForResearch.put(recipeKey, Arrays.asList(getCraftingRecipes().size()-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key the research key required for this recipe to work. Leave blank if it will work without research
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects should be used in a recipe.
|
||||||
|
* @param par1ItemStack the recipe output
|
||||||
|
* @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes
|
||||||
|
*/
|
||||||
|
public static void addInfusionCraftingRecipe(String key, int cost, ObjectTags tags, ItemStack par1ItemStack, Object ... par2ArrayOfObj)
|
||||||
|
{
|
||||||
|
String var3 = "";
|
||||||
|
int var4 = 0;
|
||||||
|
int var5 = 0;
|
||||||
|
int var6 = 0;
|
||||||
|
int var9;
|
||||||
|
|
||||||
|
if (par2ArrayOfObj[var4] instanceof String[])
|
||||||
|
{
|
||||||
|
String[] var7 = (String[])((String[])par2ArrayOfObj[var4++]);
|
||||||
|
String[] var8 = var7;
|
||||||
|
var9 = var7.length;
|
||||||
|
|
||||||
|
for (int var10 = 0; var10 < var9; ++var10)
|
||||||
|
{
|
||||||
|
String var11 = var8[var10];
|
||||||
|
++var6;
|
||||||
|
var5 = var11.length();
|
||||||
|
var3 = var3 + var11;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while (par2ArrayOfObj[var4] instanceof String)
|
||||||
|
{
|
||||||
|
String var13 = (String)par2ArrayOfObj[var4++];
|
||||||
|
++var6;
|
||||||
|
var5 = var13.length();
|
||||||
|
var3 = var3 + var13;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
HashMap var14;
|
||||||
|
|
||||||
|
for (var14 = new HashMap(); var4 < par2ArrayOfObj.length; var4 += 2)
|
||||||
|
{
|
||||||
|
Character var16 = (Character)par2ArrayOfObj[var4];
|
||||||
|
ItemStack var17 = null;
|
||||||
|
|
||||||
|
if (par2ArrayOfObj[var4 + 1] instanceof Item)
|
||||||
|
{
|
||||||
|
var17 = new ItemStack((Item)par2ArrayOfObj[var4 + 1]);
|
||||||
|
}
|
||||||
|
else if (par2ArrayOfObj[var4 + 1] instanceof Block)
|
||||||
|
{
|
||||||
|
var17 = new ItemStack((Block)par2ArrayOfObj[var4 + 1], 1, -1);
|
||||||
|
}
|
||||||
|
else if (par2ArrayOfObj[var4 + 1] instanceof ItemStack)
|
||||||
|
{
|
||||||
|
var17 = (ItemStack)par2ArrayOfObj[var4 + 1];
|
||||||
|
}
|
||||||
|
|
||||||
|
var14.put(var16, var17);
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack[] var15 = new ItemStack[var5 * var6];
|
||||||
|
|
||||||
|
for (var9 = 0; var9 < var5 * var6; ++var9)
|
||||||
|
{
|
||||||
|
char var18 = var3.charAt(var9);
|
||||||
|
|
||||||
|
if (var14.containsKey(Character.valueOf(var18)))
|
||||||
|
{
|
||||||
|
var15[var9] = ((ItemStack)var14.get(Character.valueOf(var18))).copy();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var15[var9] = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
craftingRecipes.add(new ShapedInfusionCraftingRecipes(key, var5, var6, var15, par1ItemStack,cost,tags));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recipe is NBT sensitive
|
||||||
|
* @param key the research key required for this recipe to work. Leave blank if it will work without research
|
||||||
|
* @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects should be used in a recipe.
|
||||||
|
* @param par1ItemStack the recipe output
|
||||||
|
* @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla recipes
|
||||||
|
*/
|
||||||
|
public static void addInfusionCraftingRecipe(String key, String recipeKey, int cost, ObjectTags tags, ItemStack par1ItemStack, Object ... par2ArrayOfObj) {
|
||||||
|
addInfusionCraftingRecipe(key, cost, tags, par1ItemStack, par2ArrayOfObj);
|
||||||
|
ResearchList.craftingRecipesForResearch.put(recipeKey, Arrays.asList(getCraftingRecipes().size()-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recipe is NBT sensitive
|
||||||
|
* @param key the research key required for this recipe to work. Leave blank if it will work without research
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects should be used in a recipe.
|
||||||
|
* @param par1ItemStack the recipe output
|
||||||
|
* @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes
|
||||||
|
*/
|
||||||
|
public static void addShapelessInfusionCraftingRecipe(String key, int cost, ObjectTags tags, ItemStack par1ItemStack, Object ... par2ArrayOfObj)
|
||||||
|
{
|
||||||
|
ArrayList var3 = new ArrayList();
|
||||||
|
Object[] var4 = par2ArrayOfObj;
|
||||||
|
int var5 = par2ArrayOfObj.length;
|
||||||
|
|
||||||
|
for (int var6 = 0; var6 < var5; ++var6)
|
||||||
|
{
|
||||||
|
Object var7 = var4[var6];
|
||||||
|
|
||||||
|
if (var7 instanceof ItemStack)
|
||||||
|
{
|
||||||
|
var3.add(((ItemStack)var7).copy());
|
||||||
|
}
|
||||||
|
else if (var7 instanceof Item)
|
||||||
|
{
|
||||||
|
var3.add(new ItemStack((Item)var7));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!(var7 instanceof Block))
|
||||||
|
{
|
||||||
|
throw new RuntimeException("Invalid shapeless recipe!");
|
||||||
|
}
|
||||||
|
|
||||||
|
var3.add(new ItemStack((Block)var7));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
craftingRecipes.add(new ShapelessInfusionCraftingRecipes(key, par1ItemStack, var3, cost,tags));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Recipe is NBT sensitive
|
||||||
|
* @param key the research key required for this recipe to work. Leave blank if it will work without research
|
||||||
|
* @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param tags ObjectTags list of required aspects and their amounts. No more than 5 aspects should be used in a recipe.
|
||||||
|
* @param par1ItemStack the recipe output
|
||||||
|
* @param par2ArrayOfObj the recipe. Format is exactly the same as vanilla shapeless recipes
|
||||||
|
*/
|
||||||
|
public static void addShapelessInfusionCraftingRecipe(String key, String recipeKey, int cost, ObjectTags tags, ItemStack par1ItemStack, Object ... par2ArrayOfObj) {
|
||||||
|
addShapelessInfusionCraftingRecipe(key, cost, tags, par1ItemStack, par2ArrayOfObj);
|
||||||
|
ResearchList.craftingRecipesForResearch.put(recipeKey, Arrays.asList(getCraftingRecipes().size()-1));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key the research key required for this recipe to work. Unlike the arcane crafting and infusion crafting
|
||||||
|
* recipes a recipe key is automatically created using the same key.
|
||||||
|
* See method below if the research and recipes keys do not match
|
||||||
|
* @param result the output result
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param tags the aspects required to craft this
|
||||||
|
*/
|
||||||
|
public static void addCrucibleRecipe(String key, ItemStack result, int cost, ObjectTags tags) {
|
||||||
|
getCrucibleRecipes().add(new RecipeCrucible(key, result, tags, cost));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key the research key required for this recipe to work.
|
||||||
|
* @param recipeKey a string value of the key used in your research.xml for this recipe to display in the thaumonomicon
|
||||||
|
* @param result the output result
|
||||||
|
* @param cost the vis cost
|
||||||
|
* @param tags the aspects required to craft this
|
||||||
|
*/
|
||||||
|
public static void addCrucibleRecipe(String key, String recipeKey, ItemStack result, int cost, ObjectTags tags) {
|
||||||
|
getCrucibleRecipes().add(new RecipeCrucible(key, recipeKey, result, tags, cost));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key the recipe key (NOT research key)
|
||||||
|
* @return the recipe
|
||||||
|
*/
|
||||||
|
public static RecipeCrucible getCrucibleRecipe(String key) {
|
||||||
|
for (Object r:getCrucibleRecipes()) {
|
||||||
|
if (r instanceof RecipeCrucible) {
|
||||||
|
if (((RecipeCrucible)r).key.equals(key))
|
||||||
|
return (RecipeCrucible)r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param stack the recipe result
|
||||||
|
* @return the recipe
|
||||||
|
*/
|
||||||
|
public static RecipeCrucible getCrucibleRecipe(ItemStack stack) {
|
||||||
|
for (Object r:getCrucibleRecipes()) {
|
||||||
|
if (r instanceof RecipeCrucible) {
|
||||||
|
if (((RecipeCrucible)r).recipeOutput.isItemEqual(stack))
|
||||||
|
return (RecipeCrucible)r;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param stack the item
|
||||||
|
* @return the thaumcraft recipe key that produces that item. Used by the thaumonomicon drilldown feature.
|
||||||
|
*/
|
||||||
|
public static String getCraftingRecipeKey(ItemStack stack) {
|
||||||
|
for (Object r:getCraftingRecipes()) {
|
||||||
|
if (r instanceof IArcaneRecipe) {
|
||||||
|
if (ThaumcraftApiHelper.areItemsEqual(stack,((IArcaneRecipe)r).getRecipeOutput()))
|
||||||
|
return ((IArcaneRecipe)r).getKey();
|
||||||
|
}
|
||||||
|
if (r instanceof IInfusionRecipe) {
|
||||||
|
if (ThaumcraftApiHelper.areItemsEqual(stack,((IInfusionRecipe)r).getRecipeOutput()))
|
||||||
|
return ((IInfusionRecipe)r).getKey();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
//TAGS////////////////////////////////////////
|
||||||
|
|
||||||
|
public static Map<List,ObjectTags> objectTags = new HashMap<List,ObjectTags>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks to see if the passed item/block already has aspects associated with it.
|
||||||
|
* @param id
|
||||||
|
* @param meta
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean exists(int id, int meta) {
|
||||||
|
ObjectTags tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id,meta));
|
||||||
|
if (tmp==null) {
|
||||||
|
tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id,-1));
|
||||||
|
if (meta==-1 && tmp==null) {
|
||||||
|
int index=0;
|
||||||
|
do {
|
||||||
|
tmp = ThaumcraftApi.objectTags.get(Arrays.asList(id,index));
|
||||||
|
index++;
|
||||||
|
} while (index<16 && tmp==null);
|
||||||
|
}
|
||||||
|
if (tmp==null) return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to assign apsects to the given item/block. Here is an example of the declaration for cobblestone:<p>
|
||||||
|
* <i>ThaumcraftApi.registerObjectTag(Block.cobblestone.blockID, -1, (new ObjectTags()).add(EnumTag.ROCK, 1).add(EnumTag.DESTRUCTION, 1));</i>
|
||||||
|
* @param id
|
||||||
|
* @param meta pass -1 if all damage values of this item/block should have the same aspects
|
||||||
|
* @param aspects A ObjectTags object of the associated aspects
|
||||||
|
*/
|
||||||
|
public static void registerObjectTag(int id, int meta, ObjectTags aspects) {
|
||||||
|
aspects = ThaumcraftApiHelper.cullTags(aspects);
|
||||||
|
objectTags.put(Arrays.asList(id,meta), aspects);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to assign aspects to the given item/block.
|
||||||
|
* Attempts to automatically generate aspect tags by checking registered recipes.
|
||||||
|
* Here is an example of the declaration for pistons:<p>
|
||||||
|
* <i>ThaumcraftApi.registerComplexObjectTag(Block.pistonBase.blockID, 0, (new ObjectTags()).add(EnumTag.MECHANISM, 2).add(EnumTag.MOTION, 4));</i>
|
||||||
|
* @param id
|
||||||
|
* @param meta pass -1 if all damage values of this item/block should have the same aspects
|
||||||
|
* @param aspects A ObjectTags object of the associated aspects
|
||||||
|
*/
|
||||||
|
public static void registerComplexObjectTag(int id, int meta, ObjectTags aspects ) {
|
||||||
|
if (!exists(id,meta)) {
|
||||||
|
ObjectTags tmp = ThaumcraftApiHelper.generateTags(id, meta);
|
||||||
|
if (tmp != null && tmp.size()>0) {
|
||||||
|
for(EnumTag tag:tmp.getAspects()) {
|
||||||
|
aspects.add(tag, tmp.getAmount(tag));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
registerObjectTag(id,meta,aspects);
|
||||||
|
} else {
|
||||||
|
ObjectTags tmp = ThaumcraftApiHelper.getObjectTags(new ItemStack(id,1,meta));
|
||||||
|
for(EnumTag tag:aspects.getAspects()) {
|
||||||
|
tmp.merge(tag, tmp.getAmount(tag));
|
||||||
|
}
|
||||||
|
registerObjectTag(id,meta,tmp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ArrayList getCrucibleRecipes() {
|
||||||
|
return crucibleRecipes;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//AURAS//////////////////////////////////////////////////
|
||||||
|
|
||||||
|
private static Method addFluxToClosest;
|
||||||
|
/**
|
||||||
|
* Adds flux to the node closest to the given location
|
||||||
|
* @param world
|
||||||
|
* @param x
|
||||||
|
* @param y
|
||||||
|
* @param z
|
||||||
|
* @param tags ObjectTags list of all the EnumTags and amounts of flux to add.
|
||||||
|
*/
|
||||||
|
public static void addFluxToClosest(World world, float x, float y, float z, ObjectTags tags) {
|
||||||
|
try {
|
||||||
|
if(addFluxToClosest == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.aura.AuraManager");
|
||||||
|
addFluxToClosest = fake.getMethod("addFluxToClosest", World.class, float.class, float.class, float.class, ObjectTags.class);
|
||||||
|
}
|
||||||
|
addFluxToClosest.invoke(null, world,x,y,z,tags);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method addFluxToClosest");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Method decreaseClosestAura;
|
||||||
|
/**
|
||||||
|
* Removes an amount of vis from the aura node closest to the given location
|
||||||
|
* @param world
|
||||||
|
* @param x
|
||||||
|
* @param y
|
||||||
|
* @param z
|
||||||
|
* @param amount The amount of vis to remove
|
||||||
|
* @param doit If set to false it will merely perform a check to see if there is enough vis to perform the operation.
|
||||||
|
* If set to true it will actually decrease the vis as well.
|
||||||
|
* @return It will return true if there was enough vis to perform this operation
|
||||||
|
*/
|
||||||
|
public static boolean decreaseClosestAura(World world, double x, double y, double z, int amount, boolean doit) {
|
||||||
|
boolean ret=false;
|
||||||
|
try {
|
||||||
|
if(decreaseClosestAura == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.aura.AuraManager");
|
||||||
|
decreaseClosestAura = fake.getMethod("decreaseClosestAura", World.class, double.class, double.class, double.class, int.class, boolean.class);
|
||||||
|
}
|
||||||
|
ret = (Boolean) decreaseClosestAura.invoke(null, world,x,y,z,amount,doit);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method decreaseClosestAura");
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Method increaseLowestAura;
|
||||||
|
/**
|
||||||
|
* Increases the lowest aura near the given location.
|
||||||
|
* @param world
|
||||||
|
* @param x
|
||||||
|
* @param y
|
||||||
|
* @param z
|
||||||
|
* @param amount
|
||||||
|
* @return it will return true if the operation was a success
|
||||||
|
*/
|
||||||
|
public static boolean increaseLowestAura(World world, double x, double y, double z, int amount) {
|
||||||
|
boolean ret=false;
|
||||||
|
try {
|
||||||
|
if(increaseLowestAura == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.aura.AuraManager");
|
||||||
|
increaseLowestAura = fake.getMethod("increaseLowestAura", World.class, double.class, double.class, double.class, int.class);
|
||||||
|
}
|
||||||
|
ret = (Boolean) increaseLowestAura.invoke(null, world,x,y,z,amount);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method increaseLowestAura");
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Method getClosestAuraWithinRange;
|
||||||
|
/**
|
||||||
|
* Gets the id of the closest aura node within range of the given coordinates. Only checks loaded chunks
|
||||||
|
* @param world
|
||||||
|
* @param x
|
||||||
|
* @param y
|
||||||
|
* @param z
|
||||||
|
* @param range distance (in blocks) to check
|
||||||
|
* @return returns -1 if no aura is found, otherwise returns the aura node id.
|
||||||
|
*/
|
||||||
|
public static int getClosestAuraWithinRange(World world, double x, double y, double z, double range) {
|
||||||
|
int ret=-1;
|
||||||
|
try {
|
||||||
|
if(getClosestAuraWithinRange == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.aura.AuraManager");
|
||||||
|
getClosestAuraWithinRange = fake.getMethod("getClosestAuraWithinRange", World.class, double.class, double.class, double.class, double.class);
|
||||||
|
}
|
||||||
|
ret = (Integer) getClosestAuraWithinRange.invoke(null, world,x,y,z,range);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method getClosestAuraWithinRange");
|
||||||
|
}
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Method getNodeCopy;
|
||||||
|
/**
|
||||||
|
* Gets an copy of the AuraNode object for the given node
|
||||||
|
* @param nodeId the int key of the aura node
|
||||||
|
* @return returns a COPY of the auranode object, not the object itself.
|
||||||
|
* Auranode values should only be altered via queNodeChanges - NEVER directly
|
||||||
|
*/
|
||||||
|
public static AuraNode getNodeCopy(int nodeId) {
|
||||||
|
AuraNode node = null;
|
||||||
|
try {
|
||||||
|
if(getNodeCopy == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.aura.AuraManager");
|
||||||
|
getNodeCopy = fake.getMethod("getNodeCopy", int.class);
|
||||||
|
}
|
||||||
|
node = (AuraNode) getNodeCopy.invoke(null, nodeId);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method getNodeCopy");
|
||||||
|
}
|
||||||
|
return node;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Method queueNodeChanges;
|
||||||
|
/**
|
||||||
|
* This method is used to alter the values of aura nodes. The changes specified are placed in a queue for processing by
|
||||||
|
* the aura thread.<br>
|
||||||
|
*
|
||||||
|
* For example:<br>
|
||||||
|
* queNodeChanges(55,8,0,false,null,0,0,0); //will increase node 55's current vis by 8<br>
|
||||||
|
* queNodeChanges(55,0,0,false,new ObjectTags().remove(EnumTag.FIRE,3),0,0,0); //will reduce node 55's FIRE flux levels by 3<br>
|
||||||
|
* queNodeChanges(55,11,11,false,null,0,.5f,0); //will increase node 55's current and base level by 11 and increase its y pos by .5f<br>
|
||||||
|
*
|
||||||
|
* @param nodeId
|
||||||
|
* @param levelMod the amount by which the auras vis level should be changed (positive or negative)
|
||||||
|
* @param baseMod the amount by which the auras max vis level should be changed (positive or negative)
|
||||||
|
* @param toggleLock if set to true the nodes lock state will toggle to its opposite value. Currently doesn't do much
|
||||||
|
* @param flx a ObjectTags collection of the all the flux to add (if positive) or remove (if negative) to the node
|
||||||
|
* @param x by how much the nodes x position should be altered. Should usually be less than 1
|
||||||
|
* @param y by how much the nodes y position should be altered. Should usually be less than 1
|
||||||
|
* @param z by how much the nodes z position should be altered. Should usually be less than 1
|
||||||
|
*/
|
||||||
|
public static void queueNodeChanges(int nodeId, int levelMod, int baseMod, boolean toggleLock, ObjectTags flux,
|
||||||
|
float x,float y,float z) {
|
||||||
|
try {
|
||||||
|
if(queueNodeChanges == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.aura.AuraManager");
|
||||||
|
queueNodeChanges = fake.getMethod("queueNodeChanges",
|
||||||
|
int.class, int.class, int.class, boolean.class, ObjectTags.class, float.class, float.class, float.class);
|
||||||
|
}
|
||||||
|
queueNodeChanges.invoke(null, nodeId, levelMod, baseMod, toggleLock, flux, x, y, z);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.aura.AuraManager method queueNodeChanges");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//BIOMES//////////////////////////////////////////////////
|
||||||
|
@Deprecated
|
||||||
|
public static HashMap<Integer,List> biomeInfo = new HashMap<Integer,List>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Registers custom biomes with thaumcraft
|
||||||
|
* @Deprecated I will be switching over the the forge BiomeDictionary system in the future so any mods that add biomes should just make sure they are tagged correctly
|
||||||
|
* @param biomeID The id of the biome
|
||||||
|
* @param visLevel The average vis level of nodes generated in this biome
|
||||||
|
* @param tag The EnumTag associated with this biome (used to determine infused ore spawns among other things)
|
||||||
|
* @param greatwood Does this biome support greatwood trees
|
||||||
|
* @param silverwood Does this biome support silverwood trees
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public static void registerBiomeInfo(int biomeID, int visLevel, EnumTag tag, boolean greatwood, boolean silverwood) {
|
||||||
|
biomeInfo.put(biomeID, Arrays.asList(visLevel, tag, greatwood, silverwood));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static int getBiomeAura(int biomeId) {
|
||||||
|
try {
|
||||||
|
return (Integer) biomeInfo.get(biomeId).get(0);
|
||||||
|
} catch (Exception e) {}
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static EnumTag getBiomeTag(int biomeId) {
|
||||||
|
try {
|
||||||
|
return (EnumTag) biomeInfo.get(biomeId).get(1);
|
||||||
|
} catch (Exception e) {}
|
||||||
|
return EnumTag.UNKNOWN;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static boolean getBiomeSupportsGreatwood(int biomeId) {
|
||||||
|
try {
|
||||||
|
return (Boolean) biomeInfo.get(biomeId).get(2);
|
||||||
|
} catch (Exception e) {}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static boolean getBiomeSupportsSilverwood(int biomeId) {
|
||||||
|
try {
|
||||||
|
return (Boolean) biomeInfo.get(biomeId).get(3);
|
||||||
|
} catch (Exception e) {}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//CROPS //////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To define mod crops you need to use FMLInterModComms in your @Mod.Init method.
|
||||||
|
* There are two 'types' of crops you can add. Standard crops and clickable crops.
|
||||||
|
*
|
||||||
|
* Standard crops work like normal vanilla crops - they grow until a certain metadata
|
||||||
|
* value is reached and you harvest them by destroying the block and collecting the blocks.
|
||||||
|
* You need to create and ItemStack that tells the golem what block id and metadata represents
|
||||||
|
* the crop when fully grown.
|
||||||
|
* Example for vanilla wheat:
|
||||||
|
* FMLInterModComms.sendMessage("Thaumcraft", "harvestStandardCrop", new ItemStack(Block.crops,1,7));
|
||||||
|
*
|
||||||
|
* Clickable crops are crops that you right click to gather their bounty instead of destroying them.
|
||||||
|
* As for standard crops, you need to create and ItemStack that tells the golem what block id
|
||||||
|
* and metadata represents the crop when fully grown. The golem will trigger the blocks onBlockActivated method.
|
||||||
|
* Example (this will technically do nothing since clicking wheat does nothing, but you get the idea):
|
||||||
|
* FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(Block.crops,1,7));
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static HashMap<Integer,Integer> crops = new HashMap<Integer,Integer>();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This is used to add mod crops to the list of crops harvested by golems
|
||||||
|
* that do not use the standard crop growth pattern<br>
|
||||||
|
* (i.e. being an instance of BlockCrops and being fully grown at meta 7).<br>
|
||||||
|
* Only seeds implementing IPlantable will be replanted.
|
||||||
|
* @param blockID the block id of the crop
|
||||||
|
* @param grownMeta the metadata value when the crop is considered fully grown.
|
||||||
|
* The block with this id and meta will be the one the golem breaks.
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
public static void addHarvestableCrop(int blockID, int grownMeta) {
|
||||||
|
crops.put(blockID, grownMeta);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
103
src/thaumcraft/api/ThaumcraftApiHelper.java
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
package thaumcraft.api;
|
||||||
|
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
|
||||||
|
public class ThaumcraftApiHelper {
|
||||||
|
public static ObjectTags cullTags(ObjectTags temp) {
|
||||||
|
while (temp!=null && temp.size()>5) {
|
||||||
|
EnumTag lowest = null;
|
||||||
|
int low = Integer.MAX_VALUE;
|
||||||
|
for (EnumTag tag:temp.getAspects()) {
|
||||||
|
if (temp.getAmount(tag)<low) {
|
||||||
|
low = temp.getAmount(tag);
|
||||||
|
lowest = tag;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
temp.tags.remove(lowest);
|
||||||
|
}
|
||||||
|
return temp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean areItemsEqual(ItemStack s1,ItemStack s2)
|
||||||
|
{
|
||||||
|
if (s1.isItemStackDamageable() && s2.isItemStackDamageable())
|
||||||
|
{
|
||||||
|
return s1.itemID == s2.itemID;
|
||||||
|
} else
|
||||||
|
return s1.itemID == s2.itemID && s1.getItemDamage() == s2.getItemDamage();
|
||||||
|
}
|
||||||
|
|
||||||
|
static Method isResearchComplete;
|
||||||
|
static Method getObjectTags;
|
||||||
|
static Method getBonusTags;
|
||||||
|
static Method generateTags;
|
||||||
|
public static boolean isResearchComplete(String username, String researchkey) {
|
||||||
|
boolean ot = false;
|
||||||
|
try {
|
||||||
|
if(isResearchComplete == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.research.ResearchManager");
|
||||||
|
isResearchComplete = fake.getMethod("isResearchComplete", String.class, String.class);
|
||||||
|
}
|
||||||
|
ot = (Boolean) isResearchComplete.invoke(null, username, researchkey);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.research.ResearchManager method isResearchComplete");
|
||||||
|
}
|
||||||
|
return ot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack getStackInRowAndColumn(Object instance, int row, int column) {
|
||||||
|
ItemStack ot = null;
|
||||||
|
try {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.tiles.TileMagicWorkbench");
|
||||||
|
Method getStackInRowAndColumn = fake.getMethod("getStackInRowAndColumn", int.class, int.class);
|
||||||
|
ot = (ItemStack) getStackInRowAndColumn.invoke(instance, row, column);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.tiles.TileMagicWorkbench method getStackInRowAndColumn");
|
||||||
|
}
|
||||||
|
return ot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ObjectTags getObjectTags(ItemStack is) {
|
||||||
|
ObjectTags ot = null;
|
||||||
|
try {
|
||||||
|
if(getObjectTags == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.lib.ThaumcraftCraftingManager");
|
||||||
|
getObjectTags = fake.getMethod("getObjectTags", ItemStack.class);
|
||||||
|
}
|
||||||
|
ot = (ObjectTags) getObjectTags.invoke(null, is);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.ThaumcraftCraftingManager method getObjectTags");
|
||||||
|
}
|
||||||
|
return ot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ObjectTags getBonusObjectTags(ItemStack is,ObjectTags ot) {
|
||||||
|
|
||||||
|
try {
|
||||||
|
if(getBonusTags == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.lib.ThaumcraftCraftingManager");
|
||||||
|
getBonusTags = fake.getMethod("getBonusTags", ItemStack.class, ObjectTags.class);
|
||||||
|
}
|
||||||
|
ot = (ObjectTags) getBonusTags.invoke(null, is, ot);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.ThaumcraftCraftingManager method getBonusTags");
|
||||||
|
}
|
||||||
|
return ot;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ObjectTags generateTags(int id, int meta) {
|
||||||
|
try {
|
||||||
|
if(generateTags == null) {
|
||||||
|
Class fake = Class.forName("thaumcraft.common.lib.ThaumcraftCraftingManager");
|
||||||
|
generateTags = fake.getMethod("generateTags", int.class, int.class);
|
||||||
|
}
|
||||||
|
return (ObjectTags) generateTags.invoke(null, id, meta);
|
||||||
|
} catch(Exception ex) {
|
||||||
|
FMLLog.warning("[Thaumcraft API] Could not invoke thaumcraft.common.lib.ThaumcraftCraftingManager method generateTags");
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
85
src/thaumcraft/api/aspects/Aspect.java
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
package thaumcraft.api.aspects;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
public class Aspect {
|
||||||
|
|
||||||
|
String tag;
|
||||||
|
Aspect[] components;
|
||||||
|
|
||||||
|
public Aspect(String tag, Aspect[] components) {
|
||||||
|
this.tag = tag;
|
||||||
|
this.components = components;
|
||||||
|
|
||||||
|
aspects.put(tag, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Aspect(String tag) {
|
||||||
|
this.tag = tag;
|
||||||
|
aspects.put(tag, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTag() {
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTag(String tag) {
|
||||||
|
this.tag = tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Aspect[] getComponents() {
|
||||||
|
return components;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setComponents(Aspect[] components) {
|
||||||
|
this.components = components;
|
||||||
|
}
|
||||||
|
|
||||||
|
///////////////////////////////
|
||||||
|
public static HashMap<String,Aspect> aspects = new HashMap<String,Aspect>();
|
||||||
|
|
||||||
|
//PRIMAL
|
||||||
|
public static final Aspect AIR = new Aspect("Air");
|
||||||
|
public static final Aspect EARTH = new Aspect("Earth");
|
||||||
|
public static final Aspect FIRE = new Aspect("Fire");
|
||||||
|
public static final Aspect WATER = new Aspect("Water");
|
||||||
|
public static final Aspect POSITIVE = new Aspect("Positive");
|
||||||
|
public static final Aspect NEGATIVE = new Aspect("Negative");
|
||||||
|
public static final Aspect ORDER = new Aspect("Order");
|
||||||
|
public static final Aspect CHAOS = new Aspect("Chaos");
|
||||||
|
|
||||||
|
//SECONDARY TODO
|
||||||
|
public static final Aspect VOID = new Aspect("Void", new Aspect[] {NEGATIVE, POSITIVE});
|
||||||
|
public static final Aspect LIGHT = new Aspect("Light", new Aspect[] {AIR, FIRE});
|
||||||
|
public static final Aspect DARKNESS = new Aspect("Darkness", new Aspect[] {VOID, LIGHT});
|
||||||
|
public static final Aspect ASTRAL = new Aspect("Astral", new Aspect[] {VOID, DARKNESS});
|
||||||
|
public static final Aspect ENERGY = new Aspect("Energy", new Aspect[] {POSITIVE, FIRE});
|
||||||
|
public static final Aspect LIFE = new Aspect("Life", new Aspect[] {POSITIVE, ENERGY});
|
||||||
|
public static final Aspect DEATH = new Aspect("Death", new Aspect[] {NEGATIVE, ENERGY});
|
||||||
|
public static final Aspect MOTION = new Aspect("Motion", new Aspect[] {AIR, ORDER});
|
||||||
|
public static final Aspect WEATHER = new Aspect("Weather", new Aspect[] {AIR, CHAOS});
|
||||||
|
public static final Aspect STONE = new Aspect("Stone", new Aspect[] {EARTH, ORDER});
|
||||||
|
public static final Aspect METAL = new Aspect("Metal", new Aspect[] {STONE, FIRE});
|
||||||
|
public static final Aspect SAND = new Aspect("Sand", new Aspect[] {AIR, STONE});
|
||||||
|
public static final Aspect SOUL = new Aspect("Soul", new Aspect[] {DEATH, LIFE});
|
||||||
|
public static final Aspect HEAL = new Aspect("Heal", new Aspect[] {POSITIVE, LIFE});
|
||||||
|
public static final Aspect HARM = new Aspect("Harm", new Aspect[] {NEGATIVE, LIFE});
|
||||||
|
public static final Aspect ANIMATE = new Aspect("Animate",new Aspect[] {MOTION, LIFE});
|
||||||
|
public static final Aspect MAN = new Aspect("Man", new Aspect[] {LIFE, SOUL});
|
||||||
|
public static final Aspect BEAST = new Aspect("Beast", new Aspect[] {LIFE, CHAOS});
|
||||||
|
public static final Aspect BIRD = new Aspect("Bird", new Aspect[] {BEAST, AIR});
|
||||||
|
public static final Aspect FISH = new Aspect("Fish", new Aspect[] {BEAST, WATER});
|
||||||
|
public static final Aspect SEED = new Aspect("Seed", new Aspect[] {LIFE, EARTH});
|
||||||
|
public static final Aspect TREE = new Aspect("Tree", new Aspect[] {SEED, EARTH});
|
||||||
|
public static final Aspect TOOL = new Aspect("Tool", new Aspect[] {MAN, METAL});
|
||||||
|
public static final Aspect MINE = new Aspect("Mine", new Aspect[] {MAN, STONE});
|
||||||
|
public static final Aspect WOOD = new Aspect("Wood", new Aspect[] {TREE, TOOL});
|
||||||
|
public static final Aspect MACHINE = new Aspect("Machine", new Aspect[] {TOOL, ORDER});
|
||||||
|
|
||||||
|
|
||||||
|
// public static final Aspect TRAVEL = new Aspect("Travel", new Aspect[] {MOTION, EARTH});
|
||||||
|
// public static final Aspect TELEPORT = new Aspect("Teleport", new Aspect[] {TRAVEL, VOID});
|
||||||
|
// public static final Aspect GLASS = new Aspect("Glass", new Aspect[] {SAND, FIRE});
|
||||||
|
// public static final Aspect CLAY = new Aspect("Clay", new Aspect[] {SAND, LIFE});
|
||||||
|
|
||||||
|
}
|
||||||
38
src/thaumcraft/api/aura/AuraNode.java
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
package thaumcraft.api.aura;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
|
||||||
|
public class AuraNode implements Serializable {
|
||||||
|
//key
|
||||||
|
public int key;
|
||||||
|
|
||||||
|
//aura
|
||||||
|
public short level;
|
||||||
|
public short baseLevel;
|
||||||
|
public ObjectTags flux = new ObjectTags();
|
||||||
|
public EnumNodeType type;
|
||||||
|
|
||||||
|
//location
|
||||||
|
public int dimension;
|
||||||
|
public double xPos;
|
||||||
|
public double yPos;
|
||||||
|
public double zPos;
|
||||||
|
public boolean locked;
|
||||||
|
|
||||||
|
public AuraNode(int key, short lvl, EnumNodeType type, int dim, int x, int y, int z) {
|
||||||
|
this.key = key;
|
||||||
|
this.level = lvl;
|
||||||
|
this.baseLevel = lvl;
|
||||||
|
this.type = type;
|
||||||
|
this.dimension = dim;
|
||||||
|
this.xPos = x+.5d;
|
||||||
|
this.yPos = y+.5d;
|
||||||
|
this.zPos = z+.5d;
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuraNode() {
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
21
src/thaumcraft/api/aura/EnumNodeType.java
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
package thaumcraft.api.aura;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public enum EnumNodeType {
|
||||||
|
NORMAL,
|
||||||
|
PURE,
|
||||||
|
DARK,
|
||||||
|
UNSTABLE;
|
||||||
|
|
||||||
|
public static final EnumNodeType[] VALID_TYPES = {NORMAL,PURE,DARK,UNSTABLE};
|
||||||
|
|
||||||
|
public static EnumNodeType getType(int id)
|
||||||
|
{
|
||||||
|
if (id >= 0 && id < VALID_TYPES.length)
|
||||||
|
{
|
||||||
|
return VALID_TYPES[id];
|
||||||
|
}
|
||||||
|
return NORMAL;
|
||||||
|
}
|
||||||
|
}
|
||||||
30
src/thaumcraft/api/crafting/IArcaneRecipe.java
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
package thaumcraft.api.crafting;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
public interface IArcaneRecipe
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to check if a recipe matches current crafting inventory
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
boolean matches(IInventory var1, EntityPlayer player);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an Item that is the result of this recipe
|
||||||
|
*/
|
||||||
|
ItemStack getCraftingResult(IInventory var1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the recipe area
|
||||||
|
*/
|
||||||
|
int getRecipeSize();
|
||||||
|
|
||||||
|
ItemStack getRecipeOutput();
|
||||||
|
int getCost();
|
||||||
|
String getKey();
|
||||||
|
}
|
||||||
30
src/thaumcraft/api/crafting/IInfusionRecipe.java
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
package thaumcraft.api.crafting;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
|
||||||
|
public interface IInfusionRecipe
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Used to check if a recipe matches current crafting inventory
|
||||||
|
* @param player
|
||||||
|
*/
|
||||||
|
boolean matches(IInventory var1, EntityPlayer player);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an Item that is the result of this recipe
|
||||||
|
*/
|
||||||
|
ItemStack getCraftingResult(IInventory var1);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the recipe area
|
||||||
|
*/
|
||||||
|
int getRecipeSize();
|
||||||
|
|
||||||
|
ItemStack getRecipeOutput();
|
||||||
|
int getCost();
|
||||||
|
ObjectTags getTags();
|
||||||
|
String getKey();
|
||||||
|
}
|
||||||
51
src/thaumcraft/api/crafting/RecipeCrucible.java
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
package thaumcraft.api.crafting;
|
||||||
|
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
|
||||||
|
public class RecipeCrucible {
|
||||||
|
|
||||||
|
public ItemStack recipeOutput;
|
||||||
|
public ObjectTags tags;
|
||||||
|
public String key;
|
||||||
|
public String researchKey;
|
||||||
|
public int cost;
|
||||||
|
|
||||||
|
public RecipeCrucible(String researchKey, String key, ItemStack result, ObjectTags tags, int cost) {
|
||||||
|
recipeOutput = result;
|
||||||
|
this.tags = tags;
|
||||||
|
this.key = key;
|
||||||
|
this.researchKey = researchKey;
|
||||||
|
this.cost = cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
public RecipeCrucible(String key, ItemStack result, ObjectTags tags, int cost) {
|
||||||
|
recipeOutput = result;
|
||||||
|
this.tags = tags;
|
||||||
|
this.key = key;
|
||||||
|
this.researchKey = key;
|
||||||
|
this.cost = cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean matches(ObjectTags itags) {
|
||||||
|
if (itags==null) return false;
|
||||||
|
for (EnumTag tag:tags.getAspects()) {
|
||||||
|
if (itags.getAmount(tag)<tags.getAmount(tag)) return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ObjectTags removeMatching(ObjectTags itags) {
|
||||||
|
ObjectTags temptags = new ObjectTags();
|
||||||
|
temptags.tags.putAll(itags.tags);
|
||||||
|
|
||||||
|
for (EnumTag tag:tags.getAspects()) {
|
||||||
|
if (!temptags.reduceAmount(tag, tags.getAmount(tag))) return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
itags = temptags;
|
||||||
|
return itags;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
167
src/thaumcraft/api/crafting/ShapedArcaneCraftingRecipes.java
Normal file
@@ -0,0 +1,167 @@
|
|||||||
|
package thaumcraft.api.crafting;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTBase;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import thaumcraft.api.ThaumcraftApiHelper;
|
||||||
|
|
||||||
|
public class ShapedArcaneCraftingRecipes implements IArcaneRecipe
|
||||||
|
{
|
||||||
|
/** How many horizontal slots this recipe is wide. */
|
||||||
|
public int recipeWidth;
|
||||||
|
|
||||||
|
/** How many vertical slots this recipe uses. */
|
||||||
|
public int recipeHeight;
|
||||||
|
|
||||||
|
public String key;
|
||||||
|
|
||||||
|
public int cost;
|
||||||
|
|
||||||
|
/** Is a array of ItemStack that composes the recipe. */
|
||||||
|
public ItemStack[] recipeItems;
|
||||||
|
|
||||||
|
/** Is the ItemStack that you get when craft the recipe. */
|
||||||
|
private ItemStack recipeOutput;
|
||||||
|
|
||||||
|
/** Is the itemID of the output item that you get when craft the recipe. */
|
||||||
|
public final int recipeOutputItemID;
|
||||||
|
|
||||||
|
public ShapedArcaneCraftingRecipes(String key, int par1, int par2, ItemStack[] par3ArrayOfItemStack, ItemStack par4ItemStack, int cost)
|
||||||
|
{
|
||||||
|
this.recipeOutputItemID = par4ItemStack.itemID;
|
||||||
|
this.recipeWidth = par1;
|
||||||
|
this.recipeHeight = par2;
|
||||||
|
this.recipeItems = par3ArrayOfItemStack;
|
||||||
|
this.recipeOutput = par4ItemStack;
|
||||||
|
this.key = key;
|
||||||
|
this.cost = cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getRecipeOutput()
|
||||||
|
{
|
||||||
|
return this.recipeOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to check if a recipe matches current crafting inventory
|
||||||
|
*/
|
||||||
|
public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player)
|
||||||
|
{
|
||||||
|
if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int var2 = 0; var2 <= 3 - this.recipeWidth; ++var2)
|
||||||
|
{
|
||||||
|
for (int var3 = 0; var3 <= 3 - this.recipeHeight; ++var3)
|
||||||
|
{
|
||||||
|
if (this.checkMatch(par1InventoryCrafting, var2, var3, true))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.checkMatch(par1InventoryCrafting, var2, var3, false))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the region of a crafting inventory is match for the recipe.
|
||||||
|
*/
|
||||||
|
private boolean checkMatch(IInventory par1InventoryCrafting, int par2, int par3, boolean par4)
|
||||||
|
{
|
||||||
|
for (int var5 = 0; var5 < 3; ++var5)
|
||||||
|
{
|
||||||
|
for (int var6 = 0; var6 < 3; ++var6)
|
||||||
|
{
|
||||||
|
int var7 = var5 - par2;
|
||||||
|
int var8 = var6 - par3;
|
||||||
|
ItemStack var9 = null;
|
||||||
|
|
||||||
|
if (var7 >= 0 && var8 >= 0 && var7 < this.recipeWidth && var8 < this.recipeHeight)
|
||||||
|
{
|
||||||
|
if (par4)
|
||||||
|
{
|
||||||
|
var9 = this.recipeItems[this.recipeWidth - var7 - 1 + var8 * this.recipeWidth];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var9 = this.recipeItems[var7 + var8 * this.recipeWidth];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack var10 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var5, var6);
|
||||||
|
|
||||||
|
if (var10 != null || var9 != null)
|
||||||
|
{
|
||||||
|
if (var10 == null && var9 != null || var10 != null && var9 == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (var9.itemID != var10.itemID)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (var9.getItemDamage() != OreDictionary.WILDCARD_VALUE && var9.getItemDamage() != var10.getItemDamage())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (var9.hasTagCompound()) {
|
||||||
|
NBTTagCompound tc = var9.getTagCompound();
|
||||||
|
for (Object tag:tc.getTags().toArray()) {
|
||||||
|
NBTBase base = (NBTBase)tag;
|
||||||
|
Class nc = NBTBase.newTag(base.getId(), base.getName()).getClass();
|
||||||
|
if (!(var10.hasTagCompound() &&
|
||||||
|
nc.cast(var10.getTagCompound().getTag(base.getName())).equals(nc.cast(base)))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an Item that is the result of this recipe
|
||||||
|
*/
|
||||||
|
public ItemStack getCraftingResult(IInventory par1InventoryCrafting)
|
||||||
|
{
|
||||||
|
return new ItemStack(this.recipeOutput.itemID, this.recipeOutput.stackSize, this.recipeOutput.getItemDamage());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the recipe area
|
||||||
|
*/
|
||||||
|
public int getRecipeSize()
|
||||||
|
{
|
||||||
|
return this.recipeWidth * this.recipeHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
}
|
||||||
171
src/thaumcraft/api/crafting/ShapedInfusionCraftingRecipes.java
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
package thaumcraft.api.crafting;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTBase;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApiHelper;
|
||||||
|
|
||||||
|
public class ShapedInfusionCraftingRecipes implements IInfusionRecipe
|
||||||
|
{
|
||||||
|
/** How many horizontal slots this recipe is wide. */
|
||||||
|
public int recipeWidth;
|
||||||
|
|
||||||
|
/** How many vertical slots this recipe uses. */
|
||||||
|
public int recipeHeight;
|
||||||
|
|
||||||
|
public String key;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int cost;
|
||||||
|
|
||||||
|
public ObjectTags tags;
|
||||||
|
|
||||||
|
/** Is a array of ItemStack that composes the recipe. */
|
||||||
|
public ItemStack[] recipeItems;
|
||||||
|
|
||||||
|
/** Is the ItemStack that you get when craft the recipe. */
|
||||||
|
private ItemStack recipeOutput;
|
||||||
|
|
||||||
|
/** Is the itemID of the output item that you get when craft the recipe. */
|
||||||
|
public final int recipeOutputItemID;
|
||||||
|
|
||||||
|
public ShapedInfusionCraftingRecipes(String key, int par1, int par2, ItemStack[] par3ArrayOfItemStack, ItemStack par4ItemStack, int cost, ObjectTags tags)
|
||||||
|
{
|
||||||
|
this.recipeOutputItemID = par4ItemStack.itemID;
|
||||||
|
this.recipeWidth = par1;
|
||||||
|
this.recipeHeight = par2;
|
||||||
|
this.recipeItems = par3ArrayOfItemStack;
|
||||||
|
this.recipeOutput = par4ItemStack;
|
||||||
|
this.key = key;
|
||||||
|
this.cost = cost;
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getRecipeOutput()
|
||||||
|
{
|
||||||
|
return this.recipeOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to check if a recipe matches current crafting inventory
|
||||||
|
*/
|
||||||
|
public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player)
|
||||||
|
{
|
||||||
|
if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (int var2 = 0; var2 <= 3 - this.recipeWidth; ++var2)
|
||||||
|
{
|
||||||
|
for (int var3 = 0; var3 <= 3 - this.recipeHeight; ++var3)
|
||||||
|
{
|
||||||
|
if (this.checkMatch(par1InventoryCrafting, var2, var3, true))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.checkMatch(par1InventoryCrafting, var2, var3, false))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the region of a crafting inventory is match for the recipe.
|
||||||
|
*/
|
||||||
|
private boolean checkMatch(IInventory par1InventoryCrafting, int par2, int par3, boolean par4)
|
||||||
|
{
|
||||||
|
for (int var5 = 0; var5 < 3; ++var5)
|
||||||
|
{
|
||||||
|
for (int var6 = 0; var6 < 3; ++var6)
|
||||||
|
{
|
||||||
|
int var7 = var5 - par2;
|
||||||
|
int var8 = var6 - par3;
|
||||||
|
ItemStack var9 = null;
|
||||||
|
|
||||||
|
if (var7 >= 0 && var8 >= 0 && var7 < this.recipeWidth && var8 < this.recipeHeight)
|
||||||
|
{
|
||||||
|
if (par4)
|
||||||
|
{
|
||||||
|
var9 = this.recipeItems[this.recipeWidth - var7 - 1 + var8 * this.recipeWidth];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var9 = this.recipeItems[var7 + var8 * this.recipeWidth];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ItemStack var10 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var5, var6);
|
||||||
|
|
||||||
|
if (var10 != null || var9 != null)
|
||||||
|
{
|
||||||
|
if (var10 == null && var9 != null || var10 != null && var9 == null)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (var9.itemID != var10.itemID)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (var9.getItemDamage() != OreDictionary.WILDCARD_VALUE && var9.getItemDamage() != var10.getItemDamage())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (var9.hasTagCompound()) {
|
||||||
|
NBTTagCompound tc = var9.getTagCompound();
|
||||||
|
for (Object tag:tc.getTags().toArray()) {
|
||||||
|
NBTBase base = (NBTBase)tag;
|
||||||
|
Class nc = NBTBase.newTag(base.getId(), base.getName()).getClass();
|
||||||
|
if (!(var10.hasTagCompound() &&
|
||||||
|
nc.cast(var10.getTagCompound().getTag(base.getName())).equals(nc.cast(base)))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an Item that is the result of this recipe
|
||||||
|
*/
|
||||||
|
public ItemStack getCraftingResult(IInventory par1InventoryCrafting)
|
||||||
|
{
|
||||||
|
return new ItemStack(this.recipeOutput.itemID, this.recipeOutput.stackSize, this.recipeOutput.getItemDamage());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the recipe area
|
||||||
|
*/
|
||||||
|
public int getRecipeSize()
|
||||||
|
{
|
||||||
|
return this.recipeWidth * this.recipeHeight;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ObjectTags getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
}
|
||||||
127
src/thaumcraft/api/crafting/ShapelessArcaneCraftingRecipes.java
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
package thaumcraft.api.crafting;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTBase;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import thaumcraft.api.ThaumcraftApiHelper;
|
||||||
|
|
||||||
|
public class ShapelessArcaneCraftingRecipes implements IArcaneRecipe
|
||||||
|
{
|
||||||
|
/** Is the ItemStack that you get when craft the recipe. */
|
||||||
|
private final ItemStack recipeOutput;
|
||||||
|
|
||||||
|
/** Is a List of ItemStack that composes the recipe. */
|
||||||
|
public final List recipeItems;
|
||||||
|
|
||||||
|
public String key;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int cost;
|
||||||
|
|
||||||
|
public ShapelessArcaneCraftingRecipes(String key, ItemStack par1ItemStack, List par2List, int cost)
|
||||||
|
{
|
||||||
|
this.recipeOutput = par1ItemStack;
|
||||||
|
this.recipeItems = par2List;
|
||||||
|
this.key = key;
|
||||||
|
this.cost = cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getRecipeOutput()
|
||||||
|
{
|
||||||
|
return this.recipeOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to check if a recipe matches current crafting inventory
|
||||||
|
*/
|
||||||
|
public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player)
|
||||||
|
{
|
||||||
|
if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList var2 = new ArrayList(this.recipeItems);
|
||||||
|
|
||||||
|
for (int var3 = 0; var3 < 3; ++var3)
|
||||||
|
{
|
||||||
|
for (int var4 = 0; var4 < 3; ++var4)
|
||||||
|
{
|
||||||
|
ItemStack var5 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var4, var3);
|
||||||
|
|
||||||
|
if (var5 != null)
|
||||||
|
{
|
||||||
|
boolean var6 = false;
|
||||||
|
Iterator var7 = var2.iterator();
|
||||||
|
|
||||||
|
while (var7.hasNext())
|
||||||
|
{
|
||||||
|
ItemStack var8 = (ItemStack)var7.next();
|
||||||
|
|
||||||
|
if (var5.itemID == var8.itemID && (var8.getItemDamage() == OreDictionary.WILDCARD_VALUE || var5.getItemDamage() == var8.getItemDamage()))
|
||||||
|
{
|
||||||
|
boolean matches=true;
|
||||||
|
if (var8.hasTagCompound()) {
|
||||||
|
NBTTagCompound tc = var8.getTagCompound();
|
||||||
|
for (Object tag:tc.getTags().toArray()) {
|
||||||
|
NBTBase base = (NBTBase)tag;
|
||||||
|
Class nc = NBTBase.newTag(base.getId(), base.getName()).getClass();
|
||||||
|
if (!(var5.hasTagCompound() &&
|
||||||
|
nc.cast(var5.getTagCompound().getTag(base.getName())).equals(nc.cast(base)))) {
|
||||||
|
matches=false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (matches) {
|
||||||
|
var6 = true;
|
||||||
|
var2.remove(var8);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!var6)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return var2.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an Item that is the result of this recipe
|
||||||
|
*/
|
||||||
|
public ItemStack getCraftingResult(IInventory par1InventoryCrafting)
|
||||||
|
{
|
||||||
|
return this.recipeOutput.copy();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the recipe area
|
||||||
|
*/
|
||||||
|
public int getRecipeSize()
|
||||||
|
{
|
||||||
|
return this.recipeItems.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
package thaumcraft.api.crafting;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTBase;
|
||||||
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApiHelper;
|
||||||
|
|
||||||
|
public class ShapelessInfusionCraftingRecipes implements IInfusionRecipe
|
||||||
|
{
|
||||||
|
/** Is the ItemStack that you get when craft the recipe. */
|
||||||
|
private final ItemStack recipeOutput;
|
||||||
|
|
||||||
|
/** Is a List of ItemStack that composes the recipe. */
|
||||||
|
public final List recipeItems;
|
||||||
|
|
||||||
|
public String key;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int cost;
|
||||||
|
|
||||||
|
public ObjectTags tags;
|
||||||
|
|
||||||
|
public ShapelessInfusionCraftingRecipes(String key, ItemStack par1ItemStack, List par2List, int cost, ObjectTags tags)
|
||||||
|
{
|
||||||
|
this.recipeOutput = par1ItemStack;
|
||||||
|
this.recipeItems = par2List;
|
||||||
|
this.key = key;
|
||||||
|
this.cost = cost;
|
||||||
|
this.tags = tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getRecipeOutput()
|
||||||
|
{
|
||||||
|
return this.recipeOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to check if a recipe matches current crafting inventory
|
||||||
|
*/
|
||||||
|
public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player)
|
||||||
|
{
|
||||||
|
if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList var2 = new ArrayList(this.recipeItems);
|
||||||
|
|
||||||
|
for (int var3 = 0; var3 < 3; ++var3)
|
||||||
|
{
|
||||||
|
for (int var4 = 0; var4 < 3; ++var4)
|
||||||
|
{
|
||||||
|
ItemStack var5 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var4, var3);
|
||||||
|
|
||||||
|
if (var5 != null)
|
||||||
|
{
|
||||||
|
boolean var6 = false;
|
||||||
|
Iterator var7 = var2.iterator();
|
||||||
|
|
||||||
|
while (var7.hasNext())
|
||||||
|
{
|
||||||
|
ItemStack var8 = (ItemStack)var7.next();
|
||||||
|
|
||||||
|
if (var5.itemID == var8.itemID && (var8.getItemDamage() == OreDictionary.WILDCARD_VALUE || var5.getItemDamage() == var8.getItemDamage()))
|
||||||
|
{
|
||||||
|
boolean matches=true;
|
||||||
|
if (var8.hasTagCompound()) {
|
||||||
|
NBTTagCompound tc = var8.getTagCompound();
|
||||||
|
for (Object tag:tc.getTags().toArray()) {
|
||||||
|
NBTBase base = (NBTBase)tag;
|
||||||
|
Class nc = NBTBase.newTag(base.getId(), base.getName()).getClass();
|
||||||
|
if (!(var5.hasTagCompound() &&
|
||||||
|
nc.cast(var5.getTagCompound().getTag(base.getName())).equals(nc.cast(base)))) {
|
||||||
|
matches=false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (matches) {
|
||||||
|
var6 = true;
|
||||||
|
var2.remove(var8);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!var6)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return var2.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an Item that is the result of this recipe
|
||||||
|
*/
|
||||||
|
public ItemStack getCraftingResult(IInventory par1InventoryCrafting)
|
||||||
|
{
|
||||||
|
return this.recipeOutput.copy();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the recipe area
|
||||||
|
*/
|
||||||
|
public int getRecipeSize()
|
||||||
|
{
|
||||||
|
return this.recipeItems.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ObjectTags getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
package thaumcraft.api.crafting;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.inventory.IInventory;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTBase;
|
||||||
|
import net.minecraftforge.oredict.OreDictionary;
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApiHelper;
|
||||||
|
|
||||||
|
public class ShapelessInfusionCraftingWithNBTRecipes implements IInfusionRecipe
|
||||||
|
{
|
||||||
|
/** Is the ItemStack that you get when craft the recipe. */
|
||||||
|
private final ItemStack recipeOutput;
|
||||||
|
|
||||||
|
/** Is a List of ItemStack that composes the recipe. */
|
||||||
|
public final List recipeItems;
|
||||||
|
|
||||||
|
/** Is a List of nbt key/value pairs. */
|
||||||
|
public final List<NBTBase> nbtList;
|
||||||
|
|
||||||
|
public String key;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getKey() {
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int cost;
|
||||||
|
|
||||||
|
public ObjectTags tags;
|
||||||
|
|
||||||
|
public ShapelessInfusionCraftingWithNBTRecipes(String key,
|
||||||
|
ItemStack par1ItemStack,
|
||||||
|
List par2List, int cost, ObjectTags tags,
|
||||||
|
List<NBTBase> nbtList)
|
||||||
|
{
|
||||||
|
this.recipeOutput = par1ItemStack;
|
||||||
|
this.recipeItems = par2List;
|
||||||
|
this.key = key;
|
||||||
|
this.cost = cost;
|
||||||
|
this.tags = tags;
|
||||||
|
this.nbtList = nbtList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ItemStack getRecipeOutput()
|
||||||
|
{
|
||||||
|
return this.recipeOutput;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to check if a recipe matches current crafting inventory
|
||||||
|
*/
|
||||||
|
public boolean matches(IInventory par1InventoryCrafting, EntityPlayer player)
|
||||||
|
{
|
||||||
|
if (key.length()>0 && !ThaumcraftApiHelper.isResearchComplete(player.username, key)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ArrayList var2 = new ArrayList(this.recipeItems);
|
||||||
|
|
||||||
|
for (int var3 = 0; var3 < 3; ++var3)
|
||||||
|
{
|
||||||
|
for (int var4 = 0; var4 < 3; ++var4)
|
||||||
|
{
|
||||||
|
ItemStack var5 = ThaumcraftApiHelper.getStackInRowAndColumn(par1InventoryCrafting, var4, var3);
|
||||||
|
|
||||||
|
if (var5 != null)
|
||||||
|
{
|
||||||
|
boolean var6 = false;
|
||||||
|
Iterator var7 = var2.iterator();
|
||||||
|
b1:
|
||||||
|
while (var7.hasNext())
|
||||||
|
{
|
||||||
|
ItemStack var8 = (ItemStack)var7.next();
|
||||||
|
|
||||||
|
if (var5.itemID == var8.itemID && (var8.getItemDamage() == OreDictionary.WILDCARD_VALUE || var5.getItemDamage() == var8.getItemDamage()))
|
||||||
|
{
|
||||||
|
for (NBTBase nbt:nbtList) {
|
||||||
|
try {
|
||||||
|
Class nc = NBTBase.newTag(nbt.getId(), nbt.getName()).getClass();
|
||||||
|
if (var5.hasTagCompound() &&
|
||||||
|
nc.cast(var5.getTagCompound().getTag(nbt.getName())).equals(nc.cast(nbt))) {
|
||||||
|
var6 = true;
|
||||||
|
var2.remove(var8);
|
||||||
|
break b1;
|
||||||
|
}
|
||||||
|
} catch (Exception e) {/*probably classcast*/}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!var6)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return var2.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an Item that is the result of this recipe
|
||||||
|
*/
|
||||||
|
public ItemStack getCraftingResult(IInventory par1InventoryCrafting)
|
||||||
|
{
|
||||||
|
return this.recipeOutput.copy();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the size of the recipe area
|
||||||
|
*/
|
||||||
|
public int getRecipeSize()
|
||||||
|
{
|
||||||
|
return this.recipeItems.size();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getCost() {
|
||||||
|
return cost;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ObjectTags getTags() {
|
||||||
|
return tags;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
9
src/thaumcraft/api/research/IScanEventHandler.java
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
package thaumcraft.api.research;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
public interface IScanEventHandler {
|
||||||
|
ScanResult scanPhenomena(ItemStack stack, World world, EntityPlayer player);
|
||||||
|
}
|
||||||
274
src/thaumcraft/api/research/ResearchItem.java
Normal file
@@ -0,0 +1,274 @@
|
|||||||
|
package thaumcraft.api.research;
|
||||||
|
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
|
import org.w3c.dom.Element;
|
||||||
|
import org.w3c.dom.NodeList;
|
||||||
|
|
||||||
|
import thaumcraft.api.ObjectTags;
|
||||||
|
import thaumcraft.api.ThaumcraftApi;
|
||||||
|
import cpw.mods.fml.relauncher.Side;
|
||||||
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
public class ResearchItem
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* A short string used as a key for this research. Must be unique
|
||||||
|
*/
|
||||||
|
public final String key;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the research shown in the thaumonomicon
|
||||||
|
*/
|
||||||
|
public String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The blurb text shown below the research name in the thaumonomicon
|
||||||
|
*/
|
||||||
|
public String popupText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A longer description of the research. This is the text shown in the handheld research scroll and the research table.
|
||||||
|
*/
|
||||||
|
public String longText;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The aspect tags and their values required to complete this research
|
||||||
|
*/
|
||||||
|
public final ObjectTags tags;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This links to any research that needs to be completed before this research can be discovered or learnt.
|
||||||
|
*/
|
||||||
|
public ResearchItem[] parents = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Like parent above, but a line will not be displayed in the thaumonomicon linking them. Just used to prevent clutter.
|
||||||
|
*/
|
||||||
|
public ResearchItem[] parentsHidden = null;
|
||||||
|
/**
|
||||||
|
* any research linked to this that will be unlocked automatically when this research is complete
|
||||||
|
*/
|
||||||
|
public ResearchItem[] siblings = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the horizontal position of the research icon
|
||||||
|
*/
|
||||||
|
public final int displayColumn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the vertical position of the research icon
|
||||||
|
*/
|
||||||
|
public final int displayRow;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the itemstack of an item or block that will be used as the icon for this research
|
||||||
|
*/
|
||||||
|
public final ItemStack itemStack;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* the index within the research.png file used for this research if it does not use an item icon
|
||||||
|
*/
|
||||||
|
public final int iconIndex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Special research has a spiky border. Used for important research milestones.
|
||||||
|
*/
|
||||||
|
private boolean isSpecial;
|
||||||
|
/**
|
||||||
|
* This indicates if the research should use a circular icon border. Usually used for research that doesn't
|
||||||
|
* have recipes or that unlocks automatically via the sibling system
|
||||||
|
*/
|
||||||
|
private boolean isStub;
|
||||||
|
/**
|
||||||
|
* Indicates research that cannot be gained by normal means (either via normal or lost research),
|
||||||
|
* but still uses a normal icon. Works much like isStub but is handy for mods that wish to add research
|
||||||
|
* through their own means and keep a normal icon.
|
||||||
|
*/
|
||||||
|
private boolean isAlternate;
|
||||||
|
/**
|
||||||
|
* Hidden research does not display in the thaumonomicon until discovered
|
||||||
|
*/
|
||||||
|
private boolean isHidden;
|
||||||
|
/**
|
||||||
|
* Lost research can only be discovered via knowledge fragments
|
||||||
|
*/
|
||||||
|
private boolean isLost;
|
||||||
|
/**
|
||||||
|
* These research items will automatically unlock for all players on game start
|
||||||
|
*/
|
||||||
|
private boolean isAutoUnlock;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public ResearchItem(String par1, ObjectTags tags, int par3, int par4, int icon)
|
||||||
|
{
|
||||||
|
this(par1, tags, par3, par4, (ItemStack)null, icon);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem(String par1, ObjectTags tags, int par3, int par4, ItemStack par5Item)
|
||||||
|
{
|
||||||
|
this(par1, tags, par3, par4, par5Item, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem(String par1, ObjectTags tags, int par3, int par4, Item par5Item)
|
||||||
|
{
|
||||||
|
this(par1, tags, par3, par4, new ItemStack(par5Item), -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem(String par1, ObjectTags tags, int par3, int par4, Block par5Block)
|
||||||
|
{
|
||||||
|
this(par1, tags, par3, par4, new ItemStack(par5Block), -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem(String par1, ObjectTags tags, int par3, int par4, ItemStack par5ItemStack, int icon)
|
||||||
|
{
|
||||||
|
this.key = par1;
|
||||||
|
this.tags = tags;
|
||||||
|
this.name = "";
|
||||||
|
this.longText = "";
|
||||||
|
this.popupText = "";
|
||||||
|
|
||||||
|
Element el = ThaumcraftApi.researchDoc.getElementById(key);
|
||||||
|
if (el!=null) {
|
||||||
|
NodeList children = el.getChildNodes();
|
||||||
|
for (int a=0;a<children.getLength();a++) {
|
||||||
|
if (children.item(a).getNodeName().equals("name")) {
|
||||||
|
this.name = children.item(a).getTextContent();
|
||||||
|
} else
|
||||||
|
if (children.item(a).getNodeName().equals("longText")) {
|
||||||
|
this.longText = children.item(a).getTextContent();
|
||||||
|
} else
|
||||||
|
if (children.item(a).getNodeName().equals("popupText") ) {
|
||||||
|
this.popupText = children.item(a).getTextContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.itemStack = par5ItemStack;
|
||||||
|
this.iconIndex = icon;
|
||||||
|
this.displayColumn = par3;
|
||||||
|
this.displayRow = par4;
|
||||||
|
|
||||||
|
|
||||||
|
if (par3 < ResearchList.minDisplayColumn)
|
||||||
|
{
|
||||||
|
ResearchList.minDisplayColumn = par3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (par4 < ResearchList.minDisplayRow)
|
||||||
|
{
|
||||||
|
ResearchList.minDisplayRow = par4;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (par3 > ResearchList.maxDisplayColumn)
|
||||||
|
{
|
||||||
|
ResearchList.maxDisplayColumn = par3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (par4 > ResearchList.maxDisplayRow)
|
||||||
|
{
|
||||||
|
ResearchList.maxDisplayRow = par4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setSpecial()
|
||||||
|
{
|
||||||
|
this.isSpecial = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setStub()
|
||||||
|
{
|
||||||
|
this.isStub = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setAlternate()
|
||||||
|
{
|
||||||
|
this.isAlternate = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setHidden()
|
||||||
|
{
|
||||||
|
this.isHidden = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setLost()
|
||||||
|
{
|
||||||
|
this.isLost = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setParents(ResearchItem... par)
|
||||||
|
{
|
||||||
|
this.parents = par;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setParentsHidden(ResearchItem... par)
|
||||||
|
{
|
||||||
|
this.parentsHidden = par;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setSiblings(ResearchItem... sib)
|
||||||
|
{
|
||||||
|
this.siblings = sib;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem registerResearchItem()
|
||||||
|
{
|
||||||
|
ResearchList.research.put(key, this);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return this.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SideOnly(Side.CLIENT)
|
||||||
|
public boolean getSpecial()
|
||||||
|
{
|
||||||
|
return this.isSpecial;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getStub()
|
||||||
|
{
|
||||||
|
return this.isStub;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getAlternate()
|
||||||
|
{
|
||||||
|
return this.isAlternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getHidden()
|
||||||
|
{
|
||||||
|
return this.isHidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getLost()
|
||||||
|
{
|
||||||
|
return this.isLost;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean getAutoUnlock() {
|
||||||
|
return isAutoUnlock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResearchItem setAutoUnlock()
|
||||||
|
{
|
||||||
|
this.isAutoUnlock = true;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
91
src/thaumcraft/api/research/ResearchList.java
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
package thaumcraft.api.research;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import thaumcraft.api.EnumTag;
|
||||||
|
|
||||||
|
public class ResearchList {
|
||||||
|
|
||||||
|
/** Is the smallest column used on the GUI. */
|
||||||
|
public static int minDisplayColumn;
|
||||||
|
|
||||||
|
/** Is the smallest row used on the GUI. */
|
||||||
|
public static int minDisplayRow;
|
||||||
|
|
||||||
|
/** Is the biggest column used on the GUI. */
|
||||||
|
public static int maxDisplayColumn;
|
||||||
|
|
||||||
|
/** Is the biggest row used on the GUI. */
|
||||||
|
public static int maxDisplayRow;
|
||||||
|
|
||||||
|
//Research
|
||||||
|
public static Map<String, ResearchItem> research = new HashMap<String,ResearchItem>();
|
||||||
|
|
||||||
|
|
||||||
|
public static Map<String, List> craftingRecipesForResearch = new HashMap<String, List>();
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key
|
||||||
|
* @return the research item linked to this key
|
||||||
|
*/
|
||||||
|
public static ResearchItem getResearch(String key) {
|
||||||
|
return research.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key
|
||||||
|
* @return the name of the research linked to this key
|
||||||
|
*/
|
||||||
|
public static String getResearchName(String key) {
|
||||||
|
ResearchItem rr = research.get(key);
|
||||||
|
if (rr==null) return "";
|
||||||
|
return rr.name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key
|
||||||
|
* @return a list of the enumtags used in this research. returns the numeric values and not the actual enum
|
||||||
|
*/
|
||||||
|
public static byte[] getResearchTags(String key) {
|
||||||
|
ResearchItem rr = research.get(key);
|
||||||
|
if (rr==null) return null;
|
||||||
|
byte[] output = new byte[rr.tags.size()];
|
||||||
|
EnumTag[] et = rr.tags.getAspects();
|
||||||
|
for (int a=0;a<rr.tags.size();a++) {
|
||||||
|
output[a] = (byte) et[a].id;
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param key
|
||||||
|
* @return the aspect enumtag ordinal with the highest value. Used to determine scroll color and similar things
|
||||||
|
*/
|
||||||
|
public static int getResearchPrimaryTag(String key) {
|
||||||
|
int t=0;
|
||||||
|
int amt=0;
|
||||||
|
ResearchItem rr = research.get(key);
|
||||||
|
if (rr==null) return 0;
|
||||||
|
for (EnumTag tag:rr.tags.getAspects()) {
|
||||||
|
if (rr.tags.getAmount(tag)>amt) {
|
||||||
|
t=tag.id;
|
||||||
|
amt=rr.tags.getAmount(tag);
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return t;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int getResearchAmount(String key, EnumTag tag) {
|
||||||
|
ResearchItem rr = research.get(key);
|
||||||
|
if (rr==null) return 0;
|
||||||
|
return rr.tags.getAmount(tag);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
14
src/thaumcraft/api/research/ResearchPlayer.java
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package thaumcraft.api.research;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public class ResearchPlayer {
|
||||||
|
public Map<String,List<String>> researchCompleted = new HashMap<String,List<String>>();
|
||||||
|
|
||||||
|
public Map<String,List<Short[]>> objectsScanned = new HashMap<String,List<Short[]>>();
|
||||||
|
public Map<String,List<String>> entitiesScanned = new HashMap<String,List<String>>();
|
||||||
|
public Map<String,List<String>> phenomenaScanned = new HashMap<String,List<String>>();
|
||||||
|
|
||||||
|
}
|
||||||
39
src/thaumcraft/api/research/ScanResult.java
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
package thaumcraft.api.research;
|
||||||
|
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
|
||||||
|
public class ScanResult {
|
||||||
|
public byte type = 0; //1=blocks,2=entities,3=phenomena
|
||||||
|
public int blockId;
|
||||||
|
public int blockMeta;
|
||||||
|
public Entity entity;
|
||||||
|
public String phenomena;
|
||||||
|
|
||||||
|
public ScanResult(byte type, int blockId, int blockMeta, Entity entity,
|
||||||
|
String phenomena) {
|
||||||
|
super();
|
||||||
|
this.type = type;
|
||||||
|
this.blockId = blockId;
|
||||||
|
this.blockMeta = blockMeta;
|
||||||
|
this.entity = entity;
|
||||||
|
this.phenomena = phenomena;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object obj) {
|
||||||
|
if (obj instanceof ScanResult) {
|
||||||
|
ScanResult sr = (ScanResult) obj;
|
||||||
|
if (type != sr.type)
|
||||||
|
return false;
|
||||||
|
if (type == 1
|
||||||
|
&& (blockId != sr.blockId || blockMeta != sr.blockMeta))
|
||||||
|
return false;
|
||||||
|
if (type == 2 && entity.entityId != sr.entity.entityId)
|
||||||
|
return false;
|
||||||
|
if (type == 3 && !phenomena.equals(sr.phenomena))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
10
src/thaumcraft/thaumcraft.iml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
|
<exclude-output />
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
||||||
|
|
||||||