mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-21 02:44:03 +00:00
Address #816
Removes redundant compression argument from NBT::readCompressed() and NBT:: readNetworkCompressed()
This commit is contained in:
parent
80292c6c7a
commit
c01e0354bd
@ -101,7 +101,7 @@ class Anvil extends McRegion{
|
|||||||
public function nbtDeserialize(string $data){
|
public function nbtDeserialize(string $data){
|
||||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||||
try{
|
try{
|
||||||
$nbt->readCompressed($data, ZLIB_ENCODING_DEFLATE);
|
$nbt->readCompressed($data);
|
||||||
|
|
||||||
$chunk = $nbt->getData();
|
$chunk = $nbt->getData();
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ class McRegion extends BaseLevelProvider{
|
|||||||
public function nbtDeserialize(string $data){
|
public function nbtDeserialize(string $data){
|
||||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||||
try{
|
try{
|
||||||
$nbt->readCompressed($data, ZLIB_ENCODING_DEFLATE);
|
$nbt->readCompressed($data);
|
||||||
|
|
||||||
$chunk = $nbt->getData();
|
$chunk = $nbt->getData();
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ class PMAnvil extends Anvil{
|
|||||||
public function nbtDeserialize(string $data){
|
public function nbtDeserialize(string $data){
|
||||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||||
try{
|
try{
|
||||||
$nbt->readCompressed($data, ZLIB_ENCODING_DEFLATE);
|
$nbt->readCompressed($data);
|
||||||
|
|
||||||
$chunk = $nbt->getData();
|
$chunk = $nbt->getData();
|
||||||
|
|
||||||
|
@ -423,11 +423,11 @@ class NBT{
|
|||||||
$this->buffer = "";
|
$this->buffer = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
public function readCompressed($buffer, $compression = ZLIB_ENCODING_GZIP){
|
public function readCompressed($buffer){
|
||||||
$this->read(zlib_decode($buffer));
|
$this->read(zlib_decode($buffer));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function readNetworkCompressed($buffer, $compression = ZLIB_ENCODING_GZIP){
|
public function readNetworkCompressed($buffer){
|
||||||
$this->read(zlib_decode($buffer), false, true);
|
$this->read(zlib_decode($buffer), false, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user