mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-28 23:38:25 +01:00
e82ef9ec05
ForgeFlower is better than Spigots FernFlower at decompiling the source. However, in order to maintain the CraftBukkit patches, we must keep using spigots for the primary. However, for any file that we import on top of Spigots imported files there is nothing stopping us from using better decompiled files. So these changes will use ForgeFlower to maintain a better set of decomped files, so anything we add on top of Paper can start off in a better spot.
30 lines
No EOL
1.9 KiB
Diff
30 lines
No EOL
1.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Sat, 10 Mar 2018 16:33:15 -0500
|
|
Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
|
index 7bea86f52b..ea3a6f2fb1 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
|
@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce {
|
|
try (BlockPosition.b blockposition$b = BlockPosition.b.r()) {
|
|
for(EnumDirection enumdirection : EnumDirection.values()) {
|
|
blockposition$b.j(blockposition).d(enumdirection);
|
|
- IBlockData iblockdata1 = world.getType(blockposition$b);
|
|
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition$b); // Paper - don't load chunks
|
|
+ if (iblockdata1 == null) continue; // Paper
|
|
if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition$b)) {
|
|
world.J().a(blockposition$b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
|
}
|
|
@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce {
|
|
try (BlockPosition.b blockposition$b = BlockPosition.b.r()) {
|
|
for(EnumDirection enumdirection : EnumDirection.values()) {
|
|
blockposition$b.j(blockposition).d(enumdirection);
|
|
- if (iblockaccess.getType(blockposition$b).getBlock() == this) {
|
|
+ if (((World) iblockaccess).getBlockIfLoaded(blockposition$b) == this) { // Paper - don't load chunks
|
|
++j;
|
|
if (j >= i) {
|
|
boolean flag = false;
|
|
--
|