Made all item fields final

This commit is contained in:
Nicholas Ignoffo 2016-09-10 17:04:24 -07:00
parent 537ccc092c
commit 24b4c4b8d1
42 changed files with 445 additions and 462 deletions

View file

@ -43,7 +43,7 @@ public class ItemBoundSword extends ItemSword implements IBindable, IActivatable
{
public ItemBoundSword()
{
super(ModItems.boundToolMaterial);
super(ModItems.BOUND_TOOL_MATERIAL);
setUnlocalizedName(Constants.Mod.MODID + ".bound.sword");
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -25,7 +25,6 @@ import net.minecraft.item.EnumAction;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemTool;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
@ -59,7 +58,7 @@ public class ItemBoundTool extends ItemTool implements IBindable, IActivatable
public ItemBoundTool(String name, float damage, Set<Block> effectiveBlocks)
{
super(damage, 1, ModItems.boundToolMaterial, effectiveBlocks);
super(damage, 1, ModItems.BOUND_TOOL_MATERIAL, effectiveBlocks);
setUnlocalizedName(Constants.Mod.MODID + ".bound." + name);
setCreativeTab(BloodMagic.tabBloodMagic);

View file

@ -115,7 +115,7 @@ public class ItemComponent extends Item implements IVariantProvider
public static ItemStack getStack(String name)
{
return new ItemStack(ModItems.itemComponent, 1, names.indexOf(name));
return new ItemStack(ModItems.ITEM_COMPONENT, 1, names.indexOf(name));
}
@Override

View file

@ -68,7 +68,7 @@ public class ItemDemonCrystal extends Item implements IDiscreteDemonWill, IVaria
public static ItemStack getStack(String name)
{
return new ItemStack(ModItems.itemDemonCrystal, 1, names.indexOf(name));
return new ItemStack(ModItems.ITEM_DEMON_CRYSTAL, 1, names.indexOf(name));
}
@Override

View file

@ -75,7 +75,7 @@ public class ItemCuttingFluid extends Item implements IVariantProvider, ICustomA
public static ItemStack getStack(String name)
{
return new ItemStack(ModItems.cuttingFluid, 1, names.indexOf(name));
return new ItemStack(ModItems.CUTTING_FLUID, 1, names.indexOf(name));
}
@Override

View file

@ -25,7 +25,6 @@ import org.apache.commons.lang3.tuple.Pair;
import WayofTime.bloodmagic.BloodMagic;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.util.helper.NBTHelper;
import WayofTime.bloodmagic.client.IVariantProvider;
import WayofTime.bloodmagic.item.armour.ItemLivingArmour;
import WayofTime.bloodmagic.livingArmour.LivingArmour;
@ -137,7 +136,7 @@ public class ItemLivingArmourPointsUpgrade extends Item implements IVariantProvi
public static ItemStack getStack(String name)
{
return new ItemStack(ModItems.itemPointsUpgrade, 1, names.indexOf(name));
return new ItemStack(ModItems.ITEM_POINTS_UPGRADE, 1, names.indexOf(name));
}
@Override

View file

@ -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");

View file

@ -66,7 +66,7 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type)
{
if (this == ModItems.sentientArmourChest || this == ModItems.sentientArmourHelmet || this == ModItems.sentientArmourBoots)
if (this == ModItems.SENTIENT_ARMOUR_CHEST || this == ModItems.SENTIENT_ARMOUR_HELMET || this == ModItems.SENTIENT_ARMOUR_BOOTS)
{
switch (this.getCurrentType(stack))
{
@ -84,7 +84,7 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
return "bloodmagic:models/armor/sentientArmour_layer_1.png";
}
if (this == ModItems.sentientArmourLegs)
if (this == ModItems.SENTIENT_ARMOUR_LEGS)
{
switch (this.getCurrentType(stack))
{
@ -161,13 +161,13 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
double armourReduction = 0.0;
double damageAmount = 0.25;
if (this == ModItems.sentientArmourBoots || this == ModItems.sentientArmourHelmet)
if (this == ModItems.SENTIENT_ARMOUR_BOOTS || this == ModItems.SENTIENT_ARMOUR_HELMET)
{
damageAmount = 3d / 20d * 0.6;
} else if (this == ModItems.sentientArmourLegs)
} else if (this == ModItems.SENTIENT_ARMOUR_LEGS)
{
damageAmount = 6d / 20d * 0.6;
} else if (this == ModItems.sentientArmourChest)
} else if (this == ModItems.SENTIENT_ARMOUR_CHEST)
{
damageAmount = 0.64;
}
@ -186,7 +186,7 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
return new ArmorProperties(-1, 0, 0);
}
if (this == ModItems.sentientArmourChest)
if (this == ModItems.SENTIENT_ARMOUR_CHEST)
{
armourReduction = 0.24 / 0.64; // This values puts it at iron level
@ -232,22 +232,22 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot)
{
if (armor.getItem() == ModItems.sentientArmourHelmet)
if (armor.getItem() == ModItems.SENTIENT_ARMOUR_HELMET)
{
return 3;
}
if (armor.getItem() == ModItems.sentientArmourChest)
if (armor.getItem() == ModItems.SENTIENT_ARMOUR_CHEST)
{
return 8;
}
if (armor.getItem() == ModItems.sentientArmourLegs)
if (armor.getItem() == ModItems.SENTIENT_ARMOUR_LEGS)
{
return 6;
}
if (armor.getItem() == ModItems.sentientArmourBoots)
if (armor.getItem() == ModItems.SENTIENT_ARMOUR_BOOTS)
{
return 3;
}
@ -331,13 +331,13 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
public ModelResourceLocation getModelLocation(ItemStack stack)
{
assert getCustomLocation() != null;
EnumDemonWillType type = ((ItemSentientArmour) ModItems.sentientArmourHelmet).getCurrentType(stack);
EnumDemonWillType type = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_HELMET).getCurrentType(stack);
String additional = "_" + type.getName().toLowerCase();
if (stack.getItem() == ModItems.sentientArmourHelmet)
if (stack.getItem() == ModItems.SENTIENT_ARMOUR_HELMET)
return new ModelResourceLocation(getCustomLocation(), "armour=head" + additional);
else if (stack.getItem() == ModItems.sentientArmourChest)
else if (stack.getItem() == ModItems.SENTIENT_ARMOUR_CHEST)
return new ModelResourceLocation(getCustomLocation(), "armour=body" + additional);
else if (stack.getItem() == ModItems.sentientArmourLegs)
else if (stack.getItem() == ModItems.SENTIENT_ARMOUR_LEGS)
return new ModelResourceLocation(getCustomLocation(), "armour=leg" + additional);
else
return new ModelResourceLocation(getCustomLocation(), "armour=feet" + additional);
@ -444,10 +444,10 @@ public class ItemSentientArmour extends ItemArmor implements ISpecialArmor, IMes
ItemStack bootsStack = player.getItemStackFromSlot(EntityEquipmentSlot.FEET);
{
ItemStack omegaHelmetStack = ((ItemSentientArmour) ModItems.sentientArmourHelmet).getSubstituteStack(type, will, helmetStack);
ItemStack omegaChestStack = ((ItemSentientArmour) ModItems.sentientArmourChest).getSubstituteStack(type, will, chestStack);
ItemStack omegaLeggingsStack = ((ItemSentientArmour) ModItems.sentientArmourLegs).getSubstituteStack(type, will, leggingsStack);
ItemStack omegaBootsStack = ((ItemSentientArmour) ModItems.sentientArmourBoots).getSubstituteStack(type, will, bootsStack);
ItemStack omegaHelmetStack = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_HELMET).getSubstituteStack(type, will, helmetStack);
ItemStack omegaChestStack = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_CHEST).getSubstituteStack(type, will, chestStack);
ItemStack omegaLeggingsStack = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_LEGS).getSubstituteStack(type, will, leggingsStack);
ItemStack omegaBootsStack = ((ItemSentientArmour) ModItems.SENTIENT_ARMOUR_BOOTS).getSubstituteStack(type, will, bootsStack);
player.setItemStackToSlot(EntityEquipmentSlot.HEAD, omegaHelmetStack);
player.setItemStackToSlot(EntityEquipmentSlot.CHEST, omegaChestStack);

View file

@ -103,7 +103,7 @@ public class ItemSentientAxe extends ItemAxe implements IDemonWillWeapon, IMeshP
@Override
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
{
return ModItems.itemDemonCrystal == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
}
public void recalculatePowers(ItemStack stack, World world, EntityPlayer player)
@ -375,7 +375,7 @@ public class ItemSentientAxe extends ItemAxe implements IDemonWillWeapon, IMeshP
double willModifier = killedEntity instanceof EntitySlime ? 0.67 : 1;
IDemonWill soul = ((IDemonWill) ModItems.monsterSoul);
IDemonWill soul = ((IDemonWill) ModItems.MONSTER_SOUL);
for (int i = 0; i <= looting; i++)
{

View file

@ -58,7 +58,7 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool, ISentien
} else
{
ItemStack itemstack = entityIn.getActiveItemStack();
return itemstack != null && itemstack.getItem() == ModItems.sentientBow ? (float) (stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 20.0F : 0.0F;
return itemstack != null && itemstack.getItem() == ModItems.SENTIENT_BOW ? (float) (stack.getMaxItemUseDuration() - entityIn.getItemInUseCount()) / 20.0F : 0.0F;
}
}
});
@ -75,7 +75,7 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool, ISentien
@SideOnly(Side.CLIENT)
public float apply(ItemStack stack, World world, EntityLivingBase entityIn)
{
return ((ItemSentientBow) ModItems.sentientBow).getCurrentType(stack).ordinal();
return ((ItemSentientBow) ModItems.SENTIENT_BOW).getCurrentType(stack).ordinal();
}
});
}
@ -83,7 +83,7 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool, ISentien
@Override
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
{
return ModItems.itemDemonCrystal == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
}
public void recalculatePowers(ItemStack stack, World world, EntityPlayer player)

