More more more more more more more more work

This commit is contained in:
Nassim Jahnke 2023-06-07 23:14:56 +02:00
parent dc0aa6ed0a
commit 1450690de9
40 changed files with 76 additions and 91 deletions

View file

@ -2796,14 +2796,6 @@ diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntit
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
} else {
SignBlockEntity.LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString());
+ if (player.distanceToSqr(this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ()) < 32 * 32) // Paper
((ServerPlayer) player).connection.send(this.getUpdatePacket()); // CraftBukkit
}
}
@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
// CraftBukkit start

View file

@ -50,9 +50,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
import org.slf4j.Logger;
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
private final IntBuffer timestamps;
@VisibleForTesting
protected final RegionBitmap usedSectors;
public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper
+ public final Path regionFile; // Paper
public RegionFile(Path file, Path directory, boolean dsync) throws IOException {
@ -229,7 +229,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
public CompoundTag read(ChunkPos pos) throws IOException {
// CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
@@ -0,0 +0,0 @@ public class RegionFileStorage implements AutoCloseable {
try { // Paper
// CraftBukkit end
DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos);
+ // Paper start

View file

@ -26,7 +26,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- ServerChunkCache chunkproviderserver = worldserver.getChunkSource();
+ //ChunkProviderServer chunkproviderserver = worldserver.getChunkProvider(); // Paper - move up
chunkproviderserver.getLightEngine().setTaskPerBatch(500);
this.nextTickTime = Util.getMillis();
- // CraftBukkit start
- if (worldserver.getWorld().getKeepSpawnInMemory()) {
@ -60,21 +59,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// CraftBukkit end
- worldloadlistener.stop();
+ if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper
chunkproviderserver.getLightEngine().setTaskPerBatch(5);
// CraftBukkit start
// this.updateMobSpawningFlags();
worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals());
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -0,0 +0,0 @@ import net.minecraft.network.protocol.game.ClientboundSoundEntityPacket;
import net.minecraft.network.protocol.game.ClientboundSoundPacket;
import net.minecraft.network.protocol.game.DebugPackets;
import net.minecraft.resources.ResourceKey;
+import io.papermc.paper.util.MCUtil;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.ServerScoreboard;
import net.minecraft.server.level.progress.ChunkProgressListener;
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
return ((MapIndex) this.getServer().overworld().getDataStorage().computeIfAbsent(MapIndex::load, MapIndex::new, "idcounts")).getFreeAuxValueForMap();
}

View file

@ -32,8 +32,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.shoot((double) f5, (double) f6, (double) f7, speed, divergence);
Vec3 vec3d = shooter.getDeltaMovement();
- this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.isOnGround() ? 0.0D : vec3d.y, vec3d.z));
+ if (!shooter.level.paperConfig().misc.disableRelativeProjectileVelocity) this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.isOnGround() ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity
- this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z));
+ if (!shooter.level.paperConfig().misc.disableRelativeProjectileVelocity) this.setDeltaMovement(this.getDeltaMovement().add(vec3d.x, shooter.onGround() ? 0.0D : vec3d.y, vec3d.z)); // Paper - allow disabling relative velocity
}
// CraftBukkit start - call projectile hit event

View file

@ -0,0 +1,18 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Sat, 11 Sep 2021 11:56:51 +0200
Subject: [PATCH] Dont send unnecessary sign update
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -0,0 +0,0 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
} else {
SignBlockEntity.LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString());
+ if (player.distanceToSqr(this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ()) < 32 * 32) // Paper
((ServerPlayer) player).connection.send(this.getUpdatePacket()); // CraftBukkit
}
}

View file

@ -68,7 +68,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}));
// CraftBukkit end
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
throw new UnsupportedOperationException(); // Paper - rewrite chunk system
});
}
+ // Paper start
@ -115,5 +115,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ // Paper end
public CompletableFuture<Either<LevelChunk, ChunkHolder.ChunkLoadingFailure>> prepareTickingChunk(ChunkHolder holder) {
throw new UnsupportedOperationException(); // Paper - rewrite chunk system
}
CompletableFuture<Either<List<ChunkAccess>, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkRangeFuture(holder, 1, (i) -> {
return ChunkStatus.FULL;

View file

@ -182,7 +182,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ public BlockPos movingTarget = null; public BlockPos getMovingTarget() { return movingTarget; } // Paper
public float getWalkTargetValue(BlockPos pos) {
return this.getWalkTargetValue(pos, this.level);
return this.getWalkTargetValue(pos, this.level());
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
@ -245,7 +245,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
this.mob = mob;
@@ -0,0 +0,0 @@ public abstract class MoveToBlockGoal extends Goal {
mutableBlockPos.setWithOffset(blockPos, m, k - 1, n);
if (this.mob.isWithinRestriction(mutableBlockPos) && this.isValidTarget(this.mob.level, mutableBlockPos)) {
if (this.mob.isWithinRestriction(mutableBlockPos) && this.isValidTarget(this.mob.level(), mutableBlockPos)) {
this.blockPos = mutableBlockPos;
+ setTargetPosition(mutableBlockPos.immutable()); // Paper
return true;
@ -259,19 +259,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@Override
public void inactiveTick() {
// SPIGOT-3874, SPIGOT-3894, SPIGOT-3846, SPIGOT-5286 :(
- if (level.spigotConfig.tickInactiveVillagers && this.isEffectiveAi()) {
- if (this.level().spigotConfig.tickInactiveVillagers && this.isEffectiveAi()) {
- this.customServerAiStep();
+ // Paper start
+ if (this.getUnhappyCounter() > 0) {
+ this.setUnhappyCounter(this.getUnhappyCounter() - 1);
+ }
}
+ if (this.isEffectiveAi()) {
+ if (level.spigotConfig.tickInactiveVillagers) {
+ this.customServerAiStep();
+ } else {
+ this.mobTick(true);
+ }
}
+ }
+ maybeDecayGossip();
+ // Paper end
+
@ -280,13 +280,17 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
// Spigot End
@Override
- protected void customServerAiStep() {
+ protected void customServerAiStep() { mobTick(false); }
+ protected void mobTick(boolean inactive) {
this.level.getProfiler().push("villagerBrain");
- this.getBrain().tick((ServerLevel) this.level, this);
+ if (!inactive) this.getBrain().tick((ServerLevel) this.level, this); // Paper
this.level.getProfiler().pop();
+ @Deprecated // Paper
protected void customServerAiStep() {
+ // Paper start
+ this.customServerAiStep(false);
+ }
+ protected void customServerAiStep(final boolean inactive) {
+ // Paper end
this.level().getProfiler().push("villagerBrain");
- this.getBrain().tick((ServerLevel) this.level(), this);
+ if (!inactive) this.getBrain().tick((ServerLevel) this.level(), this); // Paper
this.level().getProfiler().pop();
if (this.assignProfessionWhenSpawned) {
this.assignProfessionWhenSpawned = false;
@@ -0,0 +0,0 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@ -295,7 +299,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- if (!this.isNoAi() && this.random.nextInt(100) == 0) {
+ if (!inactive && !this.isNoAi() && this.random.nextInt(100) == 0) { // Paper
Raid raid = ((ServerLevel) this.level).getRaidAt(this.blockPosition());
Raid raid = ((ServerLevel) this.level()).getRaidAt(this.blockPosition());
if (raid != null && raid.isActive() && !raid.isOver()) {
@@ -0,0 +0,0 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@ -321,11 +325,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
@@ -0,0 +0,0 @@ public class MinecartHopper extends AbstractMinecartContainer implements Hopper
public boolean suckInItems() {
if (HopperBlockEntity.suckInItems(this.level, this)) {
if (HopperBlockEntity.suckInItems(this.level(), this)) {
+ this.immunize(); // Paper
return true;
} else {
for(ItemEntity itemEntity : this.level.getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(0.25D, 0.0D, 0.25D), EntitySelector.ENTITY_STILL_ALIVE)) {
for(ItemEntity itemEntity : this.level().getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate(0.25D, 0.0D, 0.25D), EntitySelector.ENTITY_STILL_ALIVE)) {
if (HopperBlockEntity.addItem(this, itemEntity)) {
+ this.immunize(); // Paper
return true;
@ -560,8 +564,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ ActivationType.VILLAGER.boundingBox = player.getBoundingBox().inflate( villagerActivationRange, worldHeight, villagerActivationRange );
+ // Paper end
// Paper start
java.util.List<Entity> entities = world.getEntities((Entity)null, maxBB, null);
world.getEntities().get(maxBB, ActivationRange::activateEntity);
}
@@ -0,0 +0,0 @@ public class ActivationRange
* @param entity
* @return
@ -598,8 +602,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
if ( !( entity instanceof AbstractArrow ) )
{
- if ( !entity.isOnGround() || !entity.passengers.isEmpty() || entity.isPassenger() )
+ if ( (!entity.isOnGround() && !(entity instanceof FlyingMob)) ) // Paper - remove passengers logic
- if ( !entity.onGround() || !entity.passengers.isEmpty() || entity.isPassenger() )
+ if ( (!entity.onGround() && !(entity instanceof FlyingMob)) ) // Paper - remove passengers logic
{
- return true;
+ return 10; // Paper
@ -624,7 +628,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
{
- return true;
+ return 20; // Paper
+ }
}
- if ( entity instanceof Villager && ( (Villager) entity ).canBreed() )
+ // Paper start
+ if (entity instanceof Bee) {
+ Bee bee = (Bee)entity;
@ -652,8 +657,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ return config.villagersWorkImmunityFor;
+ }
+ }
}
- if ( entity instanceof Villager && ( (Villager) entity ).canBreed() )
+ }
+ if ( entity instanceof Llama && ( (Llama) entity ).inCaravan() )
{
- return true;
@ -681,11 +685,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper start
+ if (entity instanceof Mob && ((Mob) entity).targetSelector.hasTasks() ) {
+ return 0;
}
+ }
+ if (entity instanceof Pillager) {
+ Pillager pillager = (Pillager) entity;
+ // TODO:?
+ }
}
+ // Paper end
}
// SPIGOT-6644: Otherwise the target refresh tick will be missed

View file

@ -34,7 +34,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ player.spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT; // set Player SpawnReason to DEFAULT on first login
+ }
+ // Paper end
player.setLevel(worldserver1);
player.setServerLevel(worldserver1);
String s1 = "local";
@@ -0,0 +0,0 @@ public abstract class PlayerList {

View file

@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -0,0 +0,0 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
// Paper end
}
private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
- return this.read(chunkPos).thenApplyAsync((optional) -> {
@ -97,7 +97,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
public final java.util.concurrent.locks.ReentrantLock fileLock = new java.util.concurrent.locks.ReentrantLock(true); // Paper
protected final RegionBitmap usedSectors;
public final Path regionFile; // Paper
+ // Paper start - Cache chunk status
@ -135,10 +135,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
private static int getOffsetIndex(ChunkPos pos) {
return pos.getRegionLocalX() + pos.getRegionLocalZ() * 32;
}
@@ -0,0 +0,0 @@ public class RegionFile implements AutoCloseable {
synchronized (this) {
try {
// Paper end
public void close() throws IOException {
+ this.closed = true; // Paper
try {
this.padToFullSector();

View file

@ -22,8 +22,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
}
- if (!this.onGround || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) {
+ if (!this.onGround || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) { // Paper - Diff on change
- if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) {
+ if (!this.onGround() || this.getDeltaMovement().horizontalDistanceSqr() > 9.999999747378752E-6D || (this.tickCount + this.getId()) % 4 == 0) { // Paper - Diff on change
this.move(MoverType.SELF, this.getDeltaMovement());
float f1 = 0.98F;

View file

@ -118,7 +118,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
--- a/src/main/java/net/minecraft/server/Bootstrap.java
+++ b/src/main/java/net/minecraft/server/Bootstrap.java
@@ -0,0 +0,0 @@ public class Bootstrap {
CauldronInteraction.bootStrap();
BuiltInRegistries.bootStrap();
// Paper start
BuiltInRegistries.bootStrap(() -> {
+ net.minecraft.core.Registry.register(net.minecraft.core.registries.BuiltInRegistries.MATERIAL_CONDITION, new net.minecraft.resources.ResourceLocation("paper", "bedrock_condition_source"), net.minecraft.data.worldgen.SurfaceRuleData.PaperBedrockConditionSource.CODEC.codec());

View file

@ -11,7 +11,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -0,0 +0,0 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
// Paper end - rewrite chunk system
// Paper end
+ // Paper start - optimise getPlayerByUUID
+ @Nullable
@ -23,5 +23,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
// Add env and gen to constructor, IWorldDataServer -> WorldDataServer
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error

View file

@ -26,5 +26,5 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
+ // Paper end
// CraftBukkit end
return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && !io.papermc.paper.util.TickThread.isTickThread() ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, LevelChunk.EntityCreationType.IMMEDIATE)); // Paper - rewrite chunk system
return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && Thread.currentThread() != this.thread ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, LevelChunk.EntityCreationType.IMMEDIATE));
}

View file

@ -12,7 +12,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
} else if (this.isTooFarAway(this.hivePos)) {
return false;
} else {
+ if (level.getChunkIfLoadedImmediately(hivePos.getX() >> 4, hivePos.getZ() >> 4) == null) return true; // Paper - just assume the hive is still there, no need to load the chunk(s)
BlockEntity tileentity = this.level.getBlockEntity(this.hivePos);
+ if (this.level().getChunkIfLoadedImmediately(this.hivePos.getX() >> 4, this.hivePos.getZ() >> 4) == null) return true; // Paper - just assume the hive is still there, no need to load the chunk(s)
BlockEntity tileentity = this.level().getBlockEntity(this.hivePos);
return tileentity != null && tileentity.getType() == BlockEntityType.BEEHIVE;

View file

@ -23,12 +23,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ if (!itemstack.isEmpty() && !this.isUsingItem() || forceUpdate) { // Paper use override flag
this.useItem = itemstack;
this.useItemRemaining = itemstack.getUseDuration();
if (!this.level.isClientSide) {
if (!this.level().isClientSide) {
@@ -0,0 +0,0 @@ public abstract class LivingEntity extends Entity implements Attackable {
this.releaseUsingItem();
} else {
if (!this.useItem.isEmpty() && this.isUsingItem()) {
+ this.startUsingItem(this.getUsedItemHand(), true); // Paper
+ this.startUsingItem(this.getUsedItemHand(), true); // Paper
this.triggerItemUseEffects(this.useItem, 16);
// CraftBukkit start - fire PlayerItemConsumeEvent
ItemStack itemstack;
@ -36,10 +36,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
}
this.stopUsingItem();
- // Paper start - if the replacement is anything but the default, update the client inventory
- if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
+ // Paper start
+ if (this instanceof ServerPlayer) {
((ServerPlayer) this).getBukkitEntity().updateInventory();
}
// Paper end
- // Paper start - if the replacement is anything but the default, update the client inventory
- if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
+ // Paper start
+ if (this instanceof ServerPlayer) {
((ServerPlayer) this).getBukkitEntity().updateInventory();
}
// Paper end

View file

@ -1,18 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Sat, 11 Sep 2021 11:56:51 +0200
Subject: [PATCH] Dont send unnecessary sign update
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
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 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
if (!tileentitysign.isEditable() || !this.player.getUUID().equals(tileentitysign.getPlayerWhoMayEdit())) {
ServerGamePacketListenerImpl.LOGGER.warn("Player {} just tried to change non-editable sign", this.player.getName().getString());
+ if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32) // Paper
this.send(tileentity.getUpdatePacket()); // CraftBukkit
return;
}