Merged master into Core-Rewrite

This commit is contained in:
Shoghi Cervantes 2014-03-01 21:48:09 +01:00
commit 75b34b6c2a
2 changed files with 3 additions and 3 deletions

View File

@ -2028,6 +2028,7 @@ class Player extends PlayerEntity{
}
$this->craftingItems = array();
$this->toCraft = array();
$packet->message = TextFormat::clean($packet->message);
if(trim($packet->message) != "" and strlen($packet->message) <= 255){
$message = $packet->message;
if($message{0} === "/"){ //Command

View File

@ -279,9 +279,8 @@ class PMFLevel extends PMF{
$this->chunkChange[$index] = array(-1 => false);
$this->chunkInfo[$index][3] = substr($chunk, $offset, 256); //Biome data
$offset += 256;
for($Y = 0; $Y < $this->chunkInfo[$index][0]; ++$Y){
$t = 1 << $Y;
if(($this->chunkInfo[$index][0] & $t) === $t){
for($Y = 0; $Y < 8; ++$Y){
if(($this->chunkInfo[$index][0] & (1 << $Y)) !== 0){
// 4096 + 2048 + 2048, Block Data, Meta, Light
if(strlen($this->chunks[$index][$Y] = substr($chunk, $offset, 8192)) < 8192){
console("[NOTICE] Empty corrupt chunk detected [$X,$Z,:$Y], recovering contents", true, true, 2);