13
0
geforkt von Mirrors/Paper
Paper/Spigot-Server-Patches/0237-Prevent-Frosted-Ice-from-loading-holding-chunks.patch
Aikar b62dfa0bf9
Updated Upstream (Bukkit/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

Bukkit Changes:
39ce5d3a SPIGOT-4399: ItemMeta.equals broken with AttributeModifiers

CraftBukkit Changes:
1cf8b5dc SPIGOT-4400: Populators running on existing chunks
116cb9a1 SPIGOT-4399: Add attribute modifier equality test
5ee1c18a SPIGOT-4398: Set ASM7_EXPERIMENTAL flag
2018-09-28 19:31:59 -04:00

33 Zeilen
1.9 KiB
Diff

From a545c755665ffec6dbea81ab36f0245be40806d6 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
@@ -16,7 +16,8 @@ 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
}
@@ -53,7 +54,7 @@ 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;
--
2.19.0