mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
rewrite of interact system, bugfixes, ai tweaks
This commit is contained in:
parent
f5222be9d2
commit
ac1a1b2449
62 changed files with 649 additions and 491 deletions
|
|
@ -100,9 +100,8 @@ class Explosion{
|
|||
$server->api->entity->drop(new Position($block->x + 0.5, $block->y, $block->z + 0.5, $this->level), BlockAPI::getItem($drop[0], $drop[1], $drop[2])); //id, meta, count
|
||||
}
|
||||
}
|
||||
$this->level->level->setBlockID($block->x, $block->y, $block->z, 0);
|
||||
ServerAPI::request()->api->block->blockUpdateAround(new Position($block->x, $block->y, $block->z, $this->level), BLOCK_UPDATE_NORMAL, 5);
|
||||
$send[] = new Vector3($block->x - $source->x, $block->y - $source->y, $block->z - $source->z);
|
||||
$this->level->setBlock($block, new AirBlock(), true, false, true);
|
||||
$send[] = $block->subtract($source);
|
||||
}
|
||||
$pk = new ExplodePacket;
|
||||
$pk->x = $this->source->x;
|
||||
|
|
@ -112,4 +111,4 @@ class Explosion{
|
|||
$pk->records = $send;
|
||||
$server->api->player->broadcastPacket($this->level->players, $pk);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue