Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
3c0d6aaed9
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: 0c7aedbc SPIGOT-7554, PR-954: Add DecoratedPotInventory CraftBukkit Changes: 53ebb05e3 SPIGOT-7554, PR-1323: Add DecoratedPotInventory 33a2d8773 Ensure that PlayerMoveEvent is always fired where applicable 7df18510f SPIGOT-7555: Don't cast ItemFlags to byte 19aec59ea Use provided case for non-existent OfflinePlayers Spigot Changes: e7ce55a3 Remove obsolete PlayerMoveEvent improvements 3e5e22c0 Remove obsolete lowercasing of non existent OfflinePlayer names
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 74cc0b0044b8ad5fe9afc24b44e5e215ca8f8b4b..406432a6336543b9b537964bdfafd17bf9471859 100644
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
@@ -3194,7 +3194,12 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
|
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);
|