2015-06-04 08:42:09 +00:00
|
|
|
From 36ace97ecfaceaac3b26402c8f8b53ce6ec2f4ab Mon Sep 17 00:00:00 2001
|
2015-04-18 09:31:53 +00:00
|
|
|
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 de1dddb..d8de1fc 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
|
|
|
|
@@ -88,7 +88,18 @@ public class BlockFlowing extends BlockFluids {
|
|
|
|
iblockdata = iblockdata.set(BlockFlowing.LEVEL, Integer.valueOf(i1));
|
|
|
|
world.setTypeAndData(blockposition, iblockdata, 2);
|
|
|
|
world.a(blockposition, (Block) this, j);
|
|
|
|
- world.applyPhysics(blockposition, this);
|
|
|
|
+ // PaperSpigot start - Optimize draining
|
|
|
|
+ if (world.paperSpigotConfig.optimizeDraining) {
|
|
|
|
+ world.d(blockposition.west(), this);
|
|
|
|
+ world.d(blockposition.east(), this);
|
|
|
|
+ world.d(blockposition.up(), this);
|
|
|
|
+ world.d(blockposition.north(), this);
|
|
|
|
+ world.d(blockposition.south(), this);
|
|
|
|
+ world.spigotConfig.antiXrayInstance.updateNearbyBlocks(world, blockposition); // Spigot
|
|
|
|
+ } else {
|
|
|
|
+ world.applyPhysics(blockposition, this);
|
|
|
|
+ }
|
|
|
|
+ // PaperSpigot end
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-06-04 08:42:09 +00:00
|
|
|
index 0bf4d21..2375379 100644
|
2015-04-18 09:31:53 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-06-04 08:42:09 +00:00
|
|
|
@@ -209,4 +209,10 @@ public class PaperSpigotWorldConfig
|
2015-04-18 09:31:53 +00:00
|
|
|
useAsyncLighting = getBoolean( "use-async-lighting", false );
|
|
|
|
log( "World async lighting: " + useAsyncLighting );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean optimizeDraining;
|
|
|
|
+ private void optimizeDraining()
|
|
|
|
+ {
|
|
|
|
+ optimizeDraining = getBoolean( "optimize-draining", false );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-06-04 08:42:09 +00:00
|
|
|
1.9.5.msysgit.1
|
2015-04-18 09:31:53 +00:00
|
|
|
|