Increased movement error range

This commit is contained in:
Shoghi Cervantes 2014-09-15 23:53:08 +02:00
parent da084d6908
commit 50b2f55583
3 changed files with 39 additions and 17 deletions

View File

@ -1382,7 +1382,7 @@ class Player extends Human implements CommandSender, InventoryHolder, IPlayer{
$diff = $diffX ** 2 + $diffY ** 2 + $diffZ ** 2;
if(!$revert and $diff > 0.0625 and !$this->isSleeping() and $this->isSurvival()){
if(!$revert and $diff > 0.15 and !$this->isSleeping() and $this->isSurvival()){
$revert = true;
$this->server->getLogger()->warning($this->getName()." moved wrongly!");
}

View File

@ -48,14 +48,25 @@ class Slab extends Transparent{
}
public function getBoundingBox(){
if(($this->meta & 0x08) > 0){
return new AxisAlignedBB(
$this->x,
$this->y + (($this->meta & 0x08) === 0x08 ? 0.5 : 0),
$this->y + 0.5,
$this->z,
$this->x + 1,
$this->y + (($this->meta & 0x08) === 0x08 ? 1 : 0.5),
$this->y + 1,
$this->z + 1
);
}else{
return new AxisAlignedBB(
$this->x,
$this->y,
$this->z,
$this->x + 1,
$this->y + 0.5,
$this->z + 1
);
}
}
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){

View File

@ -46,14 +46,25 @@ class WoodSlab extends Transparent{
}
public function getBoundingBox(){
if(($this->meta & 0x08) > 0){
return new AxisAlignedBB(
$this->x,
$this->y + (($this->meta & 0x08) === 0x08 ? 0.5 : 0),
$this->y + 0.5,
$this->z,
$this->x + 1,
$this->y + (($this->meta & 0x08) === 0x08 ? 1 : 0.5),
$this->y + 1,
$this->z + 1
);
}else{
return new AxisAlignedBB(
$this->x,
$this->y,
$this->z,
$this->x + 1,
$this->y + 0.5,
$this->z + 1
);
}
}
public function place(Item $item, Block $block, Block $target, $face, $fx, $fy, $fz, Player $player = null){