Alpha_1.3.3dev

This commit is contained in:
Shoghi Cervantes 2013-06-17 02:53:29 +02:00
parent cf5e2f63db
commit ce1e95195b
2 changed files with 6 additions and 3 deletions

View File

@ -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");

View File

@ -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])){