Prevent fire from spreading to invalid locations

This commit is contained in:
Mariell Hoversholm 2020-09-21 20:40:48 +02:00 committed by Mariell
parent 826e09f369
commit eda80e3d7c
3 changed files with 7 additions and 5 deletions

View File

@ -1,13 +1,15 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 17 Apr 2016 17:27:09 -0400
Subject: [PATCH] Prevent Fire from loading chunks
Subject: [PATCH] Prevent Fire from loading chunks & wrongly spread
This causes the nether to spam unload/reload chunks, plus overall
bad behavior.
This also stops fire from spreading to illegal locations.
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 3d6aae40cab0cefbfc56389d9d2d37d2f0badd98..48b52b58ff4779fe92d17ab3b3c4cf608917a325 100644
index 3d6aae40cab0cefbfc56389d9d2d37d2f0badd98..e79f3872de2989d0b9b28a8b49cc399968f5bdbf 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -115,7 +115,7 @@ public class BlockFire extends BlockFireAbstract {
@ -23,7 +25,7 @@ index 3d6aae40cab0cefbfc56389d9d2d37d2f0badd98..48b52b58ff4779fe92d17ab3b3c4cf60
}
blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, l, j1, i1);
+ if (!worldserver.isLoaded(blockposition_mutableblockposition)) continue; // Paper
+ if (blockposition_mutableblockposition.isInvalidYLocation() || !worldserver.isLoaded(blockposition_mutableblockposition)) continue; // Paper
int l1 = this.a((IWorldReader) worldserver, (BlockPosition) blockposition_mutableblockposition);
if (l1 > 0) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 48b52b58ff4779fe92d17ab3b3c4cf608917a325..acd0ec4bf30c5d559d99ec449fef166ce59076e6 100644
index e79f3872de2989d0b9b28a8b49cc399968f5bdbf..4716f366342a3ef70d0ea50e3747786fad1e3573 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -3,6 +3,7 @@ package net.minecraft.server;

View File

@ -22,7 +22,7 @@ index b6081d259444f0d78736802b5d565faf776e825f..505d40278d4472e0015a53af8e93bd81
public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
org.spigotmc.AsyncCatcher.catchOp("block onPlace"); // Spigot
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 5ef90510b8bdac2dcf58cabfa78ba48a30a22a97..e2dd27be6b523c6e6668923c1b1900cb9251f39f 100644
index e5d75a8a93ffe7bc3747b48210eea6189a956d54..0e6ce21db67447d0eb84eb1633653decc172b2da 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -343,8 +343,10 @@ public class BlockFire extends BlockFireAbstract {