mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 10:22:56 +00:00
Fixed extremely stupid zero-length bug in BinaryStream
pls don't kill me 😢
This commit is contained in:
@ -46,7 +46,7 @@ class BatchPacket extends DataPacket{
|
||||
}
|
||||
|
||||
public function decode(){
|
||||
$this->payload = $this->get(0);
|
||||
$this->payload = $this->getRemaining();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
@ -38,7 +38,7 @@ class BlockEntityDataPacket extends DataPacket{
|
||||
|
||||
public function decode(){
|
||||
$this->getBlockPosition($this->x, $this->y, $this->z);
|
||||
$this->namedtag = $this->get(0);
|
||||
$this->namedtag = $this->getRemaining();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
@ -49,7 +49,7 @@ class CommandStepPacket extends DataPacket{
|
||||
$this->inputJson = json_decode($this->getString());
|
||||
$this->outputJson = json_decode($this->getString());
|
||||
|
||||
$this->get(0); //TODO: read command origin data
|
||||
$this->getRemaining(); //TODO: read command origin data
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
@ -45,7 +45,7 @@ class UnknownPacket extends DataPacket{
|
||||
|
||||
public function decode(){
|
||||
$this->offset -= 1; //Rewind one byte so we can read the PID
|
||||
$this->payload = $this->get(0);
|
||||
$this->payload = $this->getRemaining();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
@ -53,7 +53,7 @@ class UpdateTradePacket extends DataPacket{
|
||||
$this->traderEid = $this->getEntityUniqueId();
|
||||
$this->playerEid = $this->getEntityUniqueId();
|
||||
$this->displayName = $this->getString();
|
||||
$this->offers = $this->get(0);
|
||||
$this->offers = $this->getRemaining();
|
||||
}
|
||||
|
||||
public function encode(){
|
||||
|
Reference in New Issue
Block a user