mirror of
https://github.com/GTNewHorizons/Tainted-Magic.git
synced 2026-11-27 23:33:20 +00:00
Cleanup, text fixes, and Voidmetal Goggles of Revealing
This commit is contained in:
1 parent
3d3326c5ec
commit
d0c9d9fd80
14 files changed
+113
-14
No files matched your search
@@ -0,0 +1,67 @@
|
||||
package taintedmagic.common.items.equipment;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
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.ItemArmor.ArmorMaterial;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.items.armor.ItemGoggles;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
public class ItemVoidmetalGoggles extends ItemGoggles implements IWarpingGear
|
||||
{
|
||||
public ItemVoidmetalGoggles (ArmorMaterial m, int j, int k)
|
||||
{
|
||||
super(m, j, k);
|
||||
this.setMaxDamage(250);
|
||||
this.setCreativeTab(TaintedMagic.tabTaintedMagic);
|
||||
this.setUnlocalizedName("ItemVoidmetalGoggles");
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void registerIcons (IIconRegister ir)
|
||||
{
|
||||
this.icon = ir.registerIcon("taintedmagic:ItemVoidmetalGoggles");
|
||||
}
|
||||
|
||||
public String getArmorTexture (ItemStack s, Entity e, int slot, String type)
|
||||
{
|
||||
return "taintedmagic:textures/models/ModelVoidmetalGoggles.png";
|
||||
}
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getWarp (ItemStack s, EntityPlayer p)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getVisDiscount (ItemStack stack, EntityPlayer player, Aspect aspect)
|
||||
{
|
||||
return 10;
|
||||
}
|
||||
|
||||
public void onUpdate (ItemStack s, World w, Entity e, int j, boolean k)
|
||||
{
|
||||
super.onUpdate(s, w, e, j, k);
|
||||
if (!w.isRemote && s.isItemDamaged() && e.ticksExisted % 20 == 0 && e instanceof EntityLivingBase) s.damageItem(-1, (EntityLivingBase) e);
|
||||
}
|
||||
|
||||
public void onArmorTick (World w, EntityPlayer p, ItemStack s)
|
||||
{
|
||||
super.onArmorTick(w, p, s);
|
||||
if (!w.isRemote && s.getItemDamage() > 0 && p.ticksExisted % 20 == 0) s.damageItem(-1, p);
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.EnumRarity;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
@@ -16,12 +17,14 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.StatCollector;
|
||||
import taintedmagic.common.TaintedMagic;
|
||||
import taintedmagic.common.registry.ItemRegistry;
|
||||
import thaumcraft.api.IGoggles;
|
||||
import thaumcraft.api.IRepairable;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.IWarpingGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.api.nodes.IRevealer;
|
||||
import thaumcraft.common.config.ConfigItems;
|
||||
import thaumcraft.common.items.armor.ItemGoggles;
|
||||
|
||||
public class ItemWarpedGoggles extends ItemGoggles implements IWarpingGear
|
||||
@@ -47,7 +50,7 @@ public class ItemWarpedGoggles extends ItemGoggles implements IWarpingGear
|
||||
|
||||
public EnumRarity getRarity (ItemStack s)
|
||||
{
|
||||
return EnumRarity.uncommon;
|
||||
return EnumRarity.rare;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,4 +58,9 @@ public class ItemWarpedGoggles extends ItemGoggles implements IWarpingGear
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public boolean getIsRepairable (ItemStack s, ItemStack s2)
|
||||
{
|
||||
return (s2.isItemEqual(new ItemStack(ItemRegistry.ItemMaterial)) && s2.getItemDamage() == 0) ? true : super.getIsRepairable(s, s2);
|
||||
}
|
||||
}
|
||||
@@ -156,10 +156,10 @@ public class ItemKatana extends Item implements IWarpingGear, IRepairable
|
||||
}
|
||||
|
||||
@SideOnly (Side.CLIENT)
|
||||
public void getSubItems (Item item, CreativeTabs c, List l)
|
||||
public void getSubItems (Item i, CreativeTabs c, List l)
|
||||
{
|
||||
for (int i = 0; i < SUBTYPES; i++)
|
||||
l.add(new ItemStack(this, 1, i));
|
||||
for (int a = 0; a < SUBTYPES; a++)
|
||||
l.add(new ItemStack(this, 1, a));
|
||||
}
|
||||
|
||||
public String getUnlocalizedName (ItemStack s)
|
||||
|
||||
Reference in new issue
Block a user