Updated Position to use Weak / strong references for Level objects

This commit is contained in:
Shoghi Cervantes
2014-05-22 04:14:06 +02:00
parent 6328834681
commit c1546aac9c
60 changed files with 584 additions and 291 deletions

View File

@ -43,8 +43,7 @@ abstract class BaseChunk implements Chunk{
$this->level = $level;
$this->x = (int) $x;
$this->z = (int) $z;
$Y = 0;
foreach($sections as $section){
foreach($sections as $Y => $section){
if($section instanceof ChunkSection){
$this->sections[$Y] = $section;
}else{
@ -52,7 +51,6 @@ abstract class BaseChunk implements Chunk{
return;
}
++$Y;
if($section >= self::SECTION_COUNT){
trigger_error("Invalid amount of chunks", E_USER_WARNING);
return;