mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
mobs will spawn only in loaded chunks, entities in unloaded chunks will automatically *rip*
This commit is contained in:
parent
bc979c2853
commit
8d1e76f84d
7 changed files with 21 additions and 12 deletions
|
|
@ -19,7 +19,7 @@ class Level{
|
|||
*/
|
||||
public $entityList;
|
||||
public $tiles, $blockUpdates, $nextSave, $players = [], $level, $mobSpawner;
|
||||
private $time, $startCheck, $startTime, $server, $name, $usedChunks, $changedBlocks, $changedCount, $stopTime;
|
||||
public $time, $startCheck, $startTime, $server, $name, $usedChunks, $changedBlocks, $changedCount, $stopTime;
|
||||
|
||||
private $generator;
|
||||
public function __construct(PMFLevel $level, Config $entities, Config $tiles, Config $blockUpdates, $name){
|
||||
|
|
@ -593,7 +593,7 @@ class Level{
|
|||
*/
|
||||
|
||||
public function getBlockWithoutVector($x, $y, $z, $positionfy = true){
|
||||
$b = $this->level->getBlock($x, $y, $z);
|
||||
$b = $this->level->getBlock((int)$x, (int)$y, (int)$z);
|
||||
return BlockAPI::get($b[0], $b[1], $positionfy ? new Position($x, $y, $z, $this) : false);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue