tried porting structure api from 1.5.2

This commit is contained in:
GameHerobrine 2023-12-03 15:45:34 +03:00
parent 4715d938e1
commit fad3a556dd
15 changed files with 649 additions and 27 deletions

View file

@ -45,6 +45,10 @@ class Utils{
return $angle < 0 ? $angle + 360 : $angle;
}
public static function chunkPos2Int($x, $z){
return ($x & 0xFFFFFFFF) | (($z & 0xFFFFFFFF) << 32);
}
public static function wrapAngleTo180($angle)
{
$angle = fmod($angle+180, 360);