mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
bed position is saved in playerdata, bed destruction will teleport you to the world spawn
This commit is contained in:
parent
60c29e9dd1
commit
6ab777e5e9
4 changed files with 39 additions and 14 deletions
|
|
@ -65,7 +65,7 @@ class BedBlock extends TransparentBlock{
|
|||
for($zCheck = $minZ; $zCheck <= $maxZ; ++$zCheck){
|
||||
$idCheck = $level->level->getBlockID($xCheck, $y - 1, $zCheck);
|
||||
if(!StaticBlock::getIsTransparent($idCheck) && $level->level->getBlockID($xCheck, $y, $zCheck) == 0 && $level->level->getBlockID($xCheck, $y + 1, $zCheck) == 0){
|
||||
return new Vector3($xCheck, $y, $zCheck);
|
||||
return new Position($xCheck, $y, $zCheck, $level);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue