CavePVP-Stuff/cSpigot-master/spigot-server-Patches/0053-Optimize-draining.patch

30 lines
1.2 KiB
Diff
Raw Permalink Normal View History

2023-05-01 20:59:40 +02:00
From ecfb25ff80600cf3123b72c1fcc2f32086990105 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Fri, 10 Apr 2015 02:24:20 -0700
Subject: [PATCH] Optimize draining
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 640939175..422447843 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -88,7 +88,14 @@ public class BlockFlowing extends BlockFluids {
} else {
world.setData(i, j, k, j1, 2);
world.a(i, j, k, this, i1);
- world.applyPhysics(i, j, k, this);
+ // PaperSpigot start - Optimize draining
+ world.e(i - 1, j, k, this);
+ world.e(i + 1, j, k, this);
+ world.e(i, j + 1, k, this);
+ world.e(i, j, k - 1, this);
+ world.e(i, j, k + 1, this);
+ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, i, j, k); // Spigot
+ // PaperSpigot end
}
}
} else {
--
2.13.3