mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 17:29:44 +00:00
Improved move offset check
This commit is contained in:
parent
e8ad828498
commit
04bdb13103
@ -137,7 +137,7 @@ class CrashDump{
|
||||
$error = $lastExceptionError;
|
||||
}else{
|
||||
$error = (array) error_get_last();
|
||||
$error["trace"] = @getTrace(4);
|
||||
$error["trace"] = @getTrace(3);
|
||||
$errorConversion = [
|
||||
E_ERROR => "E_ERROR",
|
||||
E_WARNING => "E_WARNING",
|
||||
|
@ -34,7 +34,7 @@ class CommandReader extends Thread{
|
||||
*/
|
||||
public function __construct(\Threaded $threaded){
|
||||
$this->buffer = $threaded;
|
||||
$this->start(PTHREADS_INHERIT_NONE);
|
||||
$this->start();
|
||||
}
|
||||
|
||||
private function readLine(){
|
||||
|
@ -877,7 +877,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
//TODO: big messy loop
|
||||
}*/
|
||||
|
||||
$list = $this->level->getCollisionCubes($this, $this->boundingBox->addCoord($dx, $dy, $dz));
|
||||
$list = $this->level->getCollisionCubes($this, $this->boundingBox->getOffsetBoundingBox($dx, $dy, $dz));
|
||||
|
||||
|
||||
foreach($list as $bb){
|
||||
@ -931,7 +931,7 @@ abstract class Entity extends Location implements Metadatable{
|
||||
|
||||
$this->boundingBox->setBB($axisalignedbb);
|
||||
|
||||
$list = $this->level->getCollisionCubes($this, $this->boundingBox->addCoord($dx, $dy, $dz), false);
|
||||
$list = $this->level->getCollisionCubes($this, $this->boundingBox->getOffsetBoundingBox($dx, $dy, $dz), false);
|
||||
|
||||
foreach($list as $bb){
|
||||
$dy = $bb->calculateYOffset($this->boundingBox, $dy);
|
||||
|
@ -84,7 +84,7 @@ class Flat extends Generator{
|
||||
$this->preset = $preset;
|
||||
$preset = explode(";", $preset);
|
||||
$version = (int) $preset[0];
|
||||
$blocks = @$preset[1];
|
||||
$blocks = isset($preset[1]) ? $preset[1] : "";
|
||||
$biome = isset($preset[2]) ? $preset[2] : 1;
|
||||
$options = isset($preset[3]) ? $preset[3] : "";
|
||||
preg_match_all('#(([0-9]{0,})x?([0-9]{1,3}:?[0-9]{0,2})),?#', $blocks, $matches);
|
||||
|
Loading…
x
Reference in New Issue
Block a user