mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 11:26:37 +00:00
Merge branch 'legacy/pm3' into stable
This commit is contained in:
commit
ea1fceece2
@ -18,6 +18,9 @@ return (new PhpCsFixer\Config)
|
|||||||
'array_syntax' => [
|
'array_syntax' => [
|
||||||
'syntax' => 'short'
|
'syntax' => 'short'
|
||||||
],
|
],
|
||||||
|
'binary_operator_spaces' => [
|
||||||
|
'default' => 'single_space'
|
||||||
|
],
|
||||||
'blank_line_after_namespace' => true,
|
'blank_line_after_namespace' => true,
|
||||||
'blank_line_after_opening_tag' => true,
|
'blank_line_after_opening_tag' => true,
|
||||||
'blank_line_before_statement' => [
|
'blank_line_before_statement' => [
|
||||||
@ -73,6 +76,7 @@ return (new PhpCsFixer\Config)
|
|||||||
],
|
],
|
||||||
'single_import_per_statement' => true,
|
'single_import_per_statement' => true,
|
||||||
'strict_param' => true,
|
'strict_param' => true,
|
||||||
|
'unary_operator_spaces' => true,
|
||||||
])
|
])
|
||||||
->setFinder($finder)
|
->setFinder($finder)
|
||||||
->setIndent("\t")
|
->setIndent("\t")
|
||||||
|
@ -832,10 +832,10 @@ abstract class Entity{
|
|||||||
$diffZ = $z - $floorZ;
|
$diffZ = $z - $floorZ;
|
||||||
|
|
||||||
if($world->getBlockAt($floorX, $floorY, $floorZ)->isSolid()){
|
if($world->getBlockAt($floorX, $floorY, $floorZ)->isSolid()){
|
||||||
$westNonSolid = !$world->getBlockAt($floorX - 1, $floorY, $floorZ)->isSolid();
|
$westNonSolid = !$world->getBlockAt($floorX - 1, $floorY, $floorZ)->isSolid();
|
||||||
$eastNonSolid = !$world->getBlockAt($floorX + 1, $floorY, $floorZ)->isSolid();
|
$eastNonSolid = !$world->getBlockAt($floorX + 1, $floorY, $floorZ)->isSolid();
|
||||||
$downNonSolid = !$world->getBlockAt($floorX, $floorY - 1, $floorZ)->isSolid();
|
$downNonSolid = !$world->getBlockAt($floorX, $floorY - 1, $floorZ)->isSolid();
|
||||||
$upNonSolid = !$world->getBlockAt($floorX, $floorY + 1, $floorZ)->isSolid();
|
$upNonSolid = !$world->getBlockAt($floorX, $floorY + 1, $floorZ)->isSolid();
|
||||||
$northNonSolid = !$world->getBlockAt($floorX, $floorY, $floorZ - 1)->isSolid();
|
$northNonSolid = !$world->getBlockAt($floorX, $floorY, $floorZ - 1)->isSolid();
|
||||||
$southNonSolid = !$world->getBlockAt($floorX, $floorY, $floorZ + 1)->isSolid();
|
$southNonSolid = !$world->getBlockAt($floorX, $floorY, $floorZ + 1)->isSolid();
|
||||||
|
|
||||||
|
@ -341,14 +341,14 @@ class Config{
|
|||||||
$this->config[$base] = [];
|
$this->config[$base] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$base =& $this->config[$base];
|
$base = &$this->config[$base];
|
||||||
|
|
||||||
while(count($vars) > 0){
|
while(count($vars) > 0){
|
||||||
$baseKey = array_shift($vars);
|
$baseKey = array_shift($vars);
|
||||||
if(!isset($base[$baseKey])){
|
if(!isset($base[$baseKey])){
|
||||||
$base[$baseKey] = [];
|
$base[$baseKey] = [];
|
||||||
}
|
}
|
||||||
$base =& $base[$baseKey];
|
$base = &$base[$baseKey];
|
||||||
}
|
}
|
||||||
|
|
||||||
$base = $value;
|
$base = $value;
|
||||||
@ -393,14 +393,14 @@ class Config{
|
|||||||
|
|
||||||
$vars = explode(".", $key);
|
$vars = explode(".", $key);
|
||||||
|
|
||||||
$currentNode =& $this->config;
|
$currentNode = &$this->config;
|
||||||
while(count($vars) > 0){
|
while(count($vars) > 0){
|
||||||
$nodeName = array_shift($vars);
|
$nodeName = array_shift($vars);
|
||||||
if(isset($currentNode[$nodeName])){
|
if(isset($currentNode[$nodeName])){
|
||||||
if(count($vars) === 0){ //final node
|
if(count($vars) === 0){ //final node
|
||||||
unset($currentNode[$nodeName]);
|
unset($currentNode[$nodeName]);
|
||||||
}elseif(is_array($currentNode[$nodeName])){
|
}elseif(is_array($currentNode[$nodeName])){
|
||||||
$currentNode =& $currentNode[$nodeName];
|
$currentNode = &$currentNode[$nodeName];
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user