2018-02-13 00:44:50 +00:00
|
|
|
From 39fb008250a9039f1547408fbd9769db26333787 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
|
2018-02-13 00:44:50 +00:00
|
|
|
index dbd82d5a9..b0b3033e7 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
|
2018-02-13 00:44:50 +00:00
|
|
|
@@ -190,4 +190,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
|
2018-02-13 00:44:50 +00:00
|
|
|
index 3aaa19b2f..739b9aac3 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
|
2016-12-10 00:07:35 +00:00
|
|
|
@@ -272,6 +272,9 @@ public class BlockFlowing extends BlockFluids {
|
2016-02-29 23:09:49 +00:00
|
|
|
* 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) {
|
2016-12-21 21:29:50 +00:00
|
|
|
+ return world.worldProvider.isSkyMissing() ? world.paperConfig.lavaFlowSpeedNether : world.paperConfig.lavaFlowSpeedNormal;
|
2016-02-29 23:09:49 +00:00
|
|
|
+ }
|
|
|
|
if (this.material == Material.WATER && (
|
|
|
|
world.getType(blockposition.north(1)).getBlock().material == Material.LAVA ||
|
|
|
|
world.getType(blockposition.south(1)).getBlock().material == Material.LAVA ||
|
2016-12-21 21:29:50 +00:00
|
|
|
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
|
2018-02-13 00:44:50 +00:00
|
|
|
index f3eb2a797..d0265f960 100644
|
2016-12-21 21:29:50 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
|
|
|
@@ -114,6 +114,7 @@ public abstract class WorldProvider {
|
|
|
|
return this.f;
|
|
|
|
}
|
|
|
|
|
|
|
|
+ public final boolean isSkyMissing() { return this.n(); } // Paper - OBFHELPER
|
|
|
|
public boolean n() {
|
|
|
|
return this.e;
|
|
|
|
}
|
2016-02-29 23:09:49 +00:00
|
|
|
--
|
2018-01-11 05:31:19 +00:00
|
|
|
2.14.3
|
2016-02-29 23:09:49 +00:00
|
|
|
|