Paper/Spigot-Server-Patches/0271-Prevent-Frosted-Ice-from-loading-holding-chunks.patch
Zach Brown 6f2009754d
Stop explicitly blocking Vanilla Method Profiler
At the time this was re-added, there was concern around how the JIT
would handle the system property that enabled it.

This shouldn't be a problem, and as such we no longer need to block
access to it.

The Vanilla Method Profiler will not provide much to most users however
there is no harm in providing it as an option. For most users, the
recommended and supported method for determining performance issues with
Paper will continue to be Timings.
2018-03-31 14:55:42 -04:00

35 lines
1.7 KiB
Diff

From 1fd52dc633eb87295f7c5f9d60fb8434ac1ef08b 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 a8dbbf20..87f40bfc 100644
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
@@ -50,7 +50,9 @@ public class BlockIceFrost extends BlockIce {
for (int k = 0; k < j; ++k) {
EnumDirection enumdirection = aenumdirection[k];
- if (world.getType(blockposition.shift(enumdirection)).getBlock() == this) {
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition.shift(enumdirection)); // Paper - don't load chunks
+ if (iblockdata1 == null) continue; // Paper
+ if (iblockdata1.getBlock() == this) { // Paper
++i;
if (i >= 4) {
return i;
@@ -76,7 +78,8 @@ public class BlockIceFrost extends BlockIce {
for (int k = 0; k < j; ++k) {
EnumDirection enumdirection = aenumdirection[k];
BlockPosition blockposition1 = blockposition.shift(enumdirection);
- IBlockData iblockdata1 = world.getType(blockposition1);
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition1); // Paper - don't load chunks
+ if (iblockdata1 == null) continue; // Paper
if (iblockdata1.getBlock() == this) {
this.a(world, blockposition1, iblockdata1, random, false);
--
2.14.3