mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 01:47:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: 840e72091 [CI-SKIP] [Auto] Rebuild Patches a33232d4a Add beacon activation and deactivation events (#5121) bc7ea673a Add internal channel initialization listeners (#5557) b28ad17ac Check for world change in MoveEvent API methods 3095c7592 [Auto] Updated Upstream (CraftBukkit) f56989c97 Add RespawnFlags to PlayerRespawnEvent (#5533) 7579c2667 Add more API to PlayerMoveEvent (#5553)
This commit is contained in:
78
patches/server/0065-Implement-infinite-lava.patch
Normal file
78
patches/server/0065-Implement-infinite-lava.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
From 0000000000000000000000000000000000000000 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
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
index b14b0134b42aa6d1eb285aa453ec6067cc702878..46187d18f797f834deef3685c857e88a8c4f5659 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeFlowing.java
|
||||
@@ -226,7 +226,7 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
}
|
||||
}
|
||||
|
||||
- if (this.f() && j >= 2) {
|
||||
+ if (infinite(iworldreader) && j >= getRequiredSources(iworldreader)) { // Purpur
|
||||
IBlockData iblockdata2 = iworldreader.getType(blockposition.down());
|
||||
Fluid fluid1 = iblockdata2.getFluid();
|
||||
|
||||
@@ -322,6 +322,17 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
return (Fluid) this.e().h().set(FluidTypeFlowing.FALLING, flag);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ protected boolean infinite(IWorldReader iworldreader) {
|
||||
+ return infinite();
|
||||
+ }
|
||||
+
|
||||
+ protected int getRequiredSources(IWorldReader iworldreader) {
|
||||
+ return 2;
|
||||
+ }
|
||||
+ // 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/world/level/material/FluidTypeLava.java b/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
index b362a728b5d17256768847ab09e2505a9cc1918b..86f2e969d98c833700f0f48baf7610ad95b3f8a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FluidTypeLava.java
|
||||
@@ -163,6 +163,18 @@ public abstract class FluidTypeLava extends FluidTypeFlowing {
|
||||
generatoraccess.triggerEffect(1501, blockposition, 0);
|
||||
}
|
||||
|
||||
+ // Purpur start
|
||||
+ @Override
|
||||
+ protected boolean infinite(IWorldReader iworldreader) {
|
||||
+ return iworldreader.getWorldBorder().world.purpurConfig.lavaInfinite;
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ protected int getRequiredSources(IWorldReader iworldreader) {
|
||||
+ return iworldreader.getWorldBorder().world.purpurConfig.lavaInfiniteRequiredSources;
|
||||
+ }
|
||||
+ // Purpur end
|
||||
+
|
||||
@Override
|
||||
protected boolean f() {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
index f3c9a06be653a0fbd462677866134b634b8611b6..95605436c7d2d8e8b30217dc59d28ce2658d0e26 100644
|
||||
--- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
+++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java
|
||||
@@ -192,6 +192,13 @@ public class PurpurWorldConfig {
|
||||
farmlandGetsMoistFromBelow = getBoolean("blocks.farmland.gets-moist-from-below", farmlandGetsMoistFromBelow);
|
||||
}
|
||||
|
||||
+ public boolean lavaInfinite = false;
|
||||
+ public int lavaInfiniteRequiredSources = 2;
|
||||
+ private void lavaSettings() {
|
||||
+ lavaInfinite = getBoolean("blocks.lava.infinite-source", lavaInfinite);
|
||||
+ lavaInfiniteRequiredSources = getInt("blocks.lava.infinite-required-sources", lavaInfiniteRequiredSources);
|
||||
+ }
|
||||
+
|
||||
public boolean signAllowColors = false;
|
||||
public boolean signRightClickEdit = false;
|
||||
private void signSettings() {
|
||||
Reference in New Issue
Block a user