-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configurable Dry and Wet Farm Land Nearby Water Tick Rates
- Loading branch information
1 parent
96d5e6c
commit c4c41bd
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
patches/server/1053-Configurable-Dry-and-Wet-Farmland-Tick-Rates.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: MrPowerGamerBR <git@mrpowergamerbr.com> | ||
Date: Sat, 25 Nov 2023 00:29:01 -0300 | ||
Subject: [PATCH] Configurable Dry and Wet Farmland Tick Rates | ||
|
||
|
||
diff --git a/src/main/java/net/minecraft/world/level/block/FarmBlock.java b/src/main/java/net/minecraft/world/level/block/FarmBlock.java | ||
index 5946f06f63b5694034bd027984a4925b0831d439..d01e78d15e98e1d3c3bd6c023ce25f999b9f5421 100644 | ||
--- a/src/main/java/net/minecraft/world/level/block/FarmBlock.java | ||
+++ b/src/main/java/net/minecraft/world/level/block/FarmBlock.java | ||
@@ -85,6 +85,8 @@ public class FarmBlock extends Block { | ||
@Override | ||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { | ||
int i = (Integer) state.getValue(FarmBlock.MOISTURE); | ||
+ if (i > 0 && world.paperConfig().tickRates.wetFarmland != 1 && (world.paperConfig().tickRates.wetFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.wetFarmland != 0)) { return; } // Paper | ||
+ if (i == 0 && world.paperConfig().tickRates.dryFarmland != 1 && (world.paperConfig().tickRates.dryFarmland < 1 || (net.minecraft.server.MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig().tickRates.dryFarmland != 0)) { return; } // Paper | ||
|
||
if (!FarmBlock.isNearWater(world, pos) && !world.isRainingAt(pos.above())) { | ||
if (i > 0) { |