2019-07-20 12:01:24 +08:00
|
|
|
From 7e1d6381c1a8e2ab67ec801f5fbc8fc7ed1ba227 Mon Sep 17 00:00:00 2001
|
2018-07-19 02:55:52 +08: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-07-20 12:01:24 +08:00
|
|
|
index 39c3bbc9cf..881dfb1235 100644
|
2018-07-19 02:55:52 +08:00
|
|
|
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
2019-04-29 01:59:47 +08:00
|
|
|
@@ -26,7 +26,8 @@ public class BlockIceFrost extends BlockIce {
|
2019-01-01 11:15:55 +08:00
|
|
|
EnumDirection enumdirection = aenumdirection[j];
|
|
|
|
|
2019-03-20 09:46:00 +08:00
|
|
|
blockposition_pooledblockposition.g(blockposition).c(enumdirection);
|
|
|
|
- IBlockData iblockdata1 = world.getType(blockposition_pooledblockposition);
|
|
|
|
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition_pooledblockposition); // Paper - don't load chunks
|
2018-09-01 06:56:57 +08:00
|
|
|
+ if (iblockdata1 == null) continue; // Paper
|
2019-01-01 11:15:55 +08:00
|
|
|
|
2019-04-29 01:59:47 +08:00
|
|
|
if (iblockdata1.getBlock() == this && !this.e(iblockdata1, world, blockposition_pooledblockposition)) {
|
2019-03-20 09:46:00 +08:00
|
|
|
world.getBlockTickList().a(blockposition_pooledblockposition, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
2019-04-29 01:59:47 +08:00
|
|
|
@@ -89,7 +90,7 @@ public class BlockIceFrost extends BlockIce {
|
2019-01-01 11:15:55 +08:00
|
|
|
EnumDirection enumdirection = aenumdirection[l];
|
|
|
|
|
2019-03-20 09:46:00 +08:00
|
|
|
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
|
2018-07-19 02:55:52 +08:00
|
|
|
++j;
|
|
|
|
if (j >= i) {
|
2018-09-01 06:56:57 +08:00
|
|
|
boolean flag = false;
|
2018-07-19 02:55:52 +08:00
|
|
|
--
|
2019-06-26 03:18:50 +08:00
|
|
|
2.22.0
|
2018-07-19 02:55:52 +08:00
|
|
|
|