mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 11:26:37 +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;
|
$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;
|
$revert = true;
|
||||||
$this->server->getLogger()->warning($this->getName()." moved wrongly!");
|
$this->server->getLogger()->warning($this->getName()." moved wrongly!");
|
||||||
}
|
}
|
||||||
|
@ -48,14 +48,25 @@ class Slab extends Transparent{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function getBoundingBox(){
|
public function getBoundingBox(){
|
||||||
return new AxisAlignedBB(
|
if(($this->meta & 0x08) > 0){
|
||||||
$this->x,
|
return new AxisAlignedBB(
|
||||||
$this->y + (($this->meta & 0x08) === 0x08 ? 0.5 : 0),
|
$this->x,
|
||||||
$this->z,
|
$this->y + 0.5,
|
||||||
$this->x + 1,
|
$this->z,
|
||||||
$this->y + (($this->meta & 0x08) === 0x08 ? 1 : 0.5),
|
$this->x + 1,
|
||||||
$this->z + 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){
|
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(){
|
public function getBoundingBox(){
|
||||||
return new AxisAlignedBB(
|
if(($this->meta & 0x08) > 0){
|
||||||
$this->x,
|
return new AxisAlignedBB(
|
||||||
$this->y + (($this->meta & 0x08) === 0x08 ? 0.5 : 0),
|
$this->x,
|
||||||
$this->z,
|
$this->y + 0.5,
|
||||||
$this->x + 1,
|
$this->z,
|
||||||
$this->y + (($this->meta & 0x08) === 0x08 ? 1 : 0.5),
|
$this->x + 1,
|
||||||
$this->z + 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){
|
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