Fixed ladders

This commit is contained in:
Shoghi Cervantes 2013-06-08 16:36:53 +02:00
parent 4f3e49b6a9
commit 8d2862a744
4 changed files with 9 additions and 6 deletions

View File

@ -222,8 +222,9 @@ class ServerAPI{
} }
@ini_set("memory_limit", $memory); @ini_set("memory_limit", $memory);
}else{ }else{
$this->setProperty("memory-limit", "256M"); $this->setProperty("memory-limit", "128M");
} }
if(!$this->config->exists("server-invisible")){ if(!$this->config->exists("server-invisible")){
$this->config->set("server-invisible", false); $this->config->set("server-invisible", false);
} }

View File

@ -39,10 +39,12 @@ class LadderBlock extends TransparentBlock{
4 => 4, 4 => 4,
5 => 5, 5 => 5,
); );
if(isset($faces[$face])){
$this->meta = $faces[$face]; $this->meta = $faces[$face];
$this->level->setBlock($block, $this); $this->level->setBlock($block, $this);
return true; return true;
} }
}
return false; return false;
} }
public function getDrops(Item $item, Player $player){ public function getDrops(Item $item, Player $player){

View File

@ -232,7 +232,7 @@ class MinecraftInterface{
if(count($this->chunked[$CID][3][$ID]) === $count){ if(count($this->chunked[$CID][3][$ID]) === $count){
ksort($this->chunked[$CID][3][$ID]); ksort($this->chunked[$CID][3][$ID]);
$data = gzinflate(implode($this->chunked[$CID][3][$ID])); $data = gzinflate(implode($this->chunked[$CID][3][$ID]), 524280);
unset($this->chunked[$CID][3][$ID]); unset($this->chunked[$CID][3][$ID]);
if($data === false or strlen($data) === 0){ if($data === false or strlen($data) === 0){
console("[ERROR] Invalid DEFLATEPacket for ".$this->chunked[$CID][1].":".$this->chunked[$CID][2], true, true, 2); console("[ERROR] Invalid DEFLATEPacket for ".$this->chunked[$CID][1].":".$this->chunked[$CID][2], true, true, 2);

View File

@ -67,7 +67,7 @@ class UDPSocket{
if($this->connected === false){ if($this->connected === false){
return false; return false;
} }
return @socket_recvfrom($this->sock, $buf, 65535, 0, $source, $port); return @socket_recvfrom($this->sock, $buf, 1500, 0, $source, $port);
} }
public function write($data, $dest = false, $port = false){ public function write($data, $dest = false, $port = false){