From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Mon, 15 Mar 2021 03:52:17 -0500
Subject: [PATCH] Tick fluids config


diff --git a/src/main/java/net/minecraft/world/level/block/BlockFluids.java b/src/main/java/net/minecraft/world/level/block/BlockFluids.java
index 0ed8d938b8fafdb03e01a00a201ba3f8597ac6e9..0eff89bf9e114271c34c37cad1b98691902529ac 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockFluids.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockFluids.java
@@ -100,7 +100,7 @@ public class BlockFluids extends Block implements IFluidSource {
 
     @Override
     public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
-        if (this.a(world, blockposition, iblockdata)) {
+        if (world.purpurConfig.tickFluids && this.a(world, blockposition, iblockdata)) { // Purpur
             world.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.getFlowSpeed(world, blockposition)); // Paper
         }
 
@@ -125,7 +125,7 @@ public class BlockFluids extends Block implements IFluidSource {
 
     @Override
     public IBlockData updateState(IBlockData iblockdata, EnumDirection enumdirection, IBlockData iblockdata1, GeneratorAccess generatoraccess, BlockPosition blockposition, BlockPosition blockposition1) {
-        if (iblockdata.getFluid().isSource() || iblockdata1.getFluid().isSource()) {
+        if (generatoraccess.getMinecraftWorld().purpurConfig.tickFluids && iblockdata.getFluid().isSource() || iblockdata1.getFluid().isSource()) { // Purpur
             generatoraccess.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.b.a((IWorldReader) generatoraccess));
         }
 
@@ -134,7 +134,7 @@ public class BlockFluids extends Block implements IFluidSource {
 
     @Override
     public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
-        if (this.a(world, blockposition, iblockdata)) {
+        if (world.purpurConfig.tickFluids && this.a(world, blockposition, iblockdata)) { // Purpur
             world.getFluidTickList().a(blockposition, iblockdata.getFluid().getType(), this.getFlowSpeed(world, blockposition)); // Paper
         }
 
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
index 6e26a462e8b376d3a8fe12d2f14df226fc5d1a49..8491e9198c302bf62648498d84f62b505695cfef 100644
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
@@ -261,6 +261,11 @@ public class PurpurWorldConfig {
         witherSkullDespawnRate = getInt("gameplay-mechanics.projectile-despawn-rates.wither_skull", witherSkullDespawnRate);
     }
 
+    public boolean tickFluids = true;
+    private void fluidSettings() {
+        tickFluids = getBoolean("gameplay-mechanics.tick-fluids", tickFluids);
+    }
+
     public int snowballDamage = -1;
     private void snowballSettings() {
         snowballDamage = getInt("gameplay-mechanics.projectile-damage.snowball", snowballDamage);
