mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
ported rail logic from 0.8
This commit is contained in:
parent
e9a3ba165d
commit
648784b4ff
7 changed files with 346 additions and 192 deletions
|
|
@ -122,6 +122,20 @@ class Level{
|
|||
}
|
||||
}
|
||||
|
||||
public function fastSetBlockUpdateMeta($x, $y, $z, $meta, $updateBlock = false){
|
||||
$this->level->setBlockDamage($x, $y, $z, $meta);
|
||||
$pk = new UpdateBlockPacket;
|
||||
$pk->x = $x;
|
||||
$pk->y = $y;
|
||||
$pk->z = $z;
|
||||
$pk->block = $this->level->getBlockID($x, $y, $z);
|
||||
$pk->meta = $meta;
|
||||
$this->server->api->player->broadcastPacket($this->players, $pk);
|
||||
if($updateBlock){
|
||||
$this->server->api->block->blockUpdateAround(new Position($x, $y, $z, $this), BLOCK_UPDATE_NORMAL, 1);
|
||||
}
|
||||
}
|
||||
|
||||
public function getOrderedFullChunk($X, $Z){
|
||||
$X = (int)$X;
|
||||
$Z = (int)$Z;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue