Fix potential NPE in Block.isToolEffective

This commit is contained in:
Lex Manos 2014-11-28 08:19:40 -08:00
parent d879b2c70d
commit aa07fa4443
1 changed files with 1 additions and 1 deletions

View File

@ -1133,7 +1133,7 @@
+ { + {
+ if ("pickaxe".equals(type) && (this == net.minecraft.init.Blocks.field_150450_ax || this == net.minecraft.init.Blocks.field_150439_ay || this == net.minecraft.init.Blocks.field_150343_Z)) + if ("pickaxe".equals(type) && (this == net.minecraft.init.Blocks.field_150450_ax || this == net.minecraft.init.Blocks.field_150439_ay || this == net.minecraft.init.Blocks.field_150343_Z))
+ return false; + return false;
+ return type != null && getHarvestTool(state).equals(type); + return type != null && type.equals(getHarvestTool(state));
+ } + }
+ +
+ // For Internal use only to capture droped items inside getDrops + // For Internal use only to capture droped items inside getDrops