Made all item fields final
This commit is contained in:
parent
537ccc092c
commit
24b4c4b8d1
42 changed files with 445 additions and 462 deletions
|
@ -73,7 +73,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
@Override
|
||||
public void onCreated(ItemStack stack, World world, EntityPlayer player)
|
||||
{
|
||||
if (stack != null && !world.isRemote && stack.getItem() == ModItems.livingArmourChest)
|
||||
if (stack != null && !world.isRemote && stack.getItem() == ModItems.LIVING_ARMOUR_CHEST)
|
||||
{
|
||||
Utils.setUUID(stack);
|
||||
}
|
||||
|
@ -82,12 +82,12 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
@Override
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type)
|
||||
{
|
||||
if (this == ModItems.livingArmourChest || this == ModItems.livingArmourHelmet || this == ModItems.livingArmourBoots)
|
||||
if (this == ModItems.LIVING_ARMOUR_CHEST || this == ModItems.LIVING_ARMOUR_HELMET || this == ModItems.LIVING_ARMOUR_BOOTS)
|
||||
{
|
||||
return "bloodmagic:models/armor/livingArmour_layer_1.png";
|
||||
}
|
||||
|
||||
if (this == ModItems.livingArmourLegs)
|
||||
if (this == ModItems.LIVING_ARMOUR_LEGS)
|
||||
{
|
||||
return "bloodmagic:models/armor/livingArmour_layer_2.png";
|
||||
} else
|
||||
|
@ -120,13 +120,13 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
double armourReduction = 0.0;
|
||||
double damageAmount = 0.25;
|
||||
|
||||
if (this == ModItems.livingArmourBoots || this == ModItems.livingArmourHelmet)
|
||||
if (this == ModItems.LIVING_ARMOUR_BOOTS || this == ModItems.LIVING_ARMOUR_HELMET)
|
||||
{
|
||||
damageAmount = 3d / 20d * 0.6;
|
||||
} else if (this == ModItems.livingArmourLegs)
|
||||
} else if (this == ModItems.LIVING_ARMOUR_LEGS)
|
||||
{
|
||||
damageAmount = 6d / 20d * 0.6;
|
||||
} else if (this == ModItems.livingArmourChest)
|
||||
} else if (this == ModItems.LIVING_ARMOUR_CHEST)
|
||||
{
|
||||
damageAmount = 0.64;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
return new ArmorProperties(-1, 0, 0);
|
||||
}
|
||||
|
||||
if (this == ModItems.livingArmourChest)
|
||||
if (this == ModItems.LIVING_ARMOUR_CHEST)
|
||||
{
|
||||
armourReduction = 0.24 / 0.64; // This values puts it at iron level
|
||||
|
||||
|
@ -203,22 +203,22 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
@Override
|
||||
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot)
|
||||
{
|
||||
if (armor.getItem() == ModItems.livingArmourHelmet)
|
||||
if (armor.getItem() == ModItems.LIVING_ARMOUR_HELMET)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
if (armor.getItem() == ModItems.livingArmourChest)
|
||||
if (armor.getItem() == ModItems.LIVING_ARMOUR_CHEST)
|
||||
{
|
||||
return 8;
|
||||
}
|
||||
|
||||
if (armor.getItem() == ModItems.livingArmourLegs)
|
||||
if (armor.getItem() == ModItems.LIVING_ARMOUR_LEGS)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
if (armor.getItem() == ModItems.livingArmourBoots)
|
||||
if (armor.getItem() == ModItems.LIVING_ARMOUR_BOOTS)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
@Override
|
||||
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot)
|
||||
{
|
||||
if (this == ModItems.livingArmourChest)
|
||||
if (this == ModItems.LIVING_ARMOUR_CHEST)
|
||||
{
|
||||
if (source.isUnblockable())
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
if (!stack.hasTagCompound())
|
||||
return;
|
||||
|
||||
if (this == ModItems.livingArmourChest)
|
||||
if (this == ModItems.LIVING_ARMOUR_CHEST)
|
||||
{
|
||||
LivingArmour armour = getLivingArmourFromStack(stack);
|
||||
for (Entry<String, LivingArmourUpgrade> entry : armour.upgradeMap.entrySet())
|
||||
|
@ -312,7 +312,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
{
|
||||
super.onArmorTick(world, player, stack);
|
||||
|
||||
if (world.isRemote && this == ModItems.livingArmourChest)
|
||||
if (world.isRemote && this == ModItems.LIVING_ARMOUR_CHEST)
|
||||
{
|
||||
if (player instanceof EntityPlayerSP) //Sanity check
|
||||
{
|
||||
|
@ -365,7 +365,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
return;
|
||||
}
|
||||
|
||||
if (this == ModItems.livingArmourChest)
|
||||
if (this == ModItems.LIVING_ARMOUR_CHEST)
|
||||
{
|
||||
if (!hasLivingArmour(stack))
|
||||
{
|
||||
|
@ -386,7 +386,7 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
@Override
|
||||
public Multimap<String, AttributeModifier> getAttributeModifiers(EntityEquipmentSlot slot, ItemStack stack)
|
||||
{
|
||||
if (this == ModItems.livingArmourChest && isEnabled(stack) && slot == EntityEquipmentSlot.CHEST)
|
||||
if (this == ModItems.LIVING_ARMOUR_CHEST && isEnabled(stack) && slot == EntityEquipmentSlot.CHEST)
|
||||
{
|
||||
LivingArmour armour = ItemLivingArmour.getLivingArmourFromStack(stack);
|
||||
|
||||
|
@ -412,11 +412,11 @@ public class ItemLivingArmour extends ItemArmor implements ISpecialArmor, IMeshP
|
|||
public ModelResourceLocation getModelLocation(ItemStack stack)
|
||||
{
|
||||
assert getCustomLocation() != null;
|
||||
if (stack.getItem() == ModItems.livingArmourHelmet)
|
||||
if (stack.getItem() == ModItems.LIVING_ARMOUR_HELMET)
|
||||
return new ModelResourceLocation(getCustomLocation(), "armour=head");
|
||||
else if (stack.getItem() == ModItems.livingArmourChest)
|
||||
else if (stack.getItem() == ModItems.LIVING_ARMOUR_CHEST)
|
||||
return new ModelResourceLocation(getCustomLocation(), "armour=body");
|
||||
else if (stack.getItem() == ModItems.livingArmourLegs)
|
||||
else if (stack.getItem() == ModItems.LIVING_ARMOUR_LEGS)
|
||||
return new ModelResourceLocation(getCustomLocation(), "armour=leg");
|
||||
else
|
||||
return new ModelResourceLocation(getCustomLocation(), "armour=feet");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue