From 4f554e91abd861323aaf9f46d75ff0350a519cef Mon Sep 17 00:00:00 2001 From: DarkoGNU <42816979+DarkoGNU@users.noreply.github.com> Date: Thu, 21 Apr 2022 20:56:21 +0200 Subject: Implement farmland trampling (#5401) * Add DarkoGNU to CONTRIBUTORS * HandleFarmlandTrampling function & its docs * Fix decimal separators (, -> .) * Fix style. Adjust thresholds. Make function non-virtual * Adjust thresholds again. Prepare for fixing #5402 * Trying to fix falling through farmlands * Another style fix * Add FarmlandTramplingEnabled to world.ini * Docs for IsFarmlandTramplingEnabled * Style * Farmland trampling - handling the random chance * Trampling kinda works, very buggy * Trying to fix clang-tidy * Fix trampling * Trying to fix the 'undocumented API symbol' * Implement bearbin's suggestions * Calculate volume properly * Don't use std::pow for squaring * Improved comments * Really, should comments' style be checked? --- src/BlockInfo.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/BlockInfo.cpp') diff --git a/src/BlockInfo.cpp b/src/BlockInfo.cpp index 4f2513928..9f29d3b31 100644 --- a/src/BlockInfo.cpp +++ b/src/BlockInfo.cpp @@ -1164,6 +1164,7 @@ float cBlockInfo::GetBlockHeight(const BLOCKTYPE Block) case E_BLOCK_DARK_OAK_FENCE: return 1.5; case E_BLOCK_DARK_OAK_FENCE_GATE: return 1.5; case E_BLOCK_ENCHANTMENT_TABLE: return 0.75; // 12 pixels + case E_BLOCK_FARMLAND: return 0.9375; // 15 pixels case E_BLOCK_FENCE: return 1.5; case E_BLOCK_JUNGLE_FENCE: return 1.5; case E_BLOCK_JUNGLE_FENCE_GATE: return 1.5; -- cgit v1.2.3