View file

@ -103,7 +103,7 @@ public class ItemSentientPickaxe extends ItemPickaxe implements IDemonWillWeapon
@Override
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
{
return ModItems.itemDemonCrystal == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
}
public void recalculatePowers(ItemStack stack, World world, EntityPlayer player)
@ -375,7 +375,7 @@ public class ItemSentientPickaxe extends ItemPickaxe implements IDemonWillWeapon
double willModifier = killedEntity instanceof EntitySlime ? 0.67 : 1;
IDemonWill soul = ((IDemonWill) ModItems.monsterSoul);
IDemonWill soul = ((IDemonWill) ModItems.MONSTER_SOUL);
for (int i = 0; i <= looting; i++)
{

View file

@ -103,7 +103,7 @@ public class ItemSentientShovel extends ItemSpade implements IDemonWillWeapon, I
@Override
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
{
return ModItems.itemDemonCrystal == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
}
public void recalculatePowers(ItemStack stack, World world, EntityPlayer player)
@ -375,7 +375,7 @@ public class ItemSentientShovel extends ItemSpade implements IDemonWillWeapon, I
double willModifier = killedEntity instanceof EntitySlime ? 0.67 : 1;
IDemonWill soul = ((IDemonWill) ModItems.monsterSoul);
IDemonWill soul = ((IDemonWill) ModItems.MONSTER_SOUL);
for (int i = 0; i <= looting; i++)
{

View file

@ -73,7 +73,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM
public ItemSentientSword()
{
super(ModItems.soulToolMaterial);
super(ModItems.SOUL_TOOL_MATERIAL);
setUnlocalizedName(Constants.Mod.MODID + ".sentientSword");
setCreativeTab(BloodMagic.tabBloodMagic);
@ -82,7 +82,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM
@Override
public boolean getIsRepairable(ItemStack toRepair, ItemStack repair)
{
return ModItems.itemDemonCrystal == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
return ModItems.ITEM_DEMON_CRYSTAL == repair.getItem() ? true : super.getIsRepairable(toRepair, repair);
}
public void recalculatePowers(ItemStack stack, World world, EntityPlayer player)
@ -347,7 +347,7 @@ public class ItemSentientSword extends ItemSword implements IDemonWillWeapon, IM
double willModifier = killedEntity instanceof EntitySlime ? 0.67 : 1;
IDemonWill soul = ((IDemonWill) ModItems.monsterSoul);
IDemonWill soul = ((IDemonWill) ModItems.MONSTER_SOUL);
for (int i = 0; i <= looting; i++)
{