diff options
author | DarkoGNU <42816979+DarkoGNU@users.noreply.github.com> | 2022-04-21 20:56:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-21 20:56:21 +0200 |
commit | 4f554e91abd861323aaf9f46d75ff0350a519cef (patch) | |
tree | a3e986e773d637e5a64dc83f5792d76c1b263802 /src/Entities/Pawn.h | |
parent | Protocol sources fixes (#5411) (diff) | |
download | cuberite-4f554e91abd861323aaf9f46d75ff0350a519cef.tar cuberite-4f554e91abd861323aaf9f46d75ff0350a519cef.tar.gz cuberite-4f554e91abd861323aaf9f46d75ff0350a519cef.tar.bz2 cuberite-4f554e91abd861323aaf9f46d75ff0350a519cef.tar.lz cuberite-4f554e91abd861323aaf9f46d75ff0350a519cef.tar.xz cuberite-4f554e91abd861323aaf9f46d75ff0350a519cef.tar.zst cuberite-4f554e91abd861323aaf9f46d75ff0350a519cef.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Entities/Pawn.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Entities/Pawn.h b/src/Entities/Pawn.h index 222e8f3b8..c0801ebb3 100644 --- a/src/Entities/Pawn.h +++ b/src/Entities/Pawn.h @@ -33,6 +33,16 @@ public: virtual void HandleFalling(void); virtual void OnRemoveFromWorld(cWorld & a_World) override; + /** Handles farmland trampling when hitting the ground. + Algorithm: + fall height <= 0.6875 blocks: no trampling + fall height > 0.6875 and <= 1.0625: 25% chance of trampling + 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. + */ + void HandleFarmlandTrampling(double a_FallHeight); + /** Tells all pawns which are targeting us to stop targeting us. */ void StopEveryoneFromTargetingMe(); |