mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-10-26 14:33:50 +00:00
Add a null check in case there is no current equipped item
This commit is contained in:
1 parent
9387e21f50
commit
14543da225
1 file changed
+4
-1
@@ -289,7 +289,10 @@ public abstract class HarvestTool extends ToolCore
|
||||
}
|
||||
|
||||
// callback to the tool the player uses. Called on both sides. This damages the tool n stuff.
|
||||
player.getCurrentEquippedItem().func_150999_a(world, block, x, y, z, player);
|
||||
ItemStack currentItem = player.getCurrentEquippedItem();
|
||||
if(currentItem != null) {
|
||||
currentItem.func_150999_a(world, block, x, y, z, player);
|
||||
}
|
||||
|
||||
// server sided handling
|
||||
if (!world.isRemote) {
|
||||
|
||||
Reference in new issue
Block a user