From 692e1253c68f3aaa50e00a5a8deae74d253db791 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 14 Apr 2023 16:02:17 +0100 Subject: [PATCH] Fixed AABB height for farmland and grass paths (fixed in 1.19.50) --- src/block/Farmland.php | 2 +- src/block/GrassPath.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/block/Farmland.php b/src/block/Farmland.php index 57392300f..04f2e80b8 100644 --- a/src/block/Farmland.php +++ b/src/block/Farmland.php @@ -64,7 +64,7 @@ class Farmland extends Transparent{ * @return AxisAlignedBB[] */ protected function recalculateCollisionBoxes() : array{ - return [AxisAlignedBB::one()]; //TODO: this should be trimmed at the top by 1/16, but MCPE currently treats them as a full block (https://bugs.mojang.com/browse/MCPE-12109) + return [AxisAlignedBB::one()->trim(Facing::UP, 1 / 16)]; } public function onNearbyBlockChange() : void{ diff --git a/src/block/GrassPath.php b/src/block/GrassPath.php index 7cbb873ef..5b11bd374 100644 --- a/src/block/GrassPath.php +++ b/src/block/GrassPath.php @@ -33,7 +33,7 @@ class GrassPath extends Transparent{ * @return AxisAlignedBB[] */ protected function recalculateCollisionBoxes() : array{ - return [AxisAlignedBB::one()]; //TODO: this should be trimmed at the top by 1/16, but MCPE currently treats them as a full block (https://bugs.mojang.com/browse/MCPE-12109) + return [AxisAlignedBB::one()->trim(Facing::UP, 1 / 16)]; } public function onNearbyBlockChange() : void{