Fixes #3011: placing the last part in off-hand clearing main hand as well
This commit is contained in:
@@ -349,10 +349,9 @@ public class PartPlacement
|
|||||||
if( !player.capabilities.isCreativeMode )
|
if( !player.capabilities.isCreativeMode )
|
||||||
{
|
{
|
||||||
held.grow( -1 );
|
held.grow( -1 );
|
||||||
;
|
|
||||||
if( held.getCount() == 0 )
|
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 ) );
|
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( player, held, hand ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user