mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-18 08:57:44 +01:00
Upstream has released updates that appears to apply and compile correctly Paper Changes: b75eeca0 Boost light task priority to ensure it doesnt hold up chunk loads 3d2bc848 Ensure VillagerTrades doesn't load async - fixes #3495 e470f1ef Add more information to Timing Reports f4a47db6 Improve Thread Pool usage to allow single threads for single cpu servers a4fe910f Fix sounds when using worldedit regen command 70ad51a8 Updated Upstream (Bukkit/CraftBukkit) d7cfa4fa Improve legacy format serialization more
91 lines
3.7 KiB
Diff
91 lines
3.7 KiB
Diff
From 4332d7e3f964bec57c37c29485fc30c5c8e27972 Mon Sep 17 00:00:00 2001
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
Date: Sat, 23 Nov 2019 17:55:42 -0600
|
|
Subject: [PATCH] Implement infinite lava
|
|
|
|
---
|
|
.../java/net/minecraft/server/FluidTypeFlowing.java | 10 +++++++++-
|
|
src/main/java/net/minecraft/server/FluidTypeLava.java | 7 +++++++
|
|
src/main/java/net/minecraft/server/WorldProvider.java | 2 +-
|
|
src/main/java/net/pl3x/purpur/PurpurWorldConfig.java | 5 +++++
|
|
4 files changed, 22 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/FluidTypeFlowing.java b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
|
index 376dca1889..1a14fe4a24 100644
|
|
--- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
|
+++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
|
@@ -219,7 +219,7 @@ public abstract class FluidTypeFlowing extends FluidType {
|
|
}
|
|
}
|
|
|
|
- if (this.f() && j >= 2) {
|
|
+ if (infinite(iworldreader) && j >= 2) { // Purpur
|
|
IBlockData iblockdata2 = iworldreader.getType(blockposition.down());
|
|
Fluid fluid1 = iblockdata2.getFluid();
|
|
|
|
@@ -290,6 +290,14 @@ public abstract class FluidTypeFlowing extends FluidType {
|
|
return (Fluid) this.e().h().set(FluidTypeFlowing.FALLING, flag);
|
|
}
|
|
|
|
+ // Purpur start
|
|
+ protected boolean infinite(IWorldReader iworldreader) {
|
|
+ return infinite();
|
|
+ }
|
|
+ // Purpur end
|
|
+
|
|
+ protected boolean infinite() { return f(); } // Purpur - OBFHELPER
|
|
+
|
|
protected abstract boolean f();
|
|
|
|
protected void a(GeneratorAccess generatoraccess, BlockPosition blockposition, IBlockData iblockdata, EnumDirection enumdirection, Fluid fluid) {
|
|
diff --git a/src/main/java/net/minecraft/server/FluidTypeLava.java b/src/main/java/net/minecraft/server/FluidTypeLava.java
|
|
index d25368d032..09f82c2d92 100644
|
|
--- a/src/main/java/net/minecraft/server/FluidTypeLava.java
|
|
+++ b/src/main/java/net/minecraft/server/FluidTypeLava.java
|
|
@@ -147,6 +147,13 @@ public abstract class FluidTypeLava extends FluidTypeFlowing {
|
|
generatoraccess.triggerEffect(1501, blockposition, 0);
|
|
}
|
|
|
|
+ // Purpur start
|
|
+ @Override
|
|
+ protected boolean infinite(IWorldReader iworldreader) {
|
|
+ return iworldreader.getWorldProvider().getWorld().purpurConfig.lavaInfinite;
|
|
+ }
|
|
+ // Purpur end
|
|
+
|
|
@Override
|
|
protected boolean f() {
|
|
return false;
|
|
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
|
|
index 9eba9a12c0..39252e6873 100644
|
|
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
|
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
|
@@ -5,7 +5,7 @@ import javax.annotation.Nullable;
|
|
public abstract class WorldProvider {
|
|
|
|
public static final float[] a = new float[]{1.0F, 0.75F, 0.5F, 0.25F, 0.0F, 0.25F, 0.5F, 0.75F};
|
|
- protected final World b;
|
|
+ protected final World b; public World getWorld() { return b; } // Purpur - OBFHELPER
|
|
private final DimensionManager f;
|
|
protected boolean c;
|
|
protected boolean d;
|
|
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
index 4bb5ddea44..5b042a6098 100644
|
|
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
|
@@ -127,6 +127,11 @@ public class PurpurWorldConfig {
|
|
grindstoneBlacklist.addAll(blacklist);
|
|
}
|
|
|
|
+ public boolean lavaInfinite = false;
|
|
+ private void lavaSettings() {
|
|
+ lavaInfinite = getBoolean("blocks.lava.infinite-source", lavaInfinite);
|
|
+ }
|
|
+
|
|
public boolean signAllowColors = false;
|
|
public boolean signRightClickEdit = false;
|
|
private void signSettings() {
|
|
--
|
|
2.24.0
|
|
|