2018-12-17 13:18:06 +08:00
|
|
|
From f6be9923bfdf606012746f71fbb32ffb06ddc952 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
|
2018-12-17 13:18:06 +08:00
|
|
|
index 598621fbb..5c5b3a531 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
|
2018-09-01 06:56:57 +08:00
|
|
|
@@ -16,7 +16,8 @@ public class BlockIceFrost extends BlockIce {
|
|
|
|
try (BlockPosition.b blockposition$b = BlockPosition.b.r()) {
|
|
|
|
for(EnumDirection enumdirection : EnumDirection.values()) {
|
2018-12-17 13:18:06 +08:00
|
|
|
blockposition$b.g(blockposition).c(enumdirection);
|
2018-09-01 06:56:57 +08:00
|
|
|
- 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)) {
|
2018-12-17 13:18:06 +08:00
|
|
|
world.getBlockTickList().a(blockposition$b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
2018-09-01 06:56:57 +08:00
|
|
|
}
|
|
|
|
@@ -53,7 +54,7 @@ public class BlockIceFrost extends BlockIce {
|
|
|
|
try (BlockPosition.b blockposition$b = BlockPosition.b.r()) {
|
|
|
|
for(EnumDirection enumdirection : EnumDirection.values()) {
|
2018-12-17 13:18:06 +08:00
|
|
|
blockposition$b.g(blockposition).c(enumdirection);
|
2018-09-01 06:56:57 +08:00
|
|
|
- if (iblockaccess.getType(blockposition$b).getBlock() == this) {
|
|
|
|
+ if (((World) iblockaccess).getBlockIfLoaded(blockposition$b) == 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
|
|
|
--
|
2018-12-15 09:17:27 +08:00
|
|
|
2.20.0
|
2018-07-19 02:55:52 +08:00
|
|
|
|