mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
fix ItemFrames (#4101)
removing items from item frames was broken due to behavioural changes in 1.16.210.
This commit is contained in:
@ -2936,6 +2936,16 @@ class Player extends Human implements CommandSender, ChunkLoader, IPlayer{
|
||||
$this->inventory->sendHeldItem($this);
|
||||
break;
|
||||
}
|
||||
|
||||
$tile = $this->level->getTile($pos);
|
||||
if($tile instanceof ItemFrame and $tile->hasItem()){
|
||||
if (lcg_value() <= $tile->getItemDropChance()){
|
||||
$this->level->dropItem($tile->getBlock(), $tile->getItem());
|
||||
}
|
||||
$tile->setItem(null);
|
||||
$tile->setItemRotation(0);
|
||||
break;
|
||||
}
|
||||
|
||||
$block = $target->getSide($packet->face);
|
||||
if($block->getId() === Block::FIRE){
|
||||
|
Reference in New Issue
Block a user