summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/Blocks/BlockFarmland.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Blocks/BlockFarmland.h b/src/Blocks/BlockFarmland.h
index e5a55fcdd..82c4db923 100644
--- a/src/Blocks/BlockFarmland.h
+++ b/src/Blocks/BlockFarmland.h
@@ -120,7 +120,8 @@ public:
/** Returns true if there's either a water source block close enough to hydrate the specified position, or it's raining there. */
bool IsWaterInNear(cChunk & a_Chunk, const Vector3i a_RelPos)
{
- if (a_Chunk.GetWorld()->IsWeatherWetAtXYZ(a_RelPos))
+ const auto WorldPos = a_Chunk.RelativeToAbsolute(a_RelPos);
+ if (a_Chunk.GetWorld()->IsWeatherWetAtXYZ(WorldPos))
{
// Rain hydrates farmland, too
return true;
@@ -130,7 +131,6 @@ public:
// Ref.: https://minecraft.gamepedia.com/Farmland#Hydration
// TODO: Rewrite this to use the chunk and its neighbors directly
cBlockArea Area;
- auto WorldPos = a_Chunk.RelativeToAbsolute(a_RelPos);
if (!Area.Read(*a_Chunk.GetWorld(), WorldPos - Vector3i(4, 0, 4), WorldPos + Vector3i(4, 1, 4)))
{
// Too close to the world edge, cannot check surroundings