mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 04:29:43 +00:00
better drop, added new setting from nc0.10
This commit is contained in:
parent
e8528755ab
commit
7eec621f90
7 changed files with 63 additions and 65 deletions
|
|
@ -448,7 +448,7 @@ class Level{
|
|||
$p = $this->server->clients[$cid] ?? false;
|
||||
if($p instanceof Player){
|
||||
$dist = abs($xz[0] - (((int)$p->entity->x) >> 4)) + abs($xz[1] - (((int)$p->entity->z) >> 4));
|
||||
if($dist > 8){
|
||||
if($dist > PocketMinecraftServer::$chunkLoadingRadius*2){
|
||||
//ConsoleAPI::debug("{$p->player} freeing chunk: {$xz[0]} {$xz[1]}");
|
||||
$this->freeChunk($xz[0], $xz[1], $p);
|
||||
$p->stopUsingChunk($xz[0], $xz[1]);
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ class ExperimentalGenerator implements NewLevelGenerator{
|
|||
|
||||
public function init(Level $level, Random $random){
|
||||
$this->level = $level;
|
||||
$this->random = $random;//new MersenneTwister();
|
||||
$this->random = $random;
|
||||
$this->random->setSeed($this->level->level->getSeed());
|
||||
$this->noiseBase = new NoiseGeneratorPerlin($this->random, 4);
|
||||
$this->selector = new BiomeSelector($this->random, BiomeSelector::$biomes[BIOME_PLAINS]);
|
||||
|
|
@ -154,8 +154,6 @@ class ExperimentalGenerator implements NewLevelGenerator{
|
|||
$chunk .= (($noiseValue > 0) ? "\x01" : (($y <= $this->waterHeight) ? "\x09" : "\x00"));
|
||||
}
|
||||
$chunk .= "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
|
||||
//$chunk .= str_repeat("\xff", 16);
|
||||
//$chunk .= str_repeat("\xff", 16);
|
||||
$chunk .= "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; //light
|
||||
$chunk .= "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"; //more light
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue