From a072a15667e3d3ba014a4a121787f800bb7bd13b Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Wed, 13 Apr 2022 09:15:28 +0100 Subject: [PATCH] [CI-SKIP] Remove unused import from last patch --- .../Prevent-tile-entity-copies-loading-chunks.patch | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/patches/server/Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/Prevent-tile-entity-copies-loading-chunks.patch index 910ced2372..3a94f795bc 100644 --- a/patches/server/Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/Prevent-tile-entity-copies-loading-chunks.patch @@ -8,19 +8,11 @@ diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListener index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -0,0 +0,0 @@ - package net.minecraft.server.network; - -+import com.destroystokyo.paper.event.player.IllegalPacketEvent; - import com.google.common.collect.Lists; - import com.google.common.primitives.Floats; - import com.mojang.brigadier.ParseResults; @@ -0,0 +0,0 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser if (!itemstack.isEmpty() && nbttagcompound != null && nbttagcompound.contains("x") && nbttagcompound.contains("y") && nbttagcompound.contains("z") && this.player.getBukkitEntity().hasPermission("minecraft.nbt.copy")) { // Spigot BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); - BlockEntity tileentity = this.player.level.getBlockEntity(blockposition); -- + // Paper start + BlockEntity tileentity = null; + if (this.player.getLevel().isLoadedAndInBounds(blockposition)) { @@ -32,6 +24,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + nbttagcompound.remove("z"); + } + // Paper end + if (tileentity != null) { tileentity.saveToItem(itemstack); - }