2016-03-18 21:41:26 +00:00
|
|
|
From 6b8c28394f75afccd698e24332449b441f0f8b30 Mon Sep 17 00:00:00 2001
|
2016-02-29 23:09:49 +00:00
|
|
|
From: Byteflux <byte@byteflux.net>
|
|
|
|
Date: Wed, 2 Mar 2016 12:27:07 -0600
|
|
|
|
Subject: [PATCH] Configurable lava flow speed
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-03-18 21:41:26 +00:00
|
|
|
index 43f2672..3d1f0ff 100644
|
2016-02-29 23:09:49 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2016-03-18 21:41:26 +00:00
|
|
|
@@ -209,4 +209,11 @@ public class PaperWorldConfig {
|
2016-02-29 23:09:49 +00:00
|
|
|
fastDrainLava = getBoolean("fast-drain.lava", false);
|
|
|
|
fastDrainWater = getBoolean("fast-drain.water", false);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public int lavaFlowSpeedNormal;
|
|
|
|
+ public int lavaFlowSpeedNether;
|
|
|
|
+ private void lavaFlowSpeeds() {
|
|
|
|
+ lavaFlowSpeedNormal = getInt("lava-flow-speed.normal", 30);
|
|
|
|
+ lavaFlowSpeedNether = getInt("lava-flow-speed.nether", 10);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
|
2016-03-16 07:21:39 +00:00
|
|
|
index 517c1e8..51b80cb 100644
|
2016-02-29 23:09:49 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockFlowing.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java
|
|
|
|
@@ -279,6 +279,9 @@ public class BlockFlowing extends BlockFluids {
|
|
|
|
* Paper - Get flow speed. Throttle if its water and flowing adjacent to lava
|
|
|
|
*/
|
|
|
|
public int getFlowSpeed(World world, BlockPosition blockposition) {
|
|
|
|
+ if (this.material == Material.LAVA) {
|
|
|
|
+ return world.worldProvider.m() ? world.paperConfig.lavaFlowSpeedNether : world.paperConfig.lavaFlowSpeedNormal;
|
|
|
|
+ }
|
|
|
|
if (this.material == Material.WATER && (
|
|
|
|
world.getType(blockposition.north(1)).getBlock().material == Material.LAVA ||
|
|
|
|
world.getType(blockposition.south(1)).getBlock().material == Material.LAVA ||
|
|
|
|
--
|
2016-03-18 21:41:26 +00:00
|
|
|
2.7.3
|
2016-02-29 23:09:49 +00:00
|
|
|
|