tweaked minecarts + AddEntityPacket

This commit is contained in:
GameHerobrine 2023-12-29 01:58:58 +03:00
parent f8c3f9cae3
commit 3b65160552
7 changed files with 17 additions and 32 deletions

View file

@ -1,6 +1,6 @@
<?php
class PlayerInputPacket extends RakNetDataPacket{
public $unk1, $unk2, $sneaking, $unk4;
public $moveStrafe, $moveForward, $isJumping, $isSneaking;
public function encode()
{
@ -13,10 +13,10 @@ class PlayerInputPacket extends RakNetDataPacket{
public function decode()
{
$this->unk1 = $this->getFloat();
$this->unk2 = $this->getFloat();
$this->sneaking = bin2hex($this->buffer)[$this->getOffset()] === 4;
$this->unk4 = bin2hex($this->buffer)[$this->getOffset()+1] === 4;
$this->moveStrafe = $this->getFloat();
$this->moveForward = $this->getFloat();
$this->isJumping = $this->getByte() != 0;
$this->isSneaking = $this->getByte() != 0;
}
}