mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
Fixed item spawning
This commit is contained in:
parent
344449fa12
commit
c2a45212dd
2 changed files with 12 additions and 7 deletions
|
|
@ -77,6 +77,7 @@ class Entity extends stdClass{
|
|||
|
||||
public function update(){
|
||||
if($this->class === ENTITY_ITEM){
|
||||
$this->server->api->dhandle("entity.move", $this->eid);
|
||||
$player = $this->server->query("SELECT EID FROM entities WHERE class == ".ENTITY_PLAYER." AND abs(x - {$this->x}) <= 1.5 AND abs(y - {$this->y}) <= 1.5 AND abs(z - {$this->z}) <= 1.5 LIMIT 1;", true);
|
||||
if($player !== true and $player !== false){
|
||||
if($this->server->api->dhandle("player.item.pick", array(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue