mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-03 13:36:44 +01:00
70ce6ce831
This makes it easier for downstream projects (forks) to replace the version fetching system with their own. It is as simple as implementing an interface and overriding the default implementation of org.bukkit.UnsafeValues#getVersionFetcher() It also makes it easier for us to organize things like the version history feature. Lastly I have updated the paper implementation to check against the site API rather than against jenkins.
32 lines
1.9 KiB
Diff
32 lines
1.9 KiB
Diff
From b1f2876582b31afb35a34d8bac104d854c3afa1b 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 39c3bbc9c..881dfb123 100644
|
|
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
|
|
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
|
@@ -26,7 +26,8 @@ public class BlockIceFrost extends BlockIce {
|
|
EnumDirection enumdirection = aenumdirection[j];
|
|
|
|
blockposition_pooledblockposition.g(blockposition).c(enumdirection);
|
|
- IBlockData iblockdata1 = world.getType(blockposition_pooledblockposition);
|
|
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition_pooledblockposition); // Paper - don't load chunks
|
|
+ if (iblockdata1 == null) continue; // Paper
|
|
|
|
if (iblockdata1.getBlock() == this && !this.e(iblockdata1, world, blockposition_pooledblockposition)) {
|
|
world.getBlockTickList().a(blockposition_pooledblockposition, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
|
@@ -89,7 +90,7 @@ public class BlockIceFrost extends BlockIce {
|
|
EnumDirection enumdirection = aenumdirection[l];
|
|
|
|
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
|
|
++j;
|
|
if (j >= i) {
|
|
boolean flag = false;
|
|
--
|
|
2.21.0
|
|
|