mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-16 11:58:00 +00:00
Merge remote-tracking branch 'jacknoordhuis/patch-2'
This commit is contained in:
@@ -101,7 +101,7 @@ class Anvil extends McRegion{
|
||||
public function nbtDeserialize(string $data){
|
||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||
try{
|
||||
$nbt->readCompressed($data, ZLIB_ENCODING_DEFLATE);
|
||||
$nbt->readCompressed($data);
|
||||
|
||||
$chunk = $nbt->getData();
|
||||
|
||||
|
@@ -126,7 +126,7 @@ class McRegion extends BaseLevelProvider{
|
||||
public function nbtDeserialize(string $data){
|
||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||
try{
|
||||
$nbt->readCompressed($data, ZLIB_ENCODING_DEFLATE);
|
||||
$nbt->readCompressed($data);
|
||||
|
||||
$chunk = $nbt->getData();
|
||||
|
||||
|
@@ -104,7 +104,7 @@ class PMAnvil extends Anvil{
|
||||
public function nbtDeserialize(string $data){
|
||||
$nbt = new NBT(NBT::BIG_ENDIAN);
|
||||
try{
|
||||
$nbt->readCompressed($data, ZLIB_ENCODING_DEFLATE);
|
||||
$nbt->readCompressed($data);
|
||||
|
||||
$chunk = $nbt->getData();
|
||||
|
||||
|
@@ -423,11 +423,11 @@ class NBT{
|
||||
$this->buffer = "";
|
||||
}
|
||||
|
||||
public function readCompressed($buffer, $compression = ZLIB_ENCODING_GZIP){
|
||||
public function readCompressed($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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user