From 25208aefa4232a7e90198adbc542ec8b7c584c70 Mon Sep 17 00:00:00 2001 From: DarkoGNU <42816979+DarkoGNU@users.noreply.github.com> Date: Tue, 28 Jun 2022 23:49:41 +0200 Subject: Fix trampling for older clients and mobs (#5414) * Fix trampling for older clients and mobs * Style * Improve a comment * Improvements in HandleFarmlandTrampling --- src/Entities/Pawn.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/Entities/Pawn.h') diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h index c0801ebb3..5aae1c21f 100644 --- a/src/Entities/Pawn.h +++ b/src/Entities/Pawn.h @@ -40,8 +40,9 @@ public: fall height > 1.0625 and <= 1.5625: 66% chance of trampling fall height > 1.5625: always trample The values may differ from vanilla, they were determined experimentally. + Additionaly, mobs smaller than 0.512 cubic blocks won't trample. */ - void HandleFarmlandTrampling(double a_FallHeight); + void HandleFarmlandTrampling(double a_FallHeight, BLOCKTYPE a_BlockAtFoot, BLOCKTYPE a_BlockBelow); /** Tells all pawns which are targeting us to stop targeting us. */ void StopEveryoneFromTargetingMe(); -- cgit v1.2.3