mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
players are now pushable, renamed 2 previously unknown variables(thanks to atipls' mcpealpha c# core)
This commit is contained in:
parent
1f1e1ed709
commit
53928f4e88
3 changed files with 46 additions and 29 deletions
|
|
@ -9,8 +9,19 @@ class AddPlayerPacket extends RakNetDataPacket{
|
|||
public $z;
|
||||
public $pitch;
|
||||
public $yaw;
|
||||
public $itemID;
|
||||
public $itemAuxValue;
|
||||
/**
|
||||
*@deprecated use $itemID instead
|
||||
*/
|
||||
public $unknown1;
|
||||
/**
|
||||
*@deprecated use $itemAuxValue instead
|
||||
*/
|
||||
public $unknown2;
|
||||
/**
|
||||
*@var array
|
||||
*/
|
||||
public $metadata;
|
||||
|
||||
public function pid(){
|
||||
|
|
@ -31,8 +42,8 @@ class AddPlayerPacket extends RakNetDataPacket{
|
|||
$this->putFloat($this->z);
|
||||
$this->putByte($this->yaw);
|
||||
$this->putByte($this->pitch);
|
||||
$this->putShort($this->unknown1);
|
||||
$this->putShort($this->unknown2);
|
||||
$this->putShort($this->itemID);
|
||||
$this->putShort($this->itemAuxValue); //Example: bow shooting power
|
||||
$this->put(Utils::writeMetadata($this->metadata));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,24 +1,23 @@
|
|||
<?php
|
||||
class PlayerInputPacket extends RakNetDataPacket{
|
||||
public $unk1, $unk2, $unk3, $unk4;
|
||||
public function encode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function pid()
|
||||
{
|
||||
return ProtocolInfo::PLAYER_INPUT_PACKET;
|
||||
}
|
||||
|
||||
public function decode()
|
||||
{
|
||||
$this->unk1 = $this->getFloat();
|
||||
$this->unk2 = $this->getFloat();
|
||||
$this->unk3 = $this->getByte();
|
||||
$this->unk4 = $this->getByte();
|
||||
console("values: {$this->unk1}, {$this->unk2}, {$this->unk3}, {$this->unk4}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<?php
|
||||
class PlayerInputPacket extends RakNetDataPacket{
|
||||
public $unk1, $unk2, $unk3, $unk4;
|
||||
public function encode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public function pid()
|
||||
{
|
||||
return ProtocolInfo::PLAYER_INPUT_PACKET;
|
||||
}
|
||||
|
||||
public function decode()
|
||||
{
|
||||
$this->unk1 = $this->getFloat();
|
||||
$this->unk2 = $this->getFloat();
|
||||
$this->unk3 = $this->getByte();
|
||||
$this->unk4 = $this->getByte();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue