Chat fixed, Negative fixed

This commit is contained in:
RainBowSheepx 2022-06-17 19:45:40 +03:00
parent 5349f16464
commit 7ec27bfb04
4 changed files with 6 additions and 4 deletions

View file

@ -148,7 +148,7 @@ class ChatAPI{
}
$message["player"] = "";
}
$this->server->handle("server.chat", new Container($message, $whitelist, $blacklist));
$container = new Container($message, $whitelist, $blacklist);
$this->server->handle("server.chat", $container);
}
}

View file

@ -1192,6 +1192,7 @@ class Player{
$cnt = $this->send($data);
if(isset($this->chunkCount[$count])){
unset($this->chunkCount[$count]);
if(!is_null($cnt) and !is_null($cnt[0]))
$this->chunkCount[$cnt[0]] = true;
}
}

View file

@ -420,6 +420,7 @@ class PMFLevel extends PMF{
$aX = $x - ($X << 4);
$aZ = $z - ($Z << 4);
$aY = $y - ($Y << 4);
#Need to fix. But idk how.
$b = ord($this->chunks[$index][$Y][(int) ($aY + ($aX << 5) + ($aZ << 9))]);
$m = ord($this->chunks[$index][$Y][(int) (($aY >> 1) + 16 + ($aX << 5) + ($aZ << 9))]);
if(($y & 1) === 0){

View file

@ -602,10 +602,10 @@ class Utils{
public static function writeLong($value){
$x = "";
if($value[0] === "-"){
if(strval($value)[0] === "-"){
$negative = true;
$value = bcadd($value, "1");
if($value[0] === "-"){
if(strval($value)[0] === "-"){
$value = substr($value, 1);
}
}else{