Skip to content
This repository was archived by the owner on Dec 29, 2023. It is now read-only.

Commit 7c64370

Browse files
committed
Implement [SportPaper-0086] Prevent Fire from loading chunks by cswhite2000
1 parent 4f0f7f2 commit 7c64370

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Titanium implements patches from other engines as well. **All credits go to the
102102
[Taco-0025] Fix east west cannoning
103103
104104
[SportPaper-0027] Fix head rotation packet spam
105+
[SportPaper-0086] Prevent Fire from loading chunks by cswhite2000
105106
[SportPaper-0134] Improved Async Task Scheduler by cswhite2000
106107
[SportPaper-0162] Fix PlayerInteractEvent not cancelling properly by cswhite2000
107108
[SportPaper-0176] Use fast util collections
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
From 1e50e49837d57ac6c72a5be0ccb6143b97305116 Mon Sep 17 00:00:00 2001
2+
From: cswhite2000 <[email protected]>
3+
Date: Mon, 13 Aug 2018 01:38:54 -0700
4+
Subject: [PATCH] Implement [SportPaper-0086] Prevent Fire from loading chunks
5+
by cswhite2000
6+
7+
This causes the nether to spam unload/reload chunks, plus overall
8+
bad behavior.
9+
10+
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
11+
index 76cd51296..d32552ff8 100644
12+
--- a/src/main/java/net/minecraft/server/BlockFire.java
13+
+++ b/src/main/java/net/minecraft/server/BlockFire.java
14+
@@ -176,6 +176,7 @@ public class BlockFire extends Block {
15+
}
16+
17+
BlockPosition blockposition1 = blockposition.a(j, l, k);
18+
+ if (!world.isLoaded(blockposition1)) continue; // Paper
19+
int j1 = this.m(world, blockposition1);
20+
21+
if (j1 > 0) {
22+
@@ -244,10 +245,13 @@ public class BlockFire extends Block {
23+
}
24+
25+
private void a(World world, BlockPosition blockposition, int i, Random random, int j) {
26+
+ // Paper start
27+
+ final IBlockData iblockdata = world.getTypeIfLoaded(blockposition);
28+
+ if (iblockdata == null) return;
29+
int k = this.c(world.getType(blockposition).getBlock());
30+
31+
if (random.nextInt(i) < k) {
32+
- IBlockData iblockdata = world.getType(blockposition);
33+
+ //IBlockData iblockdata = world.getType(blockposition); // Paper
34+
35+
// CraftBukkit start
36+
org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
37+
@@ -305,6 +309,8 @@ public class BlockFire extends Block {
38+
for (int k = 0; k < j; ++k) {
39+
EnumDirection enumdirection = aenumdirection[k];
40+
41+
+ final IBlockData type = world.getTypeIfLoaded(blockposition.shift(enumdirection)); // Paper
42+
+ if (type == null) continue; // Paper
43+
i = Math.max(this.d(world.getType(blockposition.shift(enumdirection)).getBlock()), i);
44+
}
45+
46+
--
47+
2.36.0.windows.1
48+

0 commit comments

Comments
 (0)