Updated for 1.7.2
This commit is contained in:
parent
cc178e1a3b
commit
29228e18fe
105 changed files with 1939 additions and 2690 deletions
|
|
@ -1,10 +1,9 @@
|
|||
package mysticworld.items;
|
||||
|
||||
import mysticworld.MysticWorld;
|
||||
import net.minecraft.client.renderer.texture.IconRegister;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.EnumArmorMaterial;
|
||||
import net.minecraft.item.ItemArmor;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.potion.Potion;
|
||||
|
|
@ -14,44 +13,44 @@ import net.minecraft.world.World;
|
|||
public class ItemArmorIridium extends ItemArmor {
|
||||
int ArmorType;
|
||||
|
||||
public ItemArmorIridium(int par1, EnumArmorMaterial par2EnumArmorMaterial, int par3, int par4) {
|
||||
super(par1, par2EnumArmorMaterial, par3, par4);
|
||||
public ItemArmorIridium(ArmorMaterial par2EnumArmorMaterial, int par4) {
|
||||
super(par2EnumArmorMaterial, 0, par4);
|
||||
this.ArmorType = par4;
|
||||
this.setMaxDamage(4000);
|
||||
this.setCreativeTab(MysticWorld.MysticWorldTab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, int layer) {
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, int slot, String layer) {
|
||||
int suffix = this.armorType == 2 ? 2 : 1;
|
||||
return "mysticworld:textures/models/armor/Iridium_layer_" + suffix + ".png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onArmorTickUpdate(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
ItemStack helmet = player.getCurrentItemOrArmor(4);
|
||||
ItemStack plate = player.getCurrentItemOrArmor(3);
|
||||
ItemStack legs = player.getCurrentItemOrArmor(2);
|
||||
ItemStack boots = player.getCurrentItemOrArmor(1);
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
ItemStack helmet = player.getEquipmentInSlot(4);
|
||||
ItemStack plate = player.getEquipmentInSlot(3);
|
||||
ItemStack legs = player.getEquipmentInSlot(2);
|
||||
ItemStack boots = player.getEquipmentInSlot(1);
|
||||
if (helmet != null) {
|
||||
if (helmet.itemID == ItemHandler.iridiumHelmet.itemID) {
|
||||
if (helmet.getItem() == ItemHandler.iridiumHelmet) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.nightVision.getId(), 200, 0)));
|
||||
}
|
||||
}
|
||||
if (plate != null) {
|
||||
if (plate.itemID == ItemHandler.iridiumChestplate.itemID) {
|
||||
if (plate.getItem() == ItemHandler.iridiumChestplate) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.regeneration.getId(), 200, 0)));
|
||||
}
|
||||
}
|
||||
if (legs != null) {
|
||||
if (legs.itemID == ItemHandler.iridiumLeggings.itemID) {
|
||||
if (legs.getItem() == ItemHandler.iridiumLeggings) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.moveSpeed.getId(), 200, 2)));
|
||||
player.addVelocity(0.0005, 0, 0.0005);
|
||||
player.stepHeight = 1.001F;
|
||||
}
|
||||
}
|
||||
if (boots != null) {
|
||||
if (boots.itemID == ItemHandler.iridiumBoots.itemID) {
|
||||
if (boots.getItem() == ItemHandler.iridiumBoots) {
|
||||
player.fallDistance = 0.0F;
|
||||
player.addPotionEffect((new PotionEffect(Potion.jump.getId(), 200, 2)));
|
||||
}
|
||||
|
|
@ -59,7 +58,7 @@ public class ItemArmorIridium extends ItemArmor {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void registerIcons(IconRegister iconRegister) {
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
itemIcon = iconRegister.registerIcon("mysticworld:IridiumArmor_" + ArmorType);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue