summaryrefslogtreecommitdiffstats
path: root/src/Blocks/BlockFarmland.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Blocks/BlockFarmland.h')
-rw-r--r--src/Blocks/BlockFarmland.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Blocks/BlockFarmland.h b/src/Blocks/BlockFarmland.h
index f7003a650..2622ac98c 100644
--- a/src/Blocks/BlockFarmland.h
+++ b/src/Blocks/BlockFarmland.h
@@ -115,13 +115,14 @@ private:
/** Returns true if there's either a water source block close enough to hydrate the specified position, or it's raining there. */
static bool IsWaterInNear(const cChunk & a_Chunk, const Vector3i a_RelPos)
{
- const auto WorldPos = a_Chunk.RelativeToAbsolute(a_RelPos);
- if (a_Chunk.GetWorld()->IsWeatherWetAtXYZ(WorldPos))
+ if (a_Chunk.IsWeatherWetAt(a_RelPos.addedY(1)))
{
// Rain hydrates farmland, too
return true;
}
+ const auto WorldPos = a_Chunk.RelativeToAbsolute(a_RelPos);
+
// Search for water in a close proximity:
// Ref.: https://minecraft.gamepedia.com/Farmland#Hydration
// TODO: Rewrite this to use the chunk and its neighbors directly