mirror of
https://github.com/GTNewHorizons/BloodArsenal.git
synced 2026-11-26 15:03:19 +00:00
Part 2 of 1.2
This commit is contained in:
1 parent
d675aad914
commit
5a68bfeef1
45 files changed
+1631
-79
No files matched your search
@@ -3,10 +3,12 @@ package com.arc.bloodarsenal.common;
|
||||
import com.arc.bloodarsenal.common.entity.ModLivingDropsEvent;
|
||||
import com.arc.bloodarsenal.common.gui.GuiHandler;
|
||||
import com.arc.bloodarsenal.common.items.ModItems;
|
||||
import com.arc.bloodarsenal.common.items.book.BloodBurnedTome;
|
||||
import com.arc.bloodarsenal.common.items.sigil.holding.AHPacketHandler;
|
||||
import com.arc.bloodarsenal.common.misc.CommandDownloadMod;
|
||||
import com.arc.bloodarsenal.common.potion.PotionBloodArsenal;
|
||||
import com.arc.bloodarsenal.common.rituals.RitualRegistry;
|
||||
import com.arc.bloodarsenal.common.thaumcraft.BloodArsenalThaumcraft;
|
||||
import com.arc.bloodarsenal.common.tinkers.BloodArsenalTinkers;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
@@ -30,7 +32,7 @@ import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
import java.util.Calendar;
|
||||
|
||||
@Mod(modid = BloodArsenal.MODID, version = BloodArsenal.VERSION, name = "Blood Arsenal", dependencies = "required-after:AWWayofTime;after:NotEnoughItems;after:Baubles;after:guideapi;after:TConstruct;after:Waila", guiFactory = "com.arc.bloodarsenal.common.gui.ConfigGuiFactory")
|
||||
@Mod(modid = BloodArsenal.MODID, version = BloodArsenal.VERSION, name = "Blood Arsenal", dependencies = "required-after:AWWayofTime;after:NotEnoughItems;after:Baubles;after:guideapi;after:TConstruct;after:Waila;after:ForbiddenMagic", guiFactory = "com.arc.bloodarsenal.common.gui.ConfigGuiFactory")
|
||||
public class BloodArsenal
|
||||
{
|
||||
public final static String MODID = "BloodArsenal";
|
||||
@@ -52,8 +54,9 @@ public class BloodArsenal
|
||||
public static Item.ToolMaterial infusedNetherium = EnumHelper.addToolMaterial("InfusedNetherium", 8, 0, 31.0F, 18.0F, 0);
|
||||
|
||||
public static ItemArmor.ArmorMaterial vampireArmor = EnumHelper.addArmorMaterial("VampireArmor", 0, new int[]{2, 7, 4, 2}, 0);
|
||||
public static ItemArmor.ArmorMaterial lifeImbuedArmor = EnumHelper.addArmorMaterial("ImbuedArmor", 0, new int[]{4, 13, 9, 4}, 8);
|
||||
public static ItemArmor.ArmorMaterial lifeImbuedArmor = EnumHelper.addArmorMaterial("ImbuedArmor", 0, new int[]{4, 13, 9, 4}, 0);
|
||||
public static ItemArmor.ArmorMaterial glassArmor = EnumHelper.addArmorMaterial("GlassArmor", 0, new int[]{1, 4, 3, 1}, 4);
|
||||
public static ItemArmor.ArmorMaterial elementalLifeImbuedArmor = EnumHelper.addArmorMaterial("ElementalImbuedArmor", 0, new int[]{6, 16, 12, 6}, 0);
|
||||
|
||||
public static Logger logger = LogManager.getLogger(MODID);
|
||||
public static CreativeTabs BA_TAB = new CreativeTabs("BA_TAB")
|
||||
@@ -66,7 +69,7 @@ public class BloodArsenal
|
||||
};
|
||||
|
||||
public static final AHPacketHandler packetPipeline = new AHPacketHandler();
|
||||
public static DamageSource deathFromBlood = (new DamageSource("deathFromBlood")).setDamageBypassesArmor();
|
||||
public static DamageSource deathFromBlood = new DamageSource("deathFromBlood").setDamageBypassesArmor();
|
||||
|
||||
public static boolean isHalloween()
|
||||
{
|
||||
@@ -142,28 +145,35 @@ public class BloodArsenal
|
||||
@Mod.EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
if (Loader.isModLoaded("Baubles"))
|
||||
if (Loader.isModLoaded("Baubles") && BloodArsenalConfig.baublesIntegration)
|
||||
{
|
||||
if (BloodArsenalConfig.baublesIntegration)
|
||||
{
|
||||
logger.info("Loaded Baubles integration");
|
||||
ModItems.registerBaubles();
|
||||
BloodArsenalRecipes.addBaublesRecipe();
|
||||
}
|
||||
logger.info("Loaded Baubles integration");
|
||||
ModItems.registerBaubles();
|
||||
BloodArsenalRecipes.addBaublesRecipe();
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("TConstruct"))
|
||||
if (Loader.isModLoaded("TConstruct") && BloodArsenalConfig.tinkersIntegration)
|
||||
{
|
||||
if (BloodArsenalConfig.tinkersIntegration)
|
||||
{
|
||||
logger.info("Loaded Tinker's Construct integration");
|
||||
BloodArsenalTinkers.INSTANCE.init();
|
||||
}
|
||||
logger.info("Loaded Tinker's Construct integration");
|
||||
BloodArsenalTinkers.INSTANCE.init();
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("guideapi"))
|
||||
if (Loader.isModLoaded("guideapi") && BloodArsenalConfig.guideAPIIntegration)
|
||||
{
|
||||
BloodBurnedTome.registerTome();
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("ForbiddenMagic") && BloodArsenalConfig.thaumcraftIntegration)
|
||||
{
|
||||
logger.info("Loaded Thaumcraft/Forbidden Magic integration");
|
||||
ModItems.registerThaumcraftItems();
|
||||
BloodArsenalThaumcraft.init();
|
||||
}
|
||||
|
||||
if (Loader.isModLoaded("ForgeMultipart") && BloodArsenalConfig.forgeMultipartIntegration)
|
||||
{
|
||||
logger.info("Loaded Forge Multipart integration");
|
||||
ModBlocks.registerMultiparts();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,11 @@ public class BloodArsenalConfig
|
||||
|
||||
//Mod Settings
|
||||
public static boolean baublesIntegration;
|
||||
public static boolean forgeMultipartIntegration;
|
||||
public static boolean guideAPIIntegration;
|
||||
public static boolean thaumcraftIntegration;
|
||||
public static boolean tinkersIntegration;
|
||||
public static boolean researchTag;
|
||||
public static int bloodInfusedWoodID;
|
||||
public static int bloodInfusedIronID;
|
||||
|
||||
@@ -98,7 +102,10 @@ public class BloodArsenalConfig
|
||||
itemsToBeDisabled = config.getStringList("Disable items here", itemSettings, new String[]{""}, "Type in the unlocalized name of the item you want disabled (separate them using ENTER)");
|
||||
|
||||
baublesIntegration = config.get(modSettings, "Enable Baubles integration?", true).getBoolean(baublesIntegration);
|
||||
tinkersIntegration = config.get(modSettings, "Enable TConstruct integration?", true).getBoolean(tinkersIntegration);
|
||||
forgeMultipartIntegration = config.get(modSettings, "Enable Forge Multipart Integration?", true).getBoolean(forgeMultipartIntegration);
|
||||
thaumcraftIntegration = config.get(modSettings, "Enable Thaumcraft/Forbidden Magic integration?", true).getBoolean(thaumcraftIntegration);
|
||||
tinkersIntegration = config.get(modSettings, "Enable Tinker's Construct integration?", true).getBoolean(tinkersIntegration);
|
||||
researchTag = config.get(modSettings, "Add [BA] to all of Blood Arsenal's research?", true).getBoolean(researchTag);
|
||||
bloodInfusedWoodID = config.get(modSettings, "Material ID for Blood Infused Wood; Default: 250", 250).getInt(bloodInfusedWoodID);
|
||||
bloodInfusedIronID = config.get(modSettings, "Material ID for Blood Infused Iron; Defualt: 251", 251).getInt(bloodInfusedIronID);
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public class ModBlocks
|
||||
public static Block compacted_mrs;
|
||||
public static Block block_burned_string;
|
||||
|
||||
public static ArrayList<String> blocksNotToBeRegistered = new ArrayList();
|
||||
public static ArrayList<String> blocksNotToBeRegistered = new ArrayList<String>();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
@@ -113,4 +113,14 @@ public class ModBlocks
|
||||
|
||||
return block;
|
||||
}
|
||||
|
||||
public static void registerMultiparts()
|
||||
{
|
||||
try
|
||||
{
|
||||
Class clazz = Class.forName("com.arc.bloodarsenal.common.block.MultipartHandler");
|
||||
clazz.newInstance();
|
||||
}
|
||||
catch(Throwable e) {}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [Sep 1, 2015, 5:32:15 PM (GMT)]
|
||||
*/
|
||||
package com.arc.bloodarsenal.common.block;
|
||||
|
||||
import codechicken.microblock.BlockMicroMaterial;
|
||||
import codechicken.microblock.MicroMaterialRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class MultipartHandler
|
||||
{
|
||||
public MultipartHandler()
|
||||
{
|
||||
registerAllMultiparts(ModBlocks.blood_stone);
|
||||
registerAllMultiparts(ModBlocks.blood_stained_glass);
|
||||
registerAllMultiparts(ModBlocks.blood_infused_wood);
|
||||
registerAllMultiparts(ModBlocks.blood_infused_planks);
|
||||
registerAllMultiparts(ModBlocks.blood_stained_ice);
|
||||
registerAllMultiparts(ModBlocks.blood_stained_ice_packed);
|
||||
registerAllMultiparts(ModBlocks.blood_infused_iron_block);
|
||||
registerAllMultiparts(ModBlocks.blood_infused_glowstone);
|
||||
registerAllMultiparts(ModBlocks.blood_lamp);
|
||||
registerAllMultiparts(ModBlocks.blood_infused_diamond_block);
|
||||
}
|
||||
|
||||
private static void registerAllMultiparts(Block block)
|
||||
{
|
||||
List<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
Item item = Item.getItemFromBlock(block);
|
||||
block.getSubBlocks(item, block.getCreativeTabToDisplayOn(), stacks);
|
||||
|
||||
for (ItemStack stack : stacks)
|
||||
{
|
||||
if (stack.getItem() == item)
|
||||
{
|
||||
registerMultipart(block, stack.getItemDamage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void registerMultipartMetadataLine(Block block, int maxMeta)
|
||||
{
|
||||
for (int i = 0; i < maxMeta; i++)
|
||||
{
|
||||
registerMultipart(block, i);
|
||||
}
|
||||
}
|
||||
|
||||
private static void registerMultipart(Block block, int meta)
|
||||
{
|
||||
MicroMaterialRegistry.registerMaterial(new BlockMicroMaterial(block, meta), block.getUnlocalizedName() + (meta == 0 ? "" : "_" + meta));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
package com.arc.bloodarsenal.common.items;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemBoundDiamondShards extends Item
|
||||
{
|
||||
private final String[] shardTypes = new String[]{"", "air", "earth", "fire", "water", "dusk", "dawn"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public ItemBoundDiamondShards()
|
||||
{
|
||||
super();
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister)
|
||||
{
|
||||
icons = new IIcon[shardTypes.length];
|
||||
|
||||
for (int i = 0; i < shardTypes.length; ++i)
|
||||
{
|
||||
icons[i] = iconRegister.registerIcon("BloodArsenal:" + "bound_diamond_shard_" + shardTypes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack itemStack)
|
||||
{
|
||||
int meta = MathHelper.clamp_int(itemStack.getItemDamage(), 0, shardTypes.length - 1);
|
||||
|
||||
return "item.bound_diamond_shard_" + shardTypes[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int meta)
|
||||
{
|
||||
int j = MathHelper.clamp_int(meta, 0, shardTypes.length - 1);
|
||||
return icons[j];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List list)
|
||||
{
|
||||
for (int meta = 0; meta < shardTypes.length; ++meta)
|
||||
{
|
||||
list.add(new ItemStack(id, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack itemStack, EntityPlayer player, List list, boolean par4)
|
||||
{
|
||||
list.add(StatCollector.translateToLocal("tooltip.boundDiamondShard.shard"));
|
||||
}
|
||||
}
|
||||
@@ -12,10 +12,17 @@ import com.arc.bloodarsenal.common.items.orb.TransparentOrb;
|
||||
import com.arc.bloodarsenal.common.items.sigil.*;
|
||||
import com.arc.bloodarsenal.common.items.sigil.holding.SigilAugmentedHolding;
|
||||
import com.arc.bloodarsenal.common.items.tool.*;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import com.arc.bloodarsenal.common.thaumcraft.*;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemReed;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import scala.actors.threadpool.Arrays;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.StaffRod;
|
||||
import thaumcraft.api.wands.WandCap;
|
||||
import thaumcraft.api.wands.WandRod;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -82,9 +89,18 @@ public class ModItems
|
||||
public static Item life_imbued_chestplate;
|
||||
public static Item life_imbued_leggings;
|
||||
public static Item life_imbued_boots;
|
||||
public static Item burned_tome;
|
||||
public static Item bound_diamond_shard;
|
||||
public static Item wandCore;
|
||||
public static Item wandCap;
|
||||
public static WandRod WAND_ROD_BLOOD_INFUSED_WOOD;
|
||||
public static StaffRod STAFF_ROD_BLOOD_INFUSED_WOOD;
|
||||
public static WandCap WAND_CAP_BLOOD_INFUSED_IRON;
|
||||
public static Item life_imbued_helmet_water;
|
||||
public static Item life_imbued_chestplate_fire;
|
||||
public static Item life_imbued_leggings_earth;
|
||||
public static Item life_imbued_boots_air;
|
||||
|
||||
public static ArrayList<String> itemsNotToBeRegistered = new ArrayList();
|
||||
public static ArrayList<String> itemsNotToBeRegistered = new ArrayList<String>();
|
||||
|
||||
public static void init()
|
||||
{
|
||||
@@ -144,22 +160,27 @@ public class ModItems
|
||||
life_imbued_chestplate = registerItem(new LifeImbuedArmor(1), "life_imbued_chestplate");
|
||||
life_imbued_leggings = registerItem(new LifeImbuedArmor(2), "life_imbued_leggings");
|
||||
life_imbued_boots = registerItem(new LifeImbuedArmor(3), "life_imbued_boots");
|
||||
bound_diamond_shard = registerItem(new ItemBoundDiamondShards(), "bound_diamond_shard");
|
||||
}
|
||||
|
||||
@Optional.Method(modid = "Baubles")
|
||||
public static void registerBaubles()
|
||||
{
|
||||
vampire_ring = new VampireRing();
|
||||
self_sacrifice_amulet = new SelfSacrificeAmulet();
|
||||
sacrifice_amulet = new SacrificeAmulet();
|
||||
empowered_sacrifice_amulet = new EmpoweredSacrificeAmulet();
|
||||
empowered_self_sacrifice_amulet = new EmpoweredSelfSacrificeAmulet();
|
||||
vampire_ring = registerItem(new VampireRing(), "vampire_ring");
|
||||
self_sacrifice_amulet = registerItem(new SelfSacrificeAmulet(), "self_sacrifice_amulet");
|
||||
sacrifice_amulet = registerItem(new SacrificeAmulet(), "sacrifice_amulet");
|
||||
empowered_sacrifice_amulet = registerItem(new EmpoweredSacrificeAmulet(), "empowered_self_sacrifice_amulet");
|
||||
empowered_self_sacrifice_amulet = registerItem(new EmpoweredSelfSacrificeAmulet(), "empowered_sacrifice_amulet");
|
||||
}
|
||||
|
||||
GameRegistry.registerItem(vampire_ring, "vampire_ring");
|
||||
GameRegistry.registerItem(self_sacrifice_amulet, "self_sacrifice_amulet");
|
||||
GameRegistry.registerItem(sacrifice_amulet, "sacrifice_amulet");
|
||||
GameRegistry.registerItem(empowered_self_sacrifice_amulet, "empowered_self_sacrifice_amulet");
|
||||
GameRegistry.registerItem(empowered_sacrifice_amulet, "empowered_sacrifice_amulet");
|
||||
public static void registerThaumcraftItems()
|
||||
{
|
||||
wandCore = (new ItemWandCores()).setUnlocalizedName("wand_cores");
|
||||
GameRegistry.registerItem(wandCore, "wand_cores");
|
||||
wandCap = (new ItemWandCaps()).setUnlocalizedName("wand_caps");
|
||||
GameRegistry.registerItem(wandCap, "wand_caps");
|
||||
WAND_ROD_BLOOD_INFUSED_WOOD = new WandRod("blood_wood", 100, new ItemStack(wandCore, 1, 0), 16, new BloodWoodWandUpdate(), new ResourceLocation("bloodarsenal", "models/wand_rod_blood_wood.png"));
|
||||
STAFF_ROD_BLOOD_INFUSED_WOOD = new StaffRod("blood_wood", 60, new ItemStack(wandCore, 1, 1), 27, new BloodWoodStaffUpdate(), new ResourceLocation("bloodarsenal", "models/wand_rod_blood_wood.png"));
|
||||
WAND_CAP_BLOOD_INFUSED_IRON = new BloodyWandCap("blood_iron", 0.85F, Arrays.asList(new Aspect[]{Aspect.WATER}), 0.80F, new ItemStack(wandCap, 1, 0), 5, new ResourceLocation("bloodarsenal", "models/wand_cap_blood_iron.png"));
|
||||
}
|
||||
|
||||
public static Item registerItem(Item item, String unlocalizedName)
|
||||
|
||||
@@ -0,0 +1,276 @@
|
||||
package com.arc.bloodarsenal.common.items.armor;
|
||||
|
||||
import WayofTime.alchemicalWizardry.AlchemicalWizardry;
|
||||
import com.arc.bloodarsenal.common.BloodArsenal;
|
||||
import com.arc.bloodarsenal.common.items.ModItems;
|
||||
import com.arc.bloodarsenal.common.items.tool.IFillable;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.enchantment.Enchantment;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
public class ElementalLifeImbuedArmor extends ItemArmor implements ISpecialArmor, IFillable
|
||||
{
|
||||
private final int maxLP = 100000;
|
||||
private String LP_STORED = "LPStored";
|
||||
|
||||
public ElementalLifeImbuedArmor(int armorType)
|
||||
{
|
||||
super(BloodArsenal.elementalLifeImbuedArmor, 0, armorType);
|
||||
}
|
||||
|
||||
/** IFillable */
|
||||
@Override
|
||||
public int getMaxLP()
|
||||
{
|
||||
return maxLP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incrementLPStored(ItemStack itemStack, int incrementAmount)
|
||||
{
|
||||
setCurrentLPStored(itemStack, getLPStored(itemStack) + incrementAmount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLPStored(ItemStack container)
|
||||
{
|
||||
if (container.stackTagCompound == null)
|
||||
{
|
||||
setCurrentLPStored(container, 0);
|
||||
}
|
||||
|
||||
return container.stackTagCompound.getInteger(LP_STORED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
|
||||
{
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.armor.elementalLifeImbuedArmor"));
|
||||
par3List.add(StatCollector.translateToLocal("tooltip.fillable.currentAmount") + " " + EnumChatFormatting.RED + par1ItemStack.getTagCompound().getInteger(LP_STORED));
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String type)
|
||||
{
|
||||
if (this != ModItems.life_imbued_leggings)
|
||||
{
|
||||
return "BloodArsenal:models/armor/life_imbued_layer_1.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "BloodArsenal:models/armor/life_imbued_layer_2.png";
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getIsRepairable(ItemStack itemToRepair, ItemStack stack)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
|
||||
{
|
||||
return super.onItemRightClick(par1ItemStack, par2World, par3EntityPlayer);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxDamage(ItemStack stack)
|
||||
{
|
||||
return maxLP;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumRarity getRarity(ItemStack stack)
|
||||
{
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setDamage(ItemStack stack, int damage)
|
||||
{
|
||||
super.setDamage(stack, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isDamaged(ItemStack stack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getDisplayDamage(ItemStack stack)
|
||||
{
|
||||
if (stack.stackTagCompound == null)
|
||||
{
|
||||
setCurrentLPStored(stack, 0);
|
||||
}
|
||||
|
||||
return maxLP - stack.stackTagCompound.getInteger(LP_STORED);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showDurabilityBar(ItemStack stack)
|
||||
{
|
||||
return stack.stackTagCompound == null || !stack.stackTagCompound.getBoolean("CreativeTab");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List list)
|
||||
{
|
||||
list.add(setCurrentLPStored(new ItemStack(item, 1, 0), 0));
|
||||
list.add(setCurrentLPStored(new ItemStack(item, 1, 0), maxLP));
|
||||
}
|
||||
|
||||
private ItemStack setCurrentLPStored(ItemStack itemStack, int amount)
|
||||
{
|
||||
if (itemStack.stackTagCompound == null)
|
||||
{
|
||||
itemStack.setTagCompound(new NBTTagCompound());
|
||||
}
|
||||
|
||||
itemStack.getTagCompound().setInteger(LP_STORED, amount);
|
||||
return itemStack;
|
||||
}
|
||||
|
||||
protected int getBaseAbsorption()
|
||||
{
|
||||
return 18;
|
||||
}
|
||||
|
||||
protected int getAbsorptionRatio()
|
||||
{
|
||||
switch (armorType)
|
||||
{
|
||||
case 0:
|
||||
return 15;
|
||||
case 1:
|
||||
return 40;
|
||||
case 2:
|
||||
return 30;
|
||||
case 3:
|
||||
return 15;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot)
|
||||
{
|
||||
if (getLPStored(armor) >= getLPPerDamage(armor))
|
||||
{
|
||||
return Math.min(getBaseAbsorption(), 20) * getAbsorptionRatio() / 100;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot)
|
||||
{
|
||||
final double absorbRatio = 0.5;
|
||||
|
||||
if (source.isUnblockable())
|
||||
{
|
||||
int absorbMax = getLPPerDamage(armor) > 0 ? 25 * getLPStored(armor) / getLPPerDamage(armor) : 0;
|
||||
return new ArmorProperties(0, absorbRatio * getArmorMaterial().getDamageReductionAmount(armorType) * 0.025, absorbMax);
|
||||
}
|
||||
|
||||
int absorbMax = getLPPerDamage(armor) > 0 ? 25 * getLPStored(armor) / getLPPerDamage(armor) : 0;
|
||||
return new ArmorProperties(0, absorbRatio * getArmorMaterial().getDamageReductionAmount(armorType) * 0.05, absorbMax);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack armor, DamageSource source, int damage, int slot)
|
||||
{
|
||||
subtractLP(armor, damage * getLPPerDamage(armor), false);
|
||||
}
|
||||
|
||||
protected int getLPPerDamage(ItemStack stack)
|
||||
{
|
||||
int unbreakingLevel = MathHelper.clamp_int(EnchantmentHelper.getEnchantmentLevel(Enchantment.unbreaking.effectId, stack), 0, 4);
|
||||
return 100 * (5 - unbreakingLevel) / 5;
|
||||
}
|
||||
|
||||
public int subtractLP(ItemStack container, int maxExtract, boolean simulate)
|
||||
{
|
||||
if (container.stackTagCompound == null)
|
||||
{
|
||||
setCurrentLPStored(container, 0);
|
||||
}
|
||||
|
||||
int stored = container.stackTagCompound.getInteger(LP_STORED);
|
||||
int extract = Math.min(maxExtract, stored);
|
||||
|
||||
if (!simulate)
|
||||
{
|
||||
stored -= extract;
|
||||
container.stackTagCompound.setInteger(LP_STORED, stored);
|
||||
}
|
||||
|
||||
return extract;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack armor)
|
||||
{
|
||||
if (hasArmorSetItem(player, 0) && hasArmorSetItem(player, 1) && hasArmorSetItem(player, 2) && hasArmorSetItem(player, 3))
|
||||
{
|
||||
if (player.getHealth() < player.getMaxHealth() && !player.isPotionActive(AlchemicalWizardry.customPotionInhibit))
|
||||
{
|
||||
if (world.getWorldTime() % 50 == 0)
|
||||
{
|
||||
Random random = new Random();
|
||||
|
||||
if (random.nextInt(9) > 7)
|
||||
{
|
||||
LifeImbuedArmor thisArmor = (LifeImbuedArmor) armor.getItem();
|
||||
if (thisArmor.getLPStored(armor) >= 2000)
|
||||
{
|
||||
float healHealth = player.getMaxHealth() - player.getHealth();
|
||||
player.heal(healHealth);
|
||||
thisArmor.subtractLP(armor, ((int) healHealth) * 500, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean hasArmorSetItem(EntityPlayer player, int i)
|
||||
{
|
||||
ItemStack stack = player.inventory.armorInventory[3 - i];
|
||||
|
||||
if (stack == null)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (i)
|
||||
{
|
||||
case 0: return stack.getItem() == ModItems.life_imbued_helmet_water;
|
||||
case 1: return stack.getItem() == ModItems.life_imbued_chestplate_fire;
|
||||
case 2: return stack.getItem() == ModItems.life_imbued_leggings_earth;
|
||||
case 3: return stack.getItem() == ModItems.life_imbued_boots_air;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package com.arc.bloodarsenal.common.items.book;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipe;
|
||||
import WayofTime.alchemicalWizardry.api.altarRecipeRegistry.AltarRecipeRegistry;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.CraftingManager;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class RecipeHolder
|
||||
{
|
||||
private static List recipeList;
|
||||
|
||||
public static IRecipe glassSacrificialDagger;
|
||||
public static IRecipe glassDaggerOfSacrifice;
|
||||
|
||||
public static void init()
|
||||
{
|
||||
recipeList = CraftingManager.getInstance().getRecipeList();
|
||||
}
|
||||
|
||||
private static IRecipe getRecipeForItemStack(ItemStack stack)
|
||||
{
|
||||
for (Object obj : recipeList)
|
||||
{
|
||||
IRecipe recipe = (IRecipe) obj;
|
||||
if (recipe.getRecipeOutput() != null && stack.isItemEqual(recipe.getRecipeOutput()))
|
||||
{
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static AltarRecipe getAltarRecipeForItemStack(ItemStack stack)
|
||||
{
|
||||
for (AltarRecipe recipe : AltarRecipeRegistry.altarRecipes)
|
||||
{
|
||||
if (recipe.getResult() != null && stack.isItemEqual(recipe.getResult()))
|
||||
{
|
||||
return recipe;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [May 31, 2014, 10:22:44 PM (GMT)]
|
||||
*/
|
||||
package com.arc.bloodarsenal.common.misc;
|
||||
|
||||
import net.minecraft.command.CommandBase;
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [May 31, 2014, 10:22:44 PM (GMT)]
|
||||
*/
|
||||
package com.arc.bloodarsenal.common.misc;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [May 31, 2014, 10:22:44 PM (GMT)]
|
||||
*/
|
||||
package com.arc.bloodarsenal.common.misc;
|
||||
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
/**
|
||||
* This class was created by <Vazkii>. It's distributed as
|
||||
* part of the Botania Mod. Get the Source Code in github:
|
||||
* https://github.com/Vazkii/Botania
|
||||
*
|
||||
* Botania is Open Source and distributed under the
|
||||
* Botania License: http://botaniamod.net/license.php
|
||||
*
|
||||
* File Created @ [May 31, 2014, 10:22:44 PM (GMT)]
|
||||
*/
|
||||
package com.arc.bloodarsenal.common.misc;
|
||||
|
||||
import com.arc.bloodarsenal.common.BloodArsenal;
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.arc.bloodarsenal.common.thaumcraft;
|
||||
|
||||
import com.arc.bloodarsenal.common.BloodArsenalConfig;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.research.ResearchItem;
|
||||
|
||||
public class BloodArsenalResearchItem extends ResearchItem
|
||||
{
|
||||
String inter = null;
|
||||
|
||||
public BloodArsenalResearchItem(String par1, String x) {
|
||||
super(par1, x);
|
||||
}
|
||||
|
||||
public BloodArsenalResearchItem(String par1, String x, AspectList tags, int y, int z, int par5, ResourceLocation icon)
|
||||
{
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
}
|
||||
|
||||
public BloodArsenalResearchItem(String par1, String x, AspectList tags, int y, int z, int par5, ItemStack icon)
|
||||
{
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
}
|
||||
|
||||
public BloodArsenalResearchItem(String par1, String x, String mod, AspectList tags, int y, int z, int par5, ResourceLocation icon)
|
||||
{
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
this.inter = mod;
|
||||
}
|
||||
|
||||
public BloodArsenalResearchItem(String par1, String x, String mod, AspectList tags, int y, int z, int par5, ItemStack icon)
|
||||
{
|
||||
super(par1, x, tags, y, z, par5, icon);
|
||||
this.inter = mod;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getName() {
|
||||
return StatCollector.translateToLocal("blood_arsenal.research_name." + this.key);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getText()
|
||||
{
|
||||
return BloodArsenalConfig.researchTag ? (this.inter == null ? "[BA] " + StatCollector.translateToLocal("blood_arsenal.research_text." + this.key) : "[BA] " + this.inter + " " + StatCollector.translateToLocal("blood_arsenal.research_text." + this.key)) : StatCollector.translateToLocal("blood_arsenal.research_text." + this.key);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.arc.bloodarsenal.common.thaumcraft;
|
||||
|
||||
public class BloodArsenalThaumcraft
|
||||
{
|
||||
public static void init()
|
||||
{
|
||||
BloodyResearch.addResearch();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
/**
|
||||
* Taken from SpitefulFox's ForbiddenMagic
|
||||
* https://github.com/SpitefulFox/ForbiddenMagic
|
||||
*/
|
||||
|
||||
package com.arc.bloodarsenal.common.thaumcraft;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class BloodWoodStaffUpdate implements IWandRodOnUpdate
|
||||
{
|
||||
Aspect[] primals = (Aspect[])Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public BloodWoodStaffUpdate() {}
|
||||
|
||||
@Override
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player)
|
||||
{
|
||||
if (player.ticksExisted % 10 == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!checkHotbar(itemstack, player)) return;
|
||||
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
|
||||
int cost;
|
||||
if (((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("alchemical"))
|
||||
{
|
||||
cost = 12;
|
||||
}
|
||||
else if (((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("blood_iron"))
|
||||
{
|
||||
cost = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
cost = 13;
|
||||
}
|
||||
|
||||
for (int x = 0; x < primals.length; x++)
|
||||
{
|
||||
int deficit = ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, primals[x]);
|
||||
if (deficit > 0)
|
||||
{
|
||||
deficit = Math.min(deficit, 100);
|
||||
if (player.capabilities.isCreativeMode)
|
||||
{
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
}
|
||||
else if (SoulNetworkHandler.syphonFromNetwork(itemstack, cost * deficit) > 0)
|
||||
{
|
||||
((ItemWandCasting) itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
player.attackEntityFrom(DamageSource.starve, 1F);
|
||||
}
|
||||
else if (syphonHealth(player))
|
||||
{
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, primals[x], 1, true);
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception e) {}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player)
|
||||
{
|
||||
if (player.getHealth() > 0)
|
||||
{
|
||||
player.setHealth(player.getHealth() - 3);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private boolean checkHotbar(ItemStack stack, EntityPlayer player)
|
||||
{
|
||||
for (int x = 0; x < 9; ++x)
|
||||
{
|
||||
ItemStack item = player.inventory.getStackInSlot(x);
|
||||
if (item == stack)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* Taken from SpitefulFox's ForbiddenMagic
|
||||
* https://github.com/SpitefulFox/ForbiddenMagic
|
||||
*/
|
||||
|
||||
package com.arc.bloodarsenal.common.thaumcraft;
|
||||
|
||||
import WayofTime.alchemicalWizardry.api.soulNetwork.SoulNetworkHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.IWandRodOnUpdate;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
public class BloodWoodWandUpdate implements IWandRodOnUpdate
|
||||
{
|
||||
Aspect[] primals = (Aspect[])Aspect.getPrimalAspects().toArray(new Aspect[0]);
|
||||
|
||||
public BloodWoodWandUpdate() {}
|
||||
|
||||
public void onUpdate(ItemStack itemstack, EntityPlayer player)
|
||||
{
|
||||
if (player.ticksExisted % 50 == 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
SoulNetworkHandler.checkAndSetItemOwner(itemstack, player);
|
||||
byte e;
|
||||
if (((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("alchemical"))
|
||||
{
|
||||
e = 12;
|
||||
}
|
||||
else if (((ItemWandCasting)itemstack.getItem()).getCap(itemstack).getTag().equals("blood_iron"))
|
||||
{
|
||||
e = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
e = 13;
|
||||
}
|
||||
|
||||
for (int x = 0; x < this.primals.length; ++x)
|
||||
{
|
||||
int deficit = ((ItemWandCasting)itemstack.getItem()).getMaxVis(itemstack) - ((ItemWandCasting)itemstack.getItem()).getVis(itemstack, this.primals[x]);
|
||||
if (deficit > 0)
|
||||
{
|
||||
deficit = Math.min(deficit, 100);
|
||||
if (player.capabilities.isCreativeMode)
|
||||
{
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, this.primals[x], 1, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SoulNetworkHandler.syphonFromNetwork(itemstack, e * deficit) <= 0)
|
||||
{
|
||||
if (this.syphonHealth(player))
|
||||
{
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, this.primals[x], 1, true);
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
((ItemWandCasting)itemstack.getItem()).addVis(itemstack, this.primals[x], 1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Throwable var6)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean syphonHealth(EntityPlayer player)
|
||||
{
|
||||
if (player.getHealth() > 6.0F)
|
||||
{
|
||||
player.setHealth(player.getHealth() - 3.0F);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/**
|
||||
* Taken from SpitefulFox's ForbiddenMagic
|
||||
* https://github.com/SpitefulFox/ForbiddenMagic
|
||||
*/
|
||||
|
||||
package com.arc.bloodarsenal.common.thaumcraft;
|
||||
|
||||
import com.arc.bloodarsenal.common.block.ModBlocks;
|
||||
import com.arc.bloodarsenal.common.items.ModItems;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import thaumcraft.api.ThaumcraftApi;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.aspects.AspectList;
|
||||
import thaumcraft.api.crafting.InfusionRecipe;
|
||||
import thaumcraft.api.research.ResearchPage;
|
||||
import thaumcraft.api.wands.WandCap;
|
||||
import thaumcraft.api.wands.WandRod;
|
||||
|
||||
public class BloodyResearch
|
||||
{
|
||||
public BloodyResearch() {}
|
||||
|
||||
public static void addResearch()
|
||||
{
|
||||
final String FORBIDDEN = "FORBIDDEN";
|
||||
|
||||
WandRod bloodRod = WandRod.rods.get("blood");
|
||||
WandCap alchemicalCap = WandCap.caps.get("alchemical");
|
||||
|
||||
InfusionRecipe rod_blood_wood = ThaumcraftApi.addInfusionCraftingRecipe("ROD_blood_wood", new ItemStack(ModItems.wandCore, 1, 0), 3, (new AspectList()).add(Aspect.LIFE, 24).add(Aspect.MAGIC, 16).add(Aspect.TOOL, 8), bloodRod.getItem(), new ItemStack[] {new ItemStack(ModItems.amorphic_catalyst), new ItemStack(ModItems.amorphic_catalyst), new ItemStack(ModBlocks.blood_infused_wood), new ItemStack(ModBlocks.blood_infused_wood), new ItemStack(ModBlocks.blood_infused_wood), new ItemStack(ModItems.blood_infused_glowstone_dust)});
|
||||
new BloodArsenalResearchItem("ROD_blood_wood", FORBIDDEN, (new AspectList()).add(Aspect.LIFE, 10).add(Aspect.MAGIC, 8).add(Aspect.TOOL, 4), 4, -5, 2, new ItemStack(ModItems.wandCore, 1, 0)).setPages(new ResearchPage("blood_arsenal.research_page.ROD_blood_wood.1"), new ResearchPage("blood_arsenal.research_page.ROD_blood_wood.2"), new ResearchPage(rod_blood_wood)).setParents("ROD_blood").registerResearchItem();
|
||||
InfusionRecipe cap_blood_iron = ThaumcraftApi.addInfusionCraftingRecipe("CAP_blood_iron", new ItemStack(ModItems.wandCap, 1, 0), 3, (new AspectList()).add(Aspect.LIFE, 16).add(Aspect.WATER, 8).add(Aspect.MAGIC, 8), alchemicalCap.getItem(), new ItemStack[] { new ItemStack(ModItems.amorphic_catalyst), new ItemStack(ModItems.amorphic_catalyst), new ItemStack(ModItems.blood_infused_iron), new ItemStack(ModItems.blood_infused_iron), new ItemStack(ModItems.blood_infused_iron), new ItemStack(ModItems.blood_infused_glowstone_dust), new ItemStack(ModItems.blood_infused_glowstone_dust) });
|
||||
new BloodArsenalResearchItem("CAP_blood_iron", FORBIDDEN, (new AspectList()).add(Aspect.LIFE, 6).add(Aspect.TOOL, 2), 2, -5, 2, new ItemStack(ModItems.wandCap, 1, 0)).setPages(new ResearchPage("blood_arsenal.research_page.CAP_blood_iron.1"), new ResearchPage(cap_blood_iron)).setParents("ROD_blood_wood", "CAP_alchemical").registerResearchItem();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* Taken from SpitefulFox's ForbiddenMagic
|
||||
* https://github.com/SpitefulFox/ForbiddenMagic
|
||||
*/
|
||||
|
||||
package com.arc.bloodarsenal.common.thaumcraft;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.wands.WandCap;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BloodyWandCap extends WandCap
|
||||
{
|
||||
public BloodyWandCap(String tag, float discount, ItemStack item, int craftCost, ResourceLocation skin) {
|
||||
super(tag, discount, item, craftCost);
|
||||
this.setTexture(skin);
|
||||
}
|
||||
|
||||
public BloodyWandCap(String tag, float discount, List<Aspect> specialAspects, float discountSpecial, ItemStack item, int craftCost, ResourceLocation skin) {
|
||||
super(tag, discount, specialAspects, discountSpecial, item, craftCost);
|
||||
this.setTexture(skin);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
/**
|
||||
* Taken from SpitefulFox's ForbiddenMagic
|
||||
* https://github.com/SpitefulFox/ForbiddenMagic
|
||||
*/
|
||||
|
||||
package com.arc.bloodarsenal.common.thaumcraft;
|
||||
|
||||
import com.arc.bloodarsenal.common.BloodArsenal;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemWandCaps extends Item
|
||||
{
|
||||
public final String[] types = new String[]{"blood_iron"};
|
||||
public IIcon[] icon;
|
||||
|
||||
public ItemWandCaps()
|
||||
{
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(BloodArsenal.BA_TAB);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir)
|
||||
{
|
||||
this.icon = new IIcon[this.types.length];
|
||||
|
||||
for (int x = 0; x < this.types.length; ++x)
|
||||
{
|
||||
this.icon[x] = ir.registerIcon("BloodArsenal:wand_cap_" + this.types[x]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int p_77617_1_)
|
||||
{
|
||||
return this.icon[p_77617_1_];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int wand = 0; wand < this.types.length; ++wand)
|
||||
{
|
||||
list.add(new ItemStack(this, 1, wand));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack p_77667_1_)
|
||||
{
|
||||
return super.getUnlocalizedName() + "." + this.types[p_77667_1_.getItemDamage()];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/**
|
||||
* Taken from SpitefulFox's ForbiddenMagic
|
||||
* https://github.com/SpitefulFox/ForbiddenMagic
|
||||
*/
|
||||
|
||||
package com.arc.bloodarsenal.common.thaumcraft;
|
||||
|
||||
import com.arc.bloodarsenal.common.BloodArsenal;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import thaumcraft.api.wands.WandCap;
|
||||
import thaumcraft.api.wands.WandRod;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.items.wands.ItemWandCasting;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemWandCores extends Item
|
||||
{
|
||||
public final String[] types = new String[]{"blood_wood"};
|
||||
public IIcon[] icon;
|
||||
|
||||
public ItemWandCores()
|
||||
{
|
||||
setMaxDamage(0);
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(BloodArsenal.BA_TAB);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister ir)
|
||||
{
|
||||
this.icon = new IIcon[this.types.length];
|
||||
|
||||
for (int x = 0; x < this.types.length; ++x)
|
||||
{
|
||||
this.icon[x] = ir.registerIcon("BloodArsenal:wand_rod_" + this.types[x]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIconFromDamage(int p_77617_1_)
|
||||
{
|
||||
return this.icon[p_77617_1_];
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, List list)
|
||||
{
|
||||
for (int wand = 0; wand < this.types.length; ++wand)
|
||||
{
|
||||
list.add(new ItemStack(this, 1, wand));
|
||||
}
|
||||
|
||||
ItemStack var5;
|
||||
var5 = new ItemStack(ConfigItems.itemWandCasting, 1, 84);
|
||||
((ItemWandCasting)var5.getItem()).setCap(var5, (WandCap)WandCap.caps.get("blood_iron"));
|
||||
((ItemWandCasting)var5.getItem()).setRod(var5, (WandRod) WandRod.rods.get("blood_wood"));
|
||||
list.add(var5);
|
||||
var5 = new ItemStack(ConfigItems.itemWandCasting, 1, 168);
|
||||
((ItemWandCasting)var5.getItem()).setCap(var5, (WandCap)WandCap.caps.get("blood_iron"));
|
||||
((ItemWandCasting)var5.getItem()).setRod(var5, (WandRod)WandRod.rods.get("blood_wood_staff"));
|
||||
list.add(var5);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack p_77667_1_)
|
||||
{
|
||||
return super.getUnlocalizedName() + "." + this.types[p_77667_1_.getItemDamage()];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user