Improved move offset check

This commit is contained in:
Shoghi Cervantes 2015-01-02 19:14:18 +01:00
parent e8ad828498
commit 04bdb13103
No known key found for this signature in database
GPG Key ID: 78464DB0A7837F89
4 changed files with 5 additions and 5 deletions

View File

@ -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",

View File

@ -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(){

View File

@ -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);

View File

@ -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);