2021-06-11 12:02:28 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Anton Lindroth <ntoonio@gmail.com>
|
|
|
|
Date: Wed, 15 Apr 2020 01:54:02 +0200
|
|
|
|
Subject: [PATCH] Allow using signs inside spawn protection
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-12-10 14:24:07 +00:00
|
|
|
index 83d5bbf0a819d6a75d148de5a7f3679e3faad9ec..f372caad76d5f59f37d073bb245fca3a037c2bef 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
|
|
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
2021-12-01 01:31:13 +00:00
|
|
|
@@ -789,4 +789,9 @@ public class PaperWorldConfig {
|
2021-11-29 11:55:13 +00:00
|
|
|
delayChunkUnloadsBy *= 20;
|
|
|
|
}
|
2021-06-11 12:02:28 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean allowUsingSignsInsideSpawnProtection = false;
|
|
|
|
+ private void allowUsingSignsInsideSpawnProtection() {
|
|
|
|
+ allowUsingSignsInsideSpawnProtection = getBoolean("allow-using-signs-inside-spawn-protection", allowUsingSignsInsideSpawnProtection);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2022-01-01 03:05:42 +00:00
|
|
|
index b6b22a3fdb73fc2b3e2eed12216ae199d2f14022..1bb4ef2daea3bc919059ffdfeb17f7db157e0619 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
2022-01-01 03:05:42 +00:00
|
|
|
@@ -1733,7 +1733,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
2021-06-15 02:59:31 +00:00
|
|
|
int i = this.player.level.getMaxBuildHeight();
|
2021-06-11 12:02:28 +00:00
|
|
|
|
2021-06-15 02:59:31 +00:00
|
|
|
if (blockposition.getY() < i) {
|
2021-11-24 20:15:19 +00:00
|
|
|
- if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && worldserver.mayInteract(this.player, blockposition)) {
|
|
|
|
+ if (this.awaitingPositionFromClient == null && this.player.distanceToSqr((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D) < 64.0D && (worldserver.mayInteract(this.player, blockposition) || (worldserver.paperConfig.allowUsingSignsInsideSpawnProtection && worldserver.getBlockState(blockposition).getBlock() instanceof net.minecraft.world.level.block.SignBlock))) { // Paper
|
2021-06-11 12:02:28 +00:00
|
|
|
// CraftBukkit start - Check if we can actually do something over this large a distance
|
|
|
|
// Paper - move check up
|
|
|
|
this.player.stopUsingItem(); // SPIGOT-4706
|