mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
bad
This commit is contained in:
parent
aa0031b910
commit
b712c4b7a9
10 changed files with 257 additions and 100 deletions
|
|
@ -84,6 +84,20 @@ class Level{
|
|||
return $aABBs;
|
||||
}
|
||||
|
||||
public function fastSetBlockUpdate($x, $y, $z, $id, $meta, $updateBlocksAround = false){
|
||||
$this->level->setBlock($x, $y, $z, $id, $meta);
|
||||
$pk = new UpdateBlockPacket;
|
||||
$pk->x = $x;
|
||||
$pk->y = $y;
|
||||
$pk->z = $z;
|
||||
$pk->block = $id;
|
||||
$pk->meta = $meta;
|
||||
$this->server->api->player->broadcastPacket($this->players, $pk);
|
||||
if($updateBlocksAround){
|
||||
$this->server->api->block->blockUpdateAround(new Position($x, $y, $z, $this), BLOCK_UPDATE_NORMAL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public function __destruct(){
|
||||
if(isset($this->level)){
|
||||
$this->save(false, false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue