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

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