From d07fe95b6586ec7d6108a16b1810ee360df7ebae Mon Sep 17 00:00:00 2001 From: Byteflux Date: Wed, 1 Jul 2015 00:39:31 -0700 Subject: [PATCH] Configurable lava flow speed --- .../0059-Configurable-lava-flow-speed.patch | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Spigot-Server-Patches/0059-Configurable-lava-flow-speed.patch diff --git a/Spigot-Server-Patches/0059-Configurable-lava-flow-speed.patch b/Spigot-Server-Patches/0059-Configurable-lava-flow-speed.patch new file mode 100644 index 0000000000..674e1b40c5 --- /dev/null +++ b/Spigot-Server-Patches/0059-Configurable-lava-flow-speed.patch @@ -0,0 +1,40 @@ +From 497fee67414ed7957c5bbc318c45e1789a877102 Mon Sep 17 00:00:00 2001 +From: Byteflux +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 +index 33ff734..261d732 100644 +--- 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 +index 4c6bfb9..20cf3ce 100644 +--- 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 ); ++ } + } +-- +1.9.5.msysgit.1 +