Paper/Spigot-Server-Patches/0235-Prevent-Frosted-Ice-from-loading-holding-chunks.patch
Shane Freeder 3496f2d7e4
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Developers!: You will need to clean up your work/Minecraft/1.13.2 folder for this

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:
b850a822 SPIGOT-4526: Add conversion time API for Zombie & subclasses

CraftBukkit Changes:
38cf676e SPIGOT-4534: CreatureSpawnEvent not being called for CHUNK_GEN
b446cb5d SPIGOT-4527: Fix sponges with waterlogged blocks
6ec8ea5c SPIGOT-4526: Add conversion time API for Zombie & subclasses
c64fe508 Mappings Update
a3c2ec03 Fix missing ServerListPingEvent call for legacy pings

Spigot Changes:
1dc156ce Rebuild patches
140f654d Mappings Update
2018-12-17 05:19:39 +00:00

33 lines
1.9 KiB
Diff

From f6be9923bfdf606012746f71fbb32ffb06ddc952 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 598621fbb..5c5b3a531 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.g(blockposition).c(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.getBlockTickList().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.g(blockposition).c(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.20.0