When a block or item (such as sugarcane) is placed, the reference to the item in the player's main hand is cloned before its amount is decremented (after it has been placed successfully). Because of this, the amount of the cloned item was being decremented rather the amount of the actual item (in the player's hand). This pull request fixes this issue (#1012) and was tested accordingly.
When a block or item (such as sugarcane) is placed, the reference to the item in the player's main hand is cloned before its amount is decremented (after it has been placed successfully). Because of this, the amount of the cloned item was being decremented rather the amount of the actual item (in the player's hand). This pull request fixes this issue (#1012) and was tested accordingly.