2019-01-01 04:15:55 +01:00
|
|
|
From dd443010b1ebb8d120b26a24dccf8c1f10caf5bb Mon Sep 17 00:00:00 2001
|
2018-07-18 20:55:52 +02:00
|
|
|
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
|
2019-01-01 04:15:55 +01:00
|
|
|
index 792a69ad5..fa7407ba6 100644
|
2018-07-18 20:55:52 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
2019-01-01 04:15:55 +01:00
|
|
|
@@ -25,7 +25,8 @@ public class BlockIceFrost extends BlockIce {
|
|
|
|
EnumDirection enumdirection = aenumdirection[j];
|
|
|
|
|
|
|
|
blockposition_b.g(blockposition).c(enumdirection);
|
|
|
|
- IBlockData iblockdata1 = world.getType(blockposition_b);
|
|
|
|
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition_b); // Paper - don't load chunks
|
2018-09-01 00:56:57 +02:00
|
|
|
+ if (iblockdata1 == null) continue; // Paper
|
2019-01-01 04:15:55 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
@@ -87,7 +88,7 @@ public class BlockIceFrost extends BlockIce {
|
|
|
|
EnumDirection enumdirection = aenumdirection[l];
|
|
|
|
|
|
|
|
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
|
2018-07-18 20:55:52 +02:00
|
|
|
++j;
|
|
|
|
if (j >= i) {
|
2018-09-01 00:56:57 +02:00
|
|
|
boolean flag = false;
|
2018-07-18 20:55:52 +02:00
|
|
|
--
|
2019-01-01 04:15:55 +01:00
|
|
|
2.20.1
|
2018-07-18 20:55:52 +02:00
|
|
|
|