mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 19:34:15 +00:00
Increased movement error range
This commit is contained in:
parent
da084d6908
commit
50b2f55583
@ -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!");
|
||||
}
|
||||
|
@ -48,14 +48,25 @@ class Slab extends Transparent{
|
||||
}
|
||||
|
||||
public function getBoundingBox(){
|
||||
return new AxisAlignedBB(
|
||||
$this->x,
|
||||
$this->y + (($this->meta & 0x08) === 0x08 ? 0.5 : 0),
|
||||
$this->z,
|
||||
$this->x + 1,
|
||||
$this->y + (($this->meta & 0x08) === 0x08 ? 1 : 0.5),
|
||||
$this->z + 1
|
||||
);
|
||||
if(($this->meta & 0x08) > 0){
|
||||
return new AxisAlignedBB(
|
||||
$this->x,
|
||||
$this->y + 0.5,
|
||||
$this->z,
|
||||
$this->x + 1,
|
||||
$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){
|
||||
|
@ -46,14 +46,25 @@ class WoodSlab extends Transparent{
|
||||
}
|
||||
|
||||
public function getBoundingBox(){
|
||||
return new AxisAlignedBB(
|
||||
$this->x,
|
||||
$this->y + (($this->meta & 0x08) === 0x08 ? 0.5 : 0),
|
||||
$this->z,
|
||||
$this->x + 1,
|
||||
$this->y + (($this->meta & 0x08) === 0x08 ? 1 : 0.5),
|
||||
$this->z + 1
|
||||
);
|
||||
if(($this->meta & 0x08) > 0){
|
||||
return new AxisAlignedBB(
|
||||
$this->x,
|
||||
$this->y + 0.5,
|
||||
$this->z,
|
||||
$this->x + 1,
|
||||
$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){
|
||||
|
Loading…
x
Reference in New Issue
Block a user