mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
tweaked delay when picking up items, experimental hotbar is now disabled by default
This commit is contained in:
parent
a4a5f1dfdf
commit
46efebaf67
8 changed files with 11 additions and 9 deletions
|
|
@ -275,7 +275,7 @@ class EntityAPI{
|
|||
}
|
||||
}
|
||||
|
||||
public function drop(Position $pos, Item $item){
|
||||
public function drop(Position $pos, Item $item, $pickupDelay = 10){
|
||||
if($item->getID() === AIR or $item->count <= 0){
|
||||
return;
|
||||
}
|
||||
|
|
@ -295,6 +295,7 @@ class EntityAPI{
|
|||
$item->count = min($item->getMaxStackSize(), $count);
|
||||
$count -= $item->count;
|
||||
$e = $this->add($pos->level, ENTITY_ITEM, ENTITY_ITEM_TYPE, $data);
|
||||
$e->delayBeforePickup = $pickupDelay;
|
||||
$this->spawnToAll($e);
|
||||
$this->server->api->handle("entity.motion", $e);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue