2015-09-13 00:57:39 +00:00
|
|
|
From 2deee5c42a44793df5f89de7e5fb7df1d5627cad Mon Sep 17 00:00:00 2001
|
2015-07-01 07:39:31 +00:00
|
|
|
From: Byteflux <byte@byteflux.net>
|
|
|
|
Date: Wed, 1 Jul 2015 00:38:10 -0700
|
|
|
|
Subject: [PATCH] Configurable lava flow speed
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
|
2015-07-14 15:59:57 +00:00
|
|
|
index fc3fc48..23130ba 100644
|
2015-07-01 07:39:31 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
|
|
|
|
@@ -276,6 +276,9 @@ public class BlockFlowing extends BlockFluids {
|
|
|
|
* PaperSpigot - Get flow speed. Throttle if its water and flowing adjacent to lava
|
|
|
|
*/
|
|
|
|
public int getFlowSpeed(World world, BlockPosition blockposition) {
|
|
|
|
+ if (this.getMaterial() == Material.LAVA) {
|
|
|
|
+ return world.worldProvider.o() ? world.paperSpigotConfig.lavaFlowSpeedNether : world.paperSpigotConfig.lavaFlowSpeedNormal;
|
|
|
|
+ }
|
|
|
|
if (this.getMaterial() == Material.WATER && (
|
|
|
|
world.getType(blockposition.north(1)).getBlock().getMaterial() == Material.LAVA ||
|
|
|
|
world.getType(blockposition.south(1)).getBlock().getMaterial() == Material.LAVA ||
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2015-09-13 00:57:39 +00:00
|
|
|
index 2ecacd5..9ae1b18 100644
|
2015-07-01 07:39:31 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
@@ -352,4 +352,12 @@ public class PaperSpigotWorldConfig
|
|
|
|
fastDrainLava = getBoolean( "fast-drain.lava", false );
|
|
|
|
fastDrainWater = getBoolean( "fast-drain.water", false );
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public int lavaFlowSpeedNormal;
|
|
|
|
+ public int lavaFlowSpeedNether;
|
|
|
|
+ private void lavaFlowSpeed()
|
|
|
|
+ {
|
|
|
|
+ lavaFlowSpeedNormal = getInt( "lava-flow-speed.normal", 30 );
|
|
|
|
+ lavaFlowSpeedNether = getInt( "lava-flow-speed.nether", 10 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-09-13 00:57:39 +00:00
|
|
|
2.5.1
|
2015-07-01 07:39:31 +00:00
|
|
|
|