Make max interaction range configurable (#11164)
The server validates incoming interaction packets by ensuring the player sending them is inside their interaction range. For this, the server adds a magic value, by default 1.0, to the original interaction range to account for latency issues. This value however may be too low in high latency environments. The patch exposes a new configuration option to configure said value.
This commit is contained in:
parent
e1462a9253
commit
645a677122
5 changed files with 42 additions and 12 deletions
|
@ -487,15 +487,16 @@ index 0000000000000000000000000000000000000000..d9502ba028a96f9cc846f9ed428bd806
|
|||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e8694dbb348e23efbe00df9b333b9dc012367aa2
|
||||
index 0000000000000000000000000000000000000000..e727414d784debd276dcc42aabf588d6fcbccc91
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/GlobalConfiguration.java
|
||||
@@ -0,0 +1,320 @@
|
||||
@@ -0,0 +1,323 @@
|
||||
+package io.papermc.paper.configuration;
|
||||
+
|
||||
+import co.aikar.timings.MinecraftTimings;
|
||||
+import com.mojang.logging.LogUtils;
|
||||
+import io.papermc.paper.configuration.constraint.Constraints;
|
||||
+import io.papermc.paper.configuration.type.number.DoubleOr;
|
||||
+import io.papermc.paper.configuration.type.number.IntOr;
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||
|
@ -800,6 +801,8 @@ index 0000000000000000000000000000000000000000..e8694dbb348e23efbe00df9b333b9dc0
|
|||
+ public boolean useDimensionTypeForCustomSpawners = false;
|
||||
+ public boolean strictAdvancementDimensionCheck = false;
|
||||
+ public IntOr.Default compressionLevel = IntOr.Default.USE_DEFAULT;
|
||||
+ @Comment("Defines the leniency distance added on the server to the interaction range of a player when validating interact packets.")
|
||||
+ public DoubleOr.Default clientInteractionLeniencyDistance = DoubleOr.Default.USE_DEFAULT;
|
||||
+ }
|
||||
+
|
||||
+ public BlockUpdates blockUpdates;
|
||||
|
@ -851,10 +854,10 @@ index 0000000000000000000000000000000000000000..69add4a7f1147015806bc9b63a8340d1
|
|||
+}
|
||||
diff --git a/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..83a726bcf8b7dce73a361b0d79dbd63a0afc7a12
|
||||
index 0000000000000000000000000000000000000000..783eac6e458c6f1a0584301fb84a2fe341868f34
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/io/papermc/paper/configuration/PaperConfigurations.java
|
||||
@@ -0,0 +1,465 @@
|
||||
@@ -0,0 +1,466 @@
|
||||
+package io.papermc.paper.configuration;
|
||||
+
|
||||
+import com.google.common.base.Suppliers;
|
||||
|
@ -1050,6 +1053,7 @@ index 0000000000000000000000000000000000000000..83a726bcf8b7dce73a361b0d79dbd63a
|
|||
+ .serializers(builder -> builder
|
||||
+ .register(new PacketClassSerializer())
|
||||
+ .register(IntOr.Default.SERIALIZER)
|
||||
+ .register(DoubleOr.Default.SERIALIZER)
|
||||
+ );
|
||||
+ }
|
||||
+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue