Cleanup some null checks and remove deprecated methods in Item and Block (#3429)

This commit is contained in:
mezz authored and LexManos committed 2016-11-22 15:20:05 -08:00
1 parent 2823447b6e
commit 2bd8b95a3b
31 files changed
+175 -174

No files matched your search

@@ -20,6 +20,7 @@ import net.minecraftforge.fml.common.registry.GameRegistry;
import java.util.Random;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@Mod(modid = ItemLayerModelDebug.MODID, name = "ForgeDebugItemLayerModel", version = ItemLayerModelDebug.VERSION, acceptableRemoteVersions = "*")
@@ -95,7 +96,7 @@ public class ItemLayerModelDebug
@Override
public int getHarvestLevel(ItemStack stack, String toolClass, @Nullable EntityPlayer player, @Nullable IBlockState blockState) {
// This tool is a super pickaxe if the player is wearing a helment
if("pickaxe".equals(toolClass) && player != null && player.getItemStackFromSlot(EntityEquipmentSlot.HEAD) != null) {
if("pickaxe".equals(toolClass) && player != null && !player.getItemStackFromSlot(EntityEquipmentSlot.HEAD).func_190926_b()) {
return 5;
}
return super.getHarvestLevel(stack, toolClass, player, blockState);