Ton of null fixes

This commit is contained in:
Vincent Lee committed 2017-01-05 03:44:13 -06:00
1 parent a87dd1d46b
commit 24779ded1c
132 files changed
+403 -325

No files matched your search

@@ -51,7 +51,7 @@ public interface IManaProficiencyArmor {
if(e.getSlotType() != EntityEquipmentSlot.Type.ARMOR)
continue;
ItemStack armor = player.getItemStackFromSlot(e);
if(armor != null) {
if(!armor.isEmpty()) {
Item item = armor.getItem();
if(item instanceof IManaProficiencyArmor && ((IManaProficiencyArmor) item).shouldGiveProficiency(armor, e, player, rod)) {
proficient = true;
@@ -59,7 +59,7 @@ public final class LexiconRecipeMappings {
}
public static String stackToString(ItemStack stack, boolean forceIgnore) {
if(stack == null || stack.getItem() == null)
if(stack.isEmpty())
return "NULL";
if(stack.hasTagCompound() && stack.getItem() instanceof IRecipeKeyProvider)