GlowstoneMC / Glowstone

A fast, customizable and compatible open source server for Minecraft: Java Edition
https://glowstone.net
Other
1.88k stars 271 forks source link

Item amount decrement is now applied on block place (fixes #1012) #1022

Closed jhg023 closed 5 years ago

jhg023 commented 5 years ago

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.