Paper/Spigot-Server-Patches/0207-Prevent-Frosted-Ice-from-loading-holding-chunks.patch
Spottedleaf 2f782a6652 Updated Upstream (CraftBukkit)
Upstream has released updates that appears to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

CraftBukkit Changes:
17543ecf SPIGOT-5035: Error Using Virtual Merchant GUI
0fc6922b SPIGOT-5028: Villager#setVillagerExperience() doesn't work
bdbdbe44 SPIGOT-5024: Fox error - Unknown target reason
2019-06-06 16:56:51 +01:00

33 Zeilen
1.9 KiB
Diff

From f838e1b0922c03e717fde8c9edee438dbd239e34 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 39c3bbc9cf..881dfb1235 100644
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
@@ -26,7 +26,8 @@ public class BlockIceFrost extends BlockIce {
EnumDirection enumdirection = aenumdirection[j];
blockposition_pooledblockposition.g(blockposition).c(enumdirection);
- IBlockData iblockdata1 = world.getType(blockposition_pooledblockposition);
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition_pooledblockposition); // Paper - don't load chunks
+ if (iblockdata1 == null) continue; // Paper
if (iblockdata1.getBlock() == this && !this.e(iblockdata1, world, blockposition_pooledblockposition)) {
world.getBlockTickList().a(blockposition_pooledblockposition, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
@@ -89,7 +90,7 @@ public class BlockIceFrost extends BlockIce {
EnumDirection enumdirection = aenumdirection[l];
blockposition_pooledblockposition.g(blockposition).c(enumdirection);
- if (iblockaccess.getType(blockposition_pooledblockposition).getBlock() == this) {
+ if (((World) iblockaccess).getBlockIfLoaded(blockposition_pooledblockposition) == this) { // Paper - don't load chunks
++j;
if (j >= i) {
boolean flag = false;
--
2.21.0