mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 08:35:20 +00:00
Remove circular dependency between Item and NBT modules (#121)
This commit is contained in:
@ -1454,7 +1454,7 @@ class Level implements ChunkManager, Metadatable{
|
||||
*/
|
||||
public function dropItem(Vector3 $source, Item $item, Vector3 $motion = null, int $delay = 10){
|
||||
$motion = $motion === null ? new Vector3(lcg_value() * 0.2 - 0.1, 0.2, lcg_value() * 0.2 - 0.1) : $motion;
|
||||
$itemTag = NBT::putItemHelper($item);
|
||||
$itemTag = $item->nbtSerialize();
|
||||
$itemTag->setName("Item");
|
||||
|
||||
if($item->getId() > 0 and $item->getCount() > 0){
|
||||
|
Reference in New Issue
Block a user