Door: change thickness to match MCPE

since MCPE-19214 still hasn't been fixed after all these years, it's safe to say they won't fix it in the near future, and this causes placement glitches in PM.
This commit is contained in:
Dylan K. Taylor 2021-06-18 19:10:50 +01:00
parent d96fc17339
commit 745f455bd2
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -115,7 +115,8 @@ class Door extends Transparent{
* @return AxisAlignedBB[]
*/
protected function recalculateCollisionBoxes() : array{
return [AxisAlignedBB::one()->trim($this->open ? Facing::rotateY($this->facing, !$this->hingeRight) : $this->facing, 13 / 16)];
//TODO: doors are 0.1825 blocks thick, instead of 0.1875 like JE (https://bugs.mojang.com/browse/MCPE-19214)
return [AxisAlignedBB::one()->trim($this->open ? Facing::rotateY($this->facing, !$this->hingeRight) : $this->facing, 327 / 400)];
}
public function onNearbyBlockChange() : void{