Added the Draft of Angelus, which increases the max number of upgrade points for Living Armour.
This commit is contained in:
parent
e509b4fe69
commit
f8859dbf56
|
@ -1,3 +1,8 @@
|
|||
------------------------------------------------------
|
||||
Version 2.0.2-44
|
||||
------------------------------------------------------
|
||||
- Added the Draft of Angelus, which increases the max number of upgrade points for Living Armour. It's strawberry flavoured!
|
||||
|
||||
------------------------------------------------------
|
||||
Version 2.0.1-43
|
||||
------------------------------------------------------
|
||||
|
|
|
@ -229,7 +229,8 @@ public class Constants
|
|||
SIGIL_TRANSPOSITION("ItemSigilTransposition"),
|
||||
RITUAL_READER("ItemRitualReader"),
|
||||
SANGUINE_BOOK("ItemSanguineBook"),
|
||||
SIGIL_HOLDING("ItemSigilHolding"), ;
|
||||
SIGIL_HOLDING("ItemSigilHolding"),
|
||||
ARMOUR_POINTS_UPGRADE("ItemLivingArmourPointsUpgrade"), ;
|
||||
|
||||
@Getter
|
||||
private final String regName;
|
||||
|
|
|
@ -48,6 +48,8 @@ public class ItemComponent extends Item implements IVariantProvider
|
|||
public static final String PLANT_OIL = "plantOil";
|
||||
public static final String SULFUR = "sulfur";
|
||||
public static final String SALTPETER = "saltpeter";
|
||||
public static final String NEURO_TOXIN = "neurotoxin";
|
||||
public static final String ANTISEPTIC = "antiseptic";
|
||||
|
||||
public ItemComponent()
|
||||
{
|
||||
|
@ -87,6 +89,8 @@ public class ItemComponent extends Item implements IVariantProvider
|
|||
names.add(22, PLANT_OIL);
|
||||
names.add(23, SULFUR);
|
||||
names.add(24, SALTPETER);
|
||||
names.add(25, NEURO_TOXIN);
|
||||
names.add(26, ANTISEPTIC);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,162 @@
|
|||
package WayofTime.bloodmagic.item.alchemy;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import lombok.Getter;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.effect.EntityLightningBolt;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.init.MobEffects;
|
||||
import net.minecraft.item.EnumAction;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.potion.PotionUtils;
|
||||
import net.minecraft.stats.StatList;
|
||||
import net.minecraft.util.ActionResult;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import WayofTime.bloodmagic.client.IVariantProvider;
|
||||
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
|
||||
import WayofTime.bloodmagic.livingArmour.LivingArmour;
|
||||
import WayofTime.bloodmagic.registry.ModItems;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
public class ItemLivingArmourPointsUpgrade extends Item implements IVariantProvider
|
||||
{
|
||||
@Getter
|
||||
private static ArrayList<String> names = new ArrayList<String>();
|
||||
|
||||
public static final String DRAFT_ANGELUS = "draftAngelus";
|
||||
|
||||
public ItemLivingArmourPointsUpgrade()
|
||||
{
|
||||
super();
|
||||
|
||||
setUnlocalizedName(Constants.Mod.MODID + ".livingPointUpgrade.");
|
||||
setHasSubtypes(true);
|
||||
setCreativeTab(BloodMagic.tabBloodMagic);
|
||||
|
||||
buildItemList();
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
|
||||
{
|
||||
NBTHelper.checkNBT(stack);
|
||||
|
||||
tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect("tooltip.BloodMagic.livingArmourPointsUpgrade.desc", 200))));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemUseFinish(ItemStack stack, World worldIn, EntityLivingBase entityLiving)
|
||||
{
|
||||
EntityPlayer player = entityLiving instanceof EntityPlayer ? (EntityPlayer) entityLiving : null;
|
||||
|
||||
if (player == null || !player.capabilities.isCreativeMode)
|
||||
{
|
||||
--stack.stackSize;
|
||||
}
|
||||
|
||||
if (!worldIn.isRemote)
|
||||
{
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.WITHER, 300, 5));
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.POISON, 300, 5));
|
||||
player.addPotionEffect(new PotionEffect(MobEffects.REGENERATION, 400, 1));
|
||||
|
||||
if (LivingArmour.hasFullSet(player))
|
||||
{
|
||||
ItemStack chestStack = Iterables.toArray(player.getArmorInventoryList(), ItemStack.class)[2];
|
||||
LivingArmour armour = ItemLivingArmour.armourMap.get(chestStack);
|
||||
if (armour != null)
|
||||
{
|
||||
if (armour.maxUpgradePoints < 200)
|
||||
{
|
||||
armour.maxUpgradePoints = 200;
|
||||
((ItemLivingArmour) chestStack.getItem()).setLivingArmour(chestStack, armour, true);
|
||||
ItemLivingArmour.armourMap.put(chestStack, armour);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack)
|
||||
{
|
||||
return 32;
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumAction getItemUseAction(ItemStack stack)
|
||||
{
|
||||
return EnumAction.DRINK;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn, EnumHand hand)
|
||||
{
|
||||
playerIn.setActiveHand(hand);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, itemStackIn);
|
||||
}
|
||||
|
||||
private void buildItemList()
|
||||
{
|
||||
names.add(0, DRAFT_ANGELUS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack)
|
||||
{
|
||||
return super.getUnlocalizedName(stack) + names.get(stack.getItemDamage());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list)
|
||||
{
|
||||
for (int i = 0; i < names.size(); i++)
|
||||
list.add(new ItemStack(id, 1, i));
|
||||
}
|
||||
|
||||
public static ItemStack getStack(String name)
|
||||
{
|
||||
return new ItemStack(ModItems.itemPointsUpgrade, 1, names.indexOf(name));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Pair<Integer, String>> getVariants()
|
||||
{
|
||||
List<Pair<Integer, String>> ret = new ArrayList<Pair<Integer, String>>();
|
||||
for (String name : names)
|
||||
ret.add(new ImmutablePair<Integer, String>(names.indexOf(name), "type=" + name));
|
||||
return ret;
|
||||
}
|
||||
|
||||
public static ItemStack getStack(String key, int stackSize)
|
||||
{
|
||||
ItemStack stack = getStack(key);
|
||||
stack.stackSize = stackSize;
|
||||
|
||||
return stack;
|
||||
}
|
||||
}
|
|
@ -41,6 +41,7 @@ import WayofTime.bloodmagic.item.ItemTelepositionFocus;
|
|||
import WayofTime.bloodmagic.item.ItemUpgradeTome;
|
||||
import WayofTime.bloodmagic.item.ItemUpgradeTrainer;
|
||||
import WayofTime.bloodmagic.item.alchemy.ItemCuttingFluid;
|
||||
import WayofTime.bloodmagic.item.alchemy.ItemLivingArmourPointsUpgrade;
|
||||
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
|
||||
import WayofTime.bloodmagic.item.armour.ItemSentientArmour;
|
||||
import WayofTime.bloodmagic.item.gear.ItemPackSacrifice;
|
||||
|
@ -168,6 +169,8 @@ public class ModItems
|
|||
|
||||
public static Item sanguineBook;
|
||||
|
||||
public static Item itemPointsUpgrade;
|
||||
|
||||
public static Item.ToolMaterial boundToolMaterial = EnumHelper.addToolMaterial("BoundToolMaterial", 4, 1, 10, 8, 50);
|
||||
public static Item.ToolMaterial soulToolMaterial = EnumHelper.addToolMaterial("SoulToolMaterial", 4, 520, 7, 8, 50);
|
||||
|
||||
|
@ -268,6 +271,8 @@ public class ModItems
|
|||
cuttingFluid = registerItem(new ItemCuttingFluid(), Constants.BloodMagicItem.CUTTING_FLUID.getRegName());
|
||||
|
||||
sanguineBook = registerItem(new ItemSanguineBook(), Constants.BloodMagicItem.SANGUINE_BOOK.getRegName());
|
||||
|
||||
itemPointsUpgrade = registerItem(new ItemLivingArmourPointsUpgrade(), Constants.BloodMagicItem.ARMOUR_POINTS_UPGRADE.getRegName());
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
|
|
@ -5,6 +5,7 @@ import java.util.List;
|
|||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemFishFood;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.FurnaceRecipes;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
|
@ -38,6 +39,7 @@ import WayofTime.bloodmagic.compress.StorageBlockCraftingManager;
|
|||
import WayofTime.bloodmagic.item.ItemComponent;
|
||||
import WayofTime.bloodmagic.item.ItemDemonCrystal;
|
||||
import WayofTime.bloodmagic.item.alchemy.ItemCuttingFluid;
|
||||
import WayofTime.bloodmagic.item.alchemy.ItemLivingArmourPointsUpgrade;
|
||||
import WayofTime.bloodmagic.item.soul.ItemSoulGem;
|
||||
import WayofTime.bloodmagic.recipe.alchemyTable.AlchemyTableDyeableRecipe;
|
||||
|
||||
|
@ -331,6 +333,11 @@ public class ModRecipes
|
|||
AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.WHEAT, Items.WHEAT, new ItemStack(Items.DYE, 1, 15));
|
||||
AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.PLANT_OIL), 100, 100, 1, Items.BEETROOT, Items.BEETROOT, Items.BEETROOT, new ItemStack(Items.DYE, 1, 15));
|
||||
|
||||
AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.NEURO_TOXIN), 1000, 100, 2, new ItemStack(Items.FISH, 1, 3));
|
||||
AlchemyTableRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.ANTISEPTIC, 2), 1000, 200, 2, ItemComponent.getStack(ItemComponent.PLANT_OIL), "nuggetGold", Items.WHEAT, Items.SUGAR, Blocks.BROWN_MUSHROOM, Blocks.RED_MUSHROOM);
|
||||
|
||||
AlchemyTableRecipeRegistry.registerRecipe(ItemLivingArmourPointsUpgrade.getStack(ItemLivingArmourPointsUpgrade.DRAFT_ANGELUS), 20000, 400, 3, ItemComponent.getStack(ItemComponent.NEURO_TOXIN), ItemComponent.getStack(ItemComponent.ANTISEPTIC), ItemComponent.getStack(ItemComponent.SAND_GOLD), Items.FERMENTED_SPIDER_EYE, new ItemStack(ModItems.bloodShard, 1, 0), Items.GHAST_TEAR);
|
||||
|
||||
AlchemyTableRecipeRegistry.registerRecipe(new AlchemyTableDyeableRecipe(0, 100, 0, new ItemStack(ModItems.sigilHolding)));
|
||||
}
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ public class RitualUpgradeRemove extends Ritual
|
|||
if (removedUpgrade)
|
||||
{
|
||||
((ItemLivingArmour) chestStack.getItem()).setLivingArmour(chestStack, armour, true);
|
||||
ItemLivingArmour.armourMap.put(chestStack, armour);
|
||||
|
||||
masterRitualStone.setActive(false);
|
||||
|
||||
|
|
|
@ -130,6 +130,16 @@
|
|||
"textures": {
|
||||
"layer0": "bloodmagic:items/Saltpeter"
|
||||
}
|
||||
},
|
||||
"neurotoxin": {
|
||||
"textures": {
|
||||
"layer0": "bloodmagic:items/NeuroToxin"
|
||||
}
|
||||
},
|
||||
"antiseptic": {
|
||||
"textures": {
|
||||
"layer0": "bloodmagic:items/Antiseptic"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"forge_marker": 1,
|
||||
"defaults": {
|
||||
"model": "builtin/generated",
|
||||
"transform": "forge:default-item"
|
||||
},
|
||||
"variants": {
|
||||
"type": {
|
||||
"draftangelus": {
|
||||
"textures": {
|
||||
"layer0": "bloodmagic:items/Coagulant"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -93,6 +93,8 @@ item.BloodMagic.baseComponent.coalSand.name=Coal Sand
|
|||
item.BloodMagic.baseComponent.plantOil.name=Plant Oil
|
||||
item.BloodMagic.baseComponent.sulfur.name=Sulfur
|
||||
item.BloodMagic.baseComponent.saltpeter.name=Saltpeter
|
||||
item.BloodMagic.baseComponent.neurotoxin.name=Neuro Toxin
|
||||
item.BloodMagic.baseComponent.antiseptic.name=Antiseptic
|
||||
|
||||
item.BloodMagic.cuttingFluid.basicCuttingFluid.name=Basic Cutting Fluid
|
||||
item.BloodMagic.cuttingFluid.explosive.name=Explosive Powder
|
||||
|
@ -169,6 +171,8 @@ item.BloodMagic.itemFilter.oreDict.name=Ore Dictionary Item Filter
|
|||
item.BloodMagic.experienceTome.name=Tome of Peritia
|
||||
item.BloodMagic.sanguineBook.name=Book of Sanguine
|
||||
|
||||
item.BloodMagic.livingPointUpgrade.draftAngelus.name=Draft of Angelus
|
||||
|
||||
# Blocks
|
||||
tile.BloodMagic.fluid.lifeEssence.name=Life Essence
|
||||
|
||||
|
@ -290,6 +294,8 @@ tooltip.BloodMagic.sigil.transposition.desc=Feel the power of the Force, my youn
|
|||
tooltip.BloodMagic.sigil.holding.desc=Sigil-ception
|
||||
tooltip.BloodMagic.sigil.holding.sigilInSlot=Slot %d: %s
|
||||
|
||||
tooltip.BloodMagic.livingArmourPointsUpgrade.desc=Increases the max points of Living Armour to %d.
|
||||
|
||||
tooltip.BloodMagic.bound.sword.desc=&oCulling the weak
|
||||
tooltip.BloodMagic.bound.pickaxe.desc=&oDestroying stone without mercy
|
||||
tooltip.BloodMagic.bound.axe.desc=&oDemonic deforestation
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 362 B |
Binary file not shown.
After Width: | Height: | Size: 360 B |
Loading…
Reference in a new issue