diff --git a/src/config.php b/src/config.php index 421ea6d5..7f3bcbb9 100644 --- a/src/config.php +++ b/src/config.php @@ -65,7 +65,7 @@ set_include_path(get_include_path() . PATH_SEPARATOR . FILE_PATH); ini_set("memory_limit", "128M"); //Default define("LOG", true); define("START_TIME", microtime(true)); -define("MAJOR_VERSION", "Alpha_1.3.2"); +define("MAJOR_VERSION", "Alpha_1.3.3dev"); define("CURRENT_MINECRAFT_VERSION", "0.7.1 alpha"); define("CURRENT_API_VERSION", 9); define("CURRENT_PHP_VERSION", "5.5"); diff --git a/src/world/Level.php b/src/world/Level.php index f004e03a..2ffa6108 100644 --- a/src/world/Level.php +++ b/src/world/Level.php @@ -277,11 +277,11 @@ class Level{ return BlockAPI::get($b[0], $b[1], new Position($pos->x, $pos->y, $pos->z, $this)); } - public function setBlockRaw(Vector3 $pos, Block $block, $direct = true){ + public function setBlockRaw(Vector3 $pos, Block $block, $direct = true, $send = true){ if(!isset($this->level)){ return false; } - if(($ret = $this->level->setBlock($pos->x, $pos->y, $pos->z, $block->getID(), $block->getMetadata())) === true){ + if(($ret = $this->level->setBlock($pos->x, $pos->y, $pos->z, $block->getID(), $block->getMetadata())) === true and $send !== false){ if($direct === true){ $this->server->api->player->broadcastPacket($this->players, MC_UPDATE_BLOCK, array( "x" => $pos->x, @@ -291,6 +291,9 @@ class Level{ "meta" => $block->getMetadata(), )); }elseif($direct === false){ + if(!($pos instanceof Position)){ + $pos = new Position($pos->x, $pos->y, $pos->z, $this); + } $block->position($pos); $i = ($pos->x >> 4).":".($pos->y >> 4).":".($pos->z >> 4); if(!isset($this->changedBlocks[$i])){