Paper/Spigot-Server-Patches/Prevent-Frosted-Ice-from-loading-holding-chunks.patch
Jason Penilla 062733b903 Updated Upstream (CraftBukkit/Spigot)
Doesn't compile yet.

CraftBukkit Changes:
90d6905b Repackage NMS
69cf961d Repackage patches

Spigot Changes:
79d53c28 Repackage NMS
2021-03-16 00:19:45 -07:00

32 lines
2.0 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/world/level/block/BlockIceFrost.java b/src/main/java/net/minecraft/world/level/block/BlockIceFrost.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/block/BlockIceFrost.java
+++ b/src/main/java/net/minecraft/world/level/block/BlockIceFrost.java
@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce {
EnumDirection enumdirection = aenumdirection[j];
blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, enumdirection);
- IBlockData iblockdata1 = worldserver.getType(blockposition_mutableblockposition);
+ IBlockData iblockdata1 = worldserver.getTypeIfLoaded(blockposition_mutableblockposition); // Paper
+ if (iblockdata1 == null) { continue; } // Paper
if (iblockdata1.a((Block) this) && !this.e(iblockdata1, (World) worldserver, blockposition_mutableblockposition)) {
worldserver.getBlockTickList().a(blockposition_mutableblockposition, this, MathHelper.nextInt(random, worldserver.paperConfig.frostedIceDelayMin, worldserver.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
@@ -0,0 +0,0 @@ public class BlockIceFrost extends BlockIce {
EnumDirection enumdirection = aenumdirection[l];
blockposition_mutableblockposition.a((BaseBlockPosition) blockposition, enumdirection);
- if (iblockaccess.getType(blockposition_mutableblockposition).a((Block) this)) {
+ // Paper start
+ IBlockData type = iblockaccess.getTypeIfLoaded(blockposition_mutableblockposition);
+ if (type != null && type.a((Block) this)) { // Paper end
++j;
if (j >= i) {
return false;