Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 20:40:07 +01:00
57dd397155
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: b999860d SPIGOT-2304: Add LootGenerateEvent CraftBukkit Changes:77fd87e4
SPIGOT-2304: Implement LootGenerateEventa1a705ee
SPIGOT-5566: Doused campfires & fires should call EntityChangeBlockEvent41712edd
SPIGOT-5707: PersistentDataHolder not Persistent on API dropped Item
37 Zeilen
1.8 KiB
Diff
37 Zeilen
1.8 KiB
Diff
From 9b68068d44705a5e711840f1899ce2ae4007687a Mon Sep 17 00:00:00 2001
|
|
From: Aikar <aikar@aikar.co>
|
|
Date: Thu, 3 Nov 2016 20:28:12 -0400
|
|
Subject: [PATCH] Don't load Chunks from Hoppers and other things
|
|
|
|
Hoppers call this to I guess "get the primary side" of a double sided chest.
|
|
|
|
If the double sided chest crosses chunk lines, it causes the chunk to load.
|
|
This will end up causing sync chunk loads, which will unload with Chunk GC,
|
|
only to be reloaded again the next tick.
|
|
|
|
This of course is undesirable, so just return the loaded side as "primary"
|
|
and treat it as a single chest if the other sides are unloaded
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/DoubleBlockFinder.java b/src/main/java/net/minecraft/server/DoubleBlockFinder.java
|
|
index 3cb6e60895..7a16a3e0e2 100644
|
|
--- a/src/main/java/net/minecraft/server/DoubleBlockFinder.java
|
|
+++ b/src/main/java/net/minecraft/server/DoubleBlockFinder.java
|
|
@@ -21,8 +21,12 @@ public class DoubleBlockFinder {
|
|
return new DoubleBlockFinder.Result.Single<>(s0);
|
|
} else {
|
|
BlockPosition blockposition1 = blockposition.shift((EnumDirection) function1.apply(iblockdata));
|
|
- IBlockData iblockdata1 = generatoraccess.getType(blockposition1);
|
|
-
|
|
+ // Paper start - don't load chunks if the other side of the chest is in unloaded chunk
|
|
+ IBlockData iblockdata1 = generatoraccess.getTypeIfLoaded(blockposition1);
|
|
+ if (iblockdata1 == null) {
|
|
+ return new DoubleBlockFinder.Result.Single<>(s0);
|
|
+ }
|
|
+ // Paper end
|
|
if (iblockdata1.getBlock() == iblockdata.getBlock()) {
|
|
DoubleBlockFinder.BlockType doubleblockfinder_blocktype1 = (DoubleBlockFinder.BlockType) function.apply(iblockdata1);
|
|
|
|
--
|
|
2.26.2
|
|
|