mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
tweaked minecarts + AddEntityPacket
This commit is contained in:
parent
f8c3f9cae3
commit
3b65160552
7 changed files with 17 additions and 32 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue