Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
275173e538
Upstream has released updates that appear 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: 0c5d8709 SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends 255c4fdb SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot CraftBukkit Changes: b6b514b7e SPIGOT-7400: Downgrade maven-resolver due to issues resolving certain depends fcff84de9 SPIGOT-7399: Revert null check in CraftMetaItem#safelyAdd 44a4b5649 SPIGOT-7380: Add PlayerInteractEvent#getClickedPosition and ChiseledBookshelf#getSlot 676969d01 SPIGOT-7389: Handle setting null items in ChiseledBookshelf Inventory
25 Zeilen
1.5 KiB
Diff
25 Zeilen
1.5 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shane Freeder <theboyetronic@gmail.com>
|
|
Date: Wed, 13 Apr 2022 08:25:42 +0100
|
|
Subject: [PATCH] Prevent tile entity copies loading chunks
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
index db79b51cbe94c8c584fcc38298638d2cf196f0ac..308d954fccded0a396fabac993762dd32c24f031 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -3311,7 +3311,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
|
BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound);
|
|
|
|
if (this.player.level().isLoaded(blockposition)) {
|
|
- BlockEntity tileentity = this.player.level().getBlockEntity(blockposition);
|
|
+ // Paper start
|
|
+ BlockEntity tileentity = null;
|
|
+ if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.serverLevel().isLoadedAndInBounds(blockposition)) {
|
|
+ tileentity = this.player.level().getBlockEntity(blockposition);
|
|
+ }
|
|
+ // Paper end
|
|
|
|
if (tileentity != null) {
|
|
tileentity.saveToItem(itemstack);
|