Added sentient armour gem recipe. Added ability for Tartaric gems to fill other gems.
This commit is contained in:
parent
e2a007d932
commit
1242fefc30
|
@ -1,3 +1,11 @@
|
|||
------------------------------------------------------
|
||||
Version 2.0.0-10
|
||||
------------------------------------------------------
|
||||
- Added recipe for Sentient Armour - craft a Sentient Armour Gem and right click with it to toggle the armour.
|
||||
- Added recipes for the Greater and Grand Tartaric gems. These are temporary recipes.
|
||||
- Updated textures.
|
||||
- Added ability to fill gems from other gems. Right click with a gem to fill other gems in your inventory.
|
||||
|
||||
------------------------------------------------------
|
||||
Version 2.0.0-9
|
||||
------------------------------------------------------
|
||||
|
|
|
@ -140,4 +140,32 @@ public class PlayerDemonWillHandler
|
|||
|
||||
return amount - remaining;
|
||||
}
|
||||
|
||||
public static double addDemonWill(EntityPlayer player, double amount, ItemStack ignored)
|
||||
{
|
||||
ItemStack[] inventory = player.inventory.mainInventory;
|
||||
double remaining = amount;
|
||||
|
||||
for (int i = 0; i < inventory.length; i++)
|
||||
{
|
||||
ItemStack stack = inventory[i];
|
||||
if (stack != null && !stack.equals(ignored))
|
||||
{
|
||||
if (stack.getItem() instanceof IDemonWillGem)
|
||||
{
|
||||
double souls = ((IDemonWillGem) stack.getItem()).getWill(stack);
|
||||
double fill = Math.min(((IDemonWillGem) stack.getItem()).getMaxWill(stack) - souls, remaining);
|
||||
((IDemonWillGem) stack.getItem()).setWill(stack, fill + souls);
|
||||
remaining -= fill;
|
||||
|
||||
if (remaining <= 0)
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return amount - remaining;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -189,12 +189,12 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor
|
|||
{
|
||||
if (this == ModItems.livingArmourChest || this == ModItems.livingArmourHelmet || this == ModItems.livingArmourBoots)
|
||||
{
|
||||
return "bloodmagic:models/armor/boundArmour_layer_1.png";
|
||||
return "bloodmagic:models/armor/livingArmour_layer_1.png";
|
||||
}
|
||||
|
||||
if (this == ModItems.livingArmourLegs)
|
||||
{
|
||||
return "bloodmagic:models/armor/boundArmour_layer_2.png";
|
||||
return "bloodmagic:models/armor/livingArmour_layer_2.png";
|
||||
} else
|
||||
{
|
||||
return null;
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package WayofTime.bloodmagic.item.armour;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -260,6 +262,8 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor
|
|||
}
|
||||
|
||||
omegaTag.setTag("armour", tag);
|
||||
Map<Integer, Integer> enchantmentMap = EnchantmentHelper.getEnchantments(previousArmour);
|
||||
EnchantmentHelper.setEnchantments(enchantmentMap, newArmour);
|
||||
}
|
||||
|
||||
public ItemStack getContainedArmourStack(ItemStack newArmour)
|
||||
|
|
|
@ -14,9 +14,9 @@ import WayofTime.bloodmagic.item.armour.ItemSentientArmour;
|
|||
|
||||
public class ItemSentientArmourGem extends Item
|
||||
{
|
||||
public static double[] willBracket = new double[] { 30, 200, 600, 1500, 4000, 6000, 8000 };
|
||||
public static double[] consumptionPerHit = new double[] { 0.1, 0.12, 0.15, 0.2, 0.3, 0.35, 0.4 };
|
||||
public static double[] extraProtectionLevel = new double[] { 0, 0.25, 0.5, 0.6, 0.7, 0.75, 0.85 };
|
||||
public static double[] willBracket = new double[] { 30, 200, 600, 1500, 4000, 6000, 8000, 16000 };
|
||||
public static double[] consumptionPerHit = new double[] { 0.1, 0.12, 0.15, 0.2, 0.3, 0.35, 0.4, 0.5 };
|
||||
public static double[] extraProtectionLevel = new double[] { 0, 0.25, 0.5, 0.6, 0.7, 0.75, 0.85, 0.9 };
|
||||
|
||||
public ItemSentientArmourGem()
|
||||
{
|
||||
|
@ -52,7 +52,7 @@ public class ItemSentientArmourGem extends Item
|
|||
|
||||
if (bracket >= 0)
|
||||
{
|
||||
PlayerDemonWillHandler.consumeDemonWill(player, willBracket[bracket]);
|
||||
// PlayerDemonWillHandler.consumeDemonWill(player, willBracket[bracket]);
|
||||
ItemSentientArmour.convertPlayerArmour(player, consumptionPerHit[bracket], extraProtectionLevel[bracket]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,12 +7,14 @@ import net.minecraft.entity.player.EntityPlayer;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import WayofTime.bloodmagic.BloodMagic;
|
||||
import WayofTime.bloodmagic.api.Constants;
|
||||
import WayofTime.bloodmagic.api.soul.IDemonWill;
|
||||
import WayofTime.bloodmagic.api.soul.IDemonWillGem;
|
||||
import WayofTime.bloodmagic.api.soul.PlayerDemonWillHandler;
|
||||
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
|
||||
import WayofTime.bloodmagic.util.helper.TextHelper;
|
||||
|
||||
|
@ -37,6 +39,17 @@ public class ItemSoulGem extends Item implements IDemonWillGem
|
|||
return super.getUnlocalizedName(stack) + names[stack.getItemDamage()];
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
double drain = Math.min(this.getWill(stack), this.getMaxWill(stack) / 10);
|
||||
|
||||
double filled = PlayerDemonWillHandler.addDemonWill(player, drain, stack);
|
||||
this.drainWill(stack, filled);
|
||||
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item id, CreativeTabs creativeTab, List<ItemStack> list)
|
||||
|
|
|
@ -160,6 +160,8 @@ public class ModRecipes
|
|||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem), 1, 1, "dustRedstone", "ingotGold", "blockGlass", "dyeBlue");
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 1), 60, 20, new ItemStack(ModItems.soulGem), "gemDiamond", "blockRedstone", "blockLapis");
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 2), 240, 50, new ItemStack(ModItems.soulGem, 1, 1), "gemDiamond", "blockGold", new ItemStack(ModItems.slate, 1, 2));
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 3), 1000, 100, new ItemStack(ModItems.soulGem, 1, 2), new ItemStack(ModItems.slate, 1, 3), new ItemStack(ModItems.bloodShard), Items.blaze_rod);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.soulGem, 1, 4), 4000, 500, new ItemStack(ModItems.soulGem, 1, 3), Items.nether_star);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientSword), 0, 0, new ItemStack(ModItems.soulGem), new ItemStack(Items.iron_sword));
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientBow), 70, 0, new ItemStack(Items.bow), new ItemStack(ModItems.soulGem, 1, 1), Items.string, Items.string);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.arcaneAshes), 0, 0, "dustRedstone", "dyeWhite", new ItemStack(Items.gunpowder), Items.coal);
|
||||
|
@ -173,6 +175,7 @@ public class ModRecipes
|
|||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_AFFINITY), 300, 30, ModItems.sigilWater, ModItems.sigilAir, ModItems.sigilLava, Blocks.obsidian);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_SUPPRESSION), 500, 50, ModBlocks.teleposer, Items.water_bucket, Items.lava_bucket, Items.blaze_rod);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.REAGENT_BINDING), 400, 10, "dustGlowstone", "dustRedstone", "nuggetGold", Items.gunpowder);
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.sentientArmourGem), 240, 150, Items.diamond_chestplate, new ItemStack(ModItems.soulGem, 1, 1), Blocks.iron_block, Blocks.obsidian);
|
||||
|
||||
TartaricForgeRecipeRegistry.registerRecipe(ItemComponent.getStack(ItemComponent.COMPONENT_FRAME_PART), 400, 10, "blockGlass", "stone", new ItemStack(ModItems.slate));
|
||||
TartaricForgeRecipeRegistry.registerRecipe(new ItemStack(ModItems.nodeRouter), 400, 5, Items.stick, new ItemStack(ModItems.slate, 1, 1), "gemLapis", "gemLapis");
|
||||
|
|
|
@ -102,6 +102,10 @@ item.BloodMagic.livingArmour.helmet.name=Living Helmet
|
|||
item.BloodMagic.livingArmour.chest.name=Living Chestplate
|
||||
item.BloodMagic.livingArmour.legs.name=Living Leggings
|
||||
item.BloodMagic.livingArmour.boots.name=Living Boots
|
||||
item.BloodMagic.sentientArmour.helmet.name=Sentient Helmet
|
||||
item.BloodMagic.sentientArmour.chest.name=Sentient Chestplate
|
||||
item.BloodMagic.sentientArmour.legs.name=Sentient Leggings
|
||||
item.BloodMagic.sentientArmour.boots.name=Sentient Boots
|
||||
|
||||
item.BloodMagic.altarMaker.name=Altar Maker
|
||||
|
||||
|
@ -120,6 +124,7 @@ item.BloodMagic.soulGem.greater.name=Greater Tartaric Gem
|
|||
item.BloodMagic.soulGem.grand.name=Grand Tartaric Gem
|
||||
item.BloodMagic.soulSnare.base.name=Rudimentary Snare
|
||||
item.BloodMagic.sentientBow.name=Sentient Bow
|
||||
item.BloodMagic.sentientArmourGem.name=Sentient Armour Gem
|
||||
|
||||
item.BloodMagic.nodeRouter.name=Node Router
|
||||
item.BloodMagic.itemFilter.exact.name=Precise Item Filter
|
||||
|
|
Loading…
Reference in a new issue