mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
drop should be collectable in 2 block radius
This commit is contained in:
parent
c961de59ba
commit
44728d21dc
1 changed files with 2 additions and 3 deletions
|
|
@ -342,8 +342,8 @@ class Entity extends Position
|
|||
$hasUpdate = Entity::$updateOnTick ? $this->class === ENTITY_MOB : false; // force true for mobs
|
||||
$time = microtime(true);
|
||||
if($this->class === ENTITY_PLAYER and ($this->player instanceof Player) and $this->player->spawned === true and $this->player->blocked !== true && ! $this->dead){
|
||||
foreach($this->server->api->entity->getRadius($this, 1, ENTITY_ITEM) as $item){
|
||||
if(! $item->closed && $item->spawntime > 0 && ($time - $item->spawntime) >= 0.6){
|
||||
foreach($this->server->api->entity->getRadius($this, 2, ENTITY_ITEM) as $item){ //TODO vanilla method of searching/radius
|
||||
if(!$item->closed && $item->spawntime > 0 && ($time - $item->spawntime) >= 0.6){
|
||||
if((($this->player->gamemode & 0x01) === 1 || $this->player->hasSpace($item->type, $item->meta, $item->stack) === true) && $this->server->api->dhandle("player.pickup", array(
|
||||
"eid" => $this->player->eid,
|
||||
"player" => $this->player,
|
||||
|
|
@ -542,7 +542,6 @@ class Entity extends Position
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$this->isPlayer()){
|
||||
$update = false;
|
||||
$drag = 0.2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue