mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 04:09:54 +01:00
40 lines
1.8 KiB
Diff
40 lines
1.8 KiB
Diff
From 38052c7fb6cc2f5ee6bd889f908747a44b99f400 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index dad5a95..72f1000 100644
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
@@ -206,4 +206,11 @@ public class PaperWorldConfig {
|
|
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
|
|
index 141765e..2ca998b 100644
|
|
--- 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 ||
|
|
--
|
|
2.7.2
|
|
|