Prevent fire from spreading to invalid locations

This commit is contained in:
Mariell Hoversholm 2020-09-21 20:40:48 +02:00
parent 9f27271254
commit fc0dafdc58

View file

@ -1,11 +1,13 @@
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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
@ -23,7 +25,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
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) {