mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 04:17:07 +00:00
Merge branch 'release/3.5'
This commit is contained in:
commit
e5cb48bec2
12
composer.lock
generated
12
composer.lock
generated
@ -189,16 +189,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pocketmine/binaryutils",
|
"name": "pocketmine/binaryutils",
|
||||||
"version": "0.1.1",
|
"version": "0.1.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/pmmp/BinaryUtils.git",
|
"url": "https://github.com/pmmp/BinaryUtils.git",
|
||||||
"reference": "54efeb978be0ff9335022729fe63c1e2077bf1be"
|
"reference": "2c1628f08a9cdeca4d3c682e13f24420944ca845"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/54efeb978be0ff9335022729fe63c1e2077bf1be",
|
"url": "https://api.github.com/repos/pmmp/BinaryUtils/zipball/2c1628f08a9cdeca4d3c682e13f24420944ca845",
|
||||||
"reference": "54efeb978be0ff9335022729fe63c1e2077bf1be",
|
"reference": "2c1628f08a9cdeca4d3c682e13f24420944ca845",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -216,10 +216,10 @@
|
|||||||
],
|
],
|
||||||
"description": "Classes and methods for conveniently handling binary data",
|
"description": "Classes and methods for conveniently handling binary data",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/pmmp/BinaryUtils/tree/master",
|
"source": "https://github.com/pmmp/BinaryUtils/tree/0.1.2",
|
||||||
"issues": "https://github.com/pmmp/BinaryUtils/issues"
|
"issues": "https://github.com/pmmp/BinaryUtils/issues"
|
||||||
},
|
},
|
||||||
"time": "2018-08-26T18:11:05+00:00"
|
"time": "2018-12-22T12:29:30+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "pocketmine/math",
|
"name": "pocketmine/math",
|
||||||
|
@ -154,7 +154,7 @@ class Attribute{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function resetToDefault() : void{
|
public function resetToDefault() : void{
|
||||||
$this->setValue($this->getDefaultValue());
|
$this->setValue($this->getDefaultValue(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getValue() : float{
|
public function getValue() : float{
|
||||||
|
@ -130,6 +130,11 @@ class LevelDB extends BaseLevelProvider{
|
|||||||
/** @var SubChunk[] $subChunks */
|
/** @var SubChunk[] $subChunks */
|
||||||
$subChunks = [];
|
$subChunks = [];
|
||||||
|
|
||||||
|
/** @var int[] $heightMap */
|
||||||
|
$heightMap = [];
|
||||||
|
/** @var string $biomeIds */
|
||||||
|
$biomeIds = "";
|
||||||
|
|
||||||
/** @var bool $lightPopulated */
|
/** @var bool $lightPopulated */
|
||||||
$lightPopulated = true;
|
$lightPopulated = true;
|
||||||
|
|
||||||
@ -172,10 +177,12 @@ class LevelDB extends BaseLevelProvider{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$binaryStream->setBuffer($this->db->get($index . self::TAG_DATA_2D), 0);
|
if(($maps2d = $this->db->get($index . self::TAG_DATA_2D)) !== false){
|
||||||
|
$binaryStream->setBuffer($maps2d, 0);
|
||||||
|
|
||||||
$heightMap = array_values(unpack("v*", $binaryStream->get(512)));
|
$heightMap = array_values(unpack("v*", $binaryStream->get(512)));
|
||||||
$biomeIds = $binaryStream->get(256);
|
$biomeIds = $binaryStream->get(256);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2: // < MCPE 1.0
|
case 2: // < MCPE 1.0
|
||||||
$binaryStream->setBuffer($this->db->get($index . self::TAG_LEGACY_TERRAIN));
|
$binaryStream->setBuffer($this->db->get($index . self::TAG_LEGACY_TERRAIN));
|
||||||
|
@ -301,8 +301,8 @@ class Utils{
|
|||||||
++$processors;
|
++$processors;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}elseif(is_readable("/sys/devices/system/cpu/present")){
|
||||||
if(preg_match("/^([0-9]+)\\-([0-9]+)$/", trim(@file_get_contents("/sys/devices/system/cpu/present")), $matches) > 0){
|
if(preg_match("/^([0-9]+)\\-([0-9]+)$/", trim(file_get_contents("/sys/devices/system/cpu/present")), $matches) > 0){
|
||||||
$processors = (int) ($matches[2] - $matches[1]);
|
$processors = (int) ($matches[2] - $matches[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user