Fix missed diff causing lava to move too quickly

Missed diff from old patch file was causing lava to always move at the
faster 'nether' speed, ignoring the slower overworld speed entirely.
This is why we use obfuscation helpers now.

Fixes GH-521
This commit is contained in:
Zach Brown 2016-12-21 15:29:50 -06:00
parent a81ad3d8a8
commit a4152b2ad1
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76
2 changed files with 19 additions and 7 deletions

View file

@ -1,4 +1,4 @@
From 2e1c0867bef244dc97364bc05d6e7bc9ce078977 Mon Sep 17 00:00:00 2001 From 43136d69e680c2f35f3b55b07f6ff59de2b57f6b Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 12:27:07 -0600 Date: Wed, 2 Mar 2016 12:27:07 -0600
Subject: [PATCH] Configurable lava flow speed Subject: [PATCH] Configurable lava flow speed
@ -21,7 +21,7 @@ index 2ec5068..b5a106d 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java diff --git a/src/main/java/net/minecraft/server/BlockFlowing.java b/src/main/java/net/minecraft/server/BlockFlowing.java
index 8e9de3b..765a371 100644 index 8e9de3b..0a28236 100644
--- a/src/main/java/net/minecraft/server/BlockFlowing.java --- a/src/main/java/net/minecraft/server/BlockFlowing.java
+++ b/src/main/java/net/minecraft/server/BlockFlowing.java +++ b/src/main/java/net/minecraft/server/BlockFlowing.java
@@ -272,6 +272,9 @@ public class BlockFlowing extends BlockFluids { @@ -272,6 +272,9 @@ public class BlockFlowing extends BlockFluids {
@ -29,11 +29,23 @@ index 8e9de3b..765a371 100644
*/ */
public int getFlowSpeed(World world, BlockPosition blockposition) { public int getFlowSpeed(World world, BlockPosition blockposition) {
+ if (this.material == Material.LAVA) { + if (this.material == Material.LAVA) {
+ return world.worldProvider.m() ? world.paperConfig.lavaFlowSpeedNether : world.paperConfig.lavaFlowSpeedNormal; + return world.worldProvider.isSkyMissing() ? world.paperConfig.lavaFlowSpeedNether : world.paperConfig.lavaFlowSpeedNormal;
+ } + }
if (this.material == Material.WATER && ( if (this.material == Material.WATER && (
world.getType(blockposition.north(1)).getBlock().material == Material.LAVA || world.getType(blockposition.north(1)).getBlock().material == Material.LAVA ||
world.getType(blockposition.south(1)).getBlock().material == Material.LAVA || world.getType(blockposition.south(1)).getBlock().material == Material.LAVA ||
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
index 660f3bc..a27512c 100644
--- 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;
}
-- --
2.9.3 2.9.3

View file

@ -1,11 +1,11 @@
From 57220f575c59a8cbaa23d459974e3a34f75fe90e Mon Sep 17 00:00:00 2001 From 837b383af7193aadf5d3bb44d8901ba782831c8d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 5 Apr 2016 19:42:22 -0400 Date: Tue, 5 Apr 2016 19:42:22 -0400
Subject: [PATCH] Don't spam reload spawn chunks in nether/end Subject: [PATCH] Don't spam reload spawn chunks in nether/end
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 222b316..b988699 100644 index 00a5a4c..eecae50 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -3190,6 +3190,7 @@ public abstract class World implements IBlockAccess { @@ -3190,6 +3190,7 @@ public abstract class World implements IBlockAccess {
@ -17,10 +17,10 @@ index 222b316..b988699 100644
BlockPosition blockposition = this.getSpawn(); BlockPosition blockposition = this.getSpawn();
int k = i * 16 + 8 - blockposition.getX(); int k = i * 16 + 8 - blockposition.getX();
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
index 660f3bc..9adadaf 100644 index a27512c..4691b3d 100644
--- a/src/main/java/net/minecraft/server/WorldProvider.java --- a/src/main/java/net/minecraft/server/WorldProvider.java
+++ b/src/main/java/net/minecraft/server/WorldProvider.java +++ b/src/main/java/net/minecraft/server/WorldProvider.java
@@ -137,6 +137,6 @@ public abstract class WorldProvider { @@ -138,6 +138,6 @@ public abstract class WorldProvider {
public void s() {} public void s() {}
public boolean c(int i, int j) { public boolean c(int i, int j) {