Fixed right-click with bonemeal.
The client would send invalid right-click events with Y set to 0x7ff, which would crash the server. Only process bonemeal for valid clicks (valid blockface).
This commit is contained in:
parent
532c80b6db
commit
55a5f11b1b
@ -27,7 +27,7 @@ public:
|
|||||||
) override
|
) override
|
||||||
{
|
{
|
||||||
// Handle growing the plants:
|
// Handle growing the plants:
|
||||||
if (a_Item.m_ItemDamage == E_META_DYE_WHITE)
|
if ((a_Item.m_ItemDamage == E_META_DYE_WHITE) && (a_BlockFace != BLOCK_FACE_NONE))
|
||||||
{
|
{
|
||||||
if (a_World->GrowRipePlant(a_BlockX, a_BlockY, a_BlockZ, true))
|
if (a_World->GrowRipePlant(a_BlockX, a_BlockY, a_BlockZ, true))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user