mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-07 02:21:46 +00:00
Fix for torches
This commit is contained in:
parent
cf5d8e5009
commit
0cb8f28122
@ -297,7 +297,7 @@ class Player{
|
|||||||
break;
|
break;
|
||||||
case MC_REQUEST_CHUNK:
|
case MC_REQUEST_CHUNK:
|
||||||
$this->actionQueue('
|
$this->actionQueue('
|
||||||
$max = max(1, floor(($this->MTU - 16 - 255) / 192) - 1);
|
$max = max(1, floor(($this->MTU - 16 - 255) / 192));
|
||||||
$chunk = $this->server->api->level->getOrderedChunk('.$data["x"].', '.$data["z"].', $max);
|
$chunk = $this->server->api->level->getOrderedChunk('.$data["x"].', '.$data["z"].', $max);
|
||||||
foreach($chunk as $d){
|
foreach($chunk as $d){
|
||||||
$this->dataPacket(MC_CHUNK_DATA, array(
|
$this->dataPacket(MC_CHUNK_DATA, array(
|
||||||
|
@ -94,7 +94,7 @@ class SuperflatGenerator{
|
|||||||
if(floor(sqrt(pow($x - $this->spawn[0], 2) + pow($z - $this->spawn[2], 2))) <= $this->config["spawn-radius"]){
|
if(floor(sqrt(pow($x - $this->spawn[0], 2) + pow($z - $this->spawn[2], 2))) <= $this->config["spawn-radius"]){
|
||||||
$column[0]{strlen($column[0])-1} = chr($this->config["spawn-surface"]);
|
$column[0]{strlen($column[0])-1} = chr($this->config["spawn-surface"]);
|
||||||
}
|
}
|
||||||
if(($x % 8) === 0 and ($z % 8) === 0 and $this->config["torches"] === 1){
|
if(($x % 8) === 0 and ($z % 8) === 0 and $this->config["torches"] == "1"){
|
||||||
$column[0] .= chr(50);
|
$column[0] .= chr(50);
|
||||||
}
|
}
|
||||||
$column[0] .= str_repeat(chr(0), 128 - strlen($column[0]));
|
$column[0] .= str_repeat(chr(0), 128 - strlen($column[0]));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user