mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed error with world teleporting
This commit is contained in:
parent
de5be4168d
commit
cef4347a02
4 changed files with 14 additions and 4 deletions
|
|
@ -250,7 +250,7 @@ class PMFLevel extends PMF{
|
|||
$X = $x >> 4;
|
||||
$Z = $z >> 4;
|
||||
$Y = $y >> 4;
|
||||
if($X >= 32 or $Z >= 32){
|
||||
if($X >= 32 or $Z >= 32 or $Y >= $this->levelData["height"]){
|
||||
return array(AIR, 0);
|
||||
}
|
||||
$index = $this->getIndex($X, $Z);
|
||||
|
|
@ -317,7 +317,7 @@ class PMFLevel extends PMF{
|
|||
$Y = $y >> 4;
|
||||
$block &= 0xFF;
|
||||
$meta &= 0x0F;
|
||||
if($X >= 32 or $Z >= 32){
|
||||
if($X >= 32 or $Z >= 32 or $Y >= $this->levelData["height"]){
|
||||
return false;
|
||||
}
|
||||
$index = $this->getIndex($X, $Z);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue