mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
Fixed block-pick on crops giving the crop block itself
This commit is contained in:
@@ -2580,9 +2580,7 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
public function handleBlockPickRequest(BlockPickRequestPacket $packet) : bool{
|
||||
$block = $this->level->getBlockAt($packet->blockX, $packet->blockY, $packet->blockZ);
|
||||
|
||||
//TODO: this doesn't handle crops correctly (need more API work)
|
||||
$item = Item::get($block->getItemId(), $block->getVariant());
|
||||
|
||||
$item = $block->getPickedItem();
|
||||
if($packet->addUserData){
|
||||
$tile = $this->getLevel()->getTile($block);
|
||||
if($tile instanceof Tile){
|
||||
|
Reference in New Issue
Block a user