mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-22 05:02:28 +00:00
add vis discount/warp to armor (#34)
+ 15 vis discount to draconic armor + 10 vis discount and 5 warp to wyvern armor Draconic/Wyvern armor through and through consists of magic (ichorium and BM armor)! Vis discount time !
This commit is contained in:
1 parent
089a43ce68
commit
6986bbcf0e
2 files changed
+44
-8
No files matched your search
+11
-5
@@ -16,6 +16,7 @@ import net.minecraft.item.*;
|
||||
import net.minecraft.potion.Potion;
|
||||
import net.minecraft.potion.PotionEffect;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
@@ -227,9 +228,17 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
InfoHelper.addEnergyAndLore(stack, list);
|
||||
ToolBase.holdCTRLForUpgrades(list, stack);
|
||||
if (Loader.isModLoaded("Thaumcraft")) {
|
||||
list.add("");
|
||||
list.add(
|
||||
EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
|
||||
+ ": "
|
||||
+ this.getVisDiscount(stack, player, (Aspect) null)
|
||||
+ "%");
|
||||
}
|
||||
}
|
||||
|
||||
public boolean clearNegativeEffects(Entity par3Entity) {
|
||||
@@ -399,10 +408,7 @@ public class DraconicArmor extends ItemArmor implements ISpecialArmor, IConfigur
|
||||
@Override
|
||||
@Method(modid = "Thaumcraft")
|
||||
public int getVisDiscount(ItemStack itemStack, EntityPlayer entityPlayer, Aspect aspect) {
|
||||
if (itemStack == null || itemStack.getItem() != ModItems.draconicHelm) {
|
||||
return 0;
|
||||
}
|
||||
return IConfigurableItem.ProfileHelper.getBoolean(itemStack, "GogglesOfRevealing", true) ? 5 : 0;
|
||||
return 15;
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
+33
-3
@@ -13,11 +13,16 @@ import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.util.DamageSource;
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ISpecialArmor;
|
||||
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
|
||||
import com.brandon3055.brandonscore.BrandonsCore;
|
||||
import com.brandon3055.brandonscore.common.utills.InfoHelper;
|
||||
import com.brandon3055.brandonscore.common.utills.ItemNBTHelper;
|
||||
@@ -36,6 +41,8 @@ import com.brandon3055.draconicevolution.common.utills.IInventoryTool;
|
||||
import com.brandon3055.draconicevolution.common.utills.IUpgradableItem;
|
||||
import com.brandon3055.draconicevolution.common.utills.ItemConfigField;
|
||||
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
@@ -43,8 +50,11 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
/**
|
||||
* Created by Brandon on 3/07/2014.
|
||||
*/
|
||||
public class WyvernArmor extends ItemArmor
|
||||
implements ISpecialArmor, IConfigurableItem, IInventoryTool, IUpgradableItem, ICustomArmor {
|
||||
@Optional.InterfaceList(
|
||||
value = { @Optional.Interface(iface = "thaumcraft.api.IVisDiscountGear", modid = "Thaumcraft"),
|
||||
@Optional.Interface(iface = "thaumcraft.api.IWarpingGear", modid = "Thaumcraft"), })
|
||||
public class WyvernArmor extends ItemArmor implements ISpecialArmor, IConfigurableItem, IInventoryTool, IUpgradableItem,
|
||||
ICustomArmor, IVisDiscountGear, IWarpingGear {
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon helmIcon;
|
||||
@@ -185,9 +195,17 @@ public class WyvernArmor extends ItemArmor
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer par2EntityPlayer, List list, boolean par4) {
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
InfoHelper.addEnergyAndLore(stack, list);
|
||||
ToolBase.holdCTRLForUpgrades(list, stack);
|
||||
if (Loader.isModLoaded("Thaumcraft")) {
|
||||
list.add("");
|
||||
list.add(
|
||||
EnumChatFormatting.DARK_PURPLE + StatCollector.translateToLocal("tc.visdiscount")
|
||||
+ ": "
|
||||
+ this.getVisDiscount(stack, player, (Aspect) null)
|
||||
+ "%");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -467,4 +485,16 @@ public class WyvernArmor extends ItemArmor
|
||||
public boolean hasProfiles() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public int getVisDiscount(ItemStack itemStack, EntityPlayer entityPlayer, Aspect aspect) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Optional.Method(modid = "Thaumcraft")
|
||||
public int getWarp(ItemStack itemStack, EntityPlayer entityPlayer) {
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user