Fixes #3011: placing the last part in off-hand clearing main hand as well

This commit is contained in:
Gunther De Wachter 2017-08-17 22:19:35 +02:00
parent bee9c70497
commit 80eaa032b9

View file

@ -349,10 +349,9 @@ public class PartPlacement
if( !player.capabilities.isCreativeMode )
{
held.grow( -1 );
;
if( held.getCount() == 0 )
{
player.inventory.mainInventory.set( player.inventory.currentItem, ItemStack.EMPTY );
player.setHeldItem( hand, ItemStack.EMPTY );
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( player, held, hand ) );
}
}