Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-14 20:10:05 +01:00
Make map send speed configurable.
Dieser Commit ist enthalten in:
Ursprung
5e025e3b9f
Commit
5bfd44a991
@ -1,15 +1,17 @@
|
||||
From 4b446ef0907c2009b2115a437d7542ce5cc3843d Mon Sep 17 00:00:00 2001
|
||||
From e5df30285b9c210b6734435a8ff9286edeb009bf Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Sat, 2 Feb 2013 19:40:53 +1100
|
||||
Subject: [PATCH] Send maps a lot less often to combat the lag they cause.
|
||||
TODO, make it configurable.
|
||||
|
||||
---
|
||||
src/main/java/net/minecraft/server/EntityTrackerEntry.java | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
src/main/java/org/bukkit/craftbukkit/CraftServer.java | 1 +
|
||||
src/main/java/org/bukkit/craftbukkit/Spigot.java | 1 +
|
||||
src/main/resources/configurations/bukkit.yml | 1 +
|
||||
4 files changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index a026c4c..f42cfdf 100644
|
||||
index a026c4c..27a548f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -73,7 +73,7 @@ public class EntityTrackerEntry {
|
||||
@ -17,10 +19,46 @@ index a026c4c..f42cfdf 100644
|
||||
}
|
||||
|
||||
- if (this.tracker instanceof EntityItemFrame && this.m % 10 == 0) {
|
||||
+ if (this.tracker instanceof EntityItemFrame && this.m % 10000 == 0) {
|
||||
+ if (this.tracker instanceof EntityItemFrame && this.m % tracker.world.getServer().mapSendInterval == 0) {
|
||||
EntityItemFrame i4 = (EntityItemFrame) this.tracker;
|
||||
ItemStack i5 = i4.i();
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ef52f32..16d397e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -178,6 +178,7 @@ public final class CraftServer implements Server {
|
||||
public boolean ipFilter = false;
|
||||
public boolean commandComplete = true;
|
||||
public List<String> spamGuardExclusions;
|
||||
+ public int mapSendInterval = 10000;
|
||||
// Spigot end
|
||||
|
||||
static {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
index ccb1cc7..0fe463a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
@@ -22,6 +22,7 @@ public class Spigot {
|
||||
server.ipFilter = configuration.getBoolean("settings.filter-unsafe-ips", false);
|
||||
server.commandComplete = configuration.getBoolean("settings.command-complete", true);
|
||||
server.spamGuardExclusions = configuration.getStringList("settings.spam-exclusions");
|
||||
+ server.mapSendInterval = configuration.getInt("settings.map-send-interval", server.mapSendInterval);
|
||||
|
||||
server.orebfuscatorEnabled = configuration.getBoolean("orebfuscator.enable", false);
|
||||
server.orebfuscatorUpdateRadius = configuration.getInt("orebfuscator.update-radius", 2);
|
||||
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
|
||||
index 6931712..474ac54 100644
|
||||
--- a/src/main/resources/configurations/bukkit.yml
|
||||
+++ b/src/main/resources/configurations/bukkit.yml
|
||||
@@ -34,6 +34,7 @@ settings:
|
||||
command-complete: true
|
||||
spam-exclusions:
|
||||
- /skill
|
||||
+ map-send-interval: 10000
|
||||
world-settings:
|
||||
default:
|
||||
growth-chunks-per-tick: 650
|
||||
--
|
||||
1.8.1-rc2
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fee453c7c632f95685e96ff767e28d6f2b9efae9 Mon Sep 17 00:00:00 2001
|
||||
From 32e3f230b9ed3247dad944db0174da82e78b9522 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
||||
Subject: [PATCH] Entity Activation Range# This feature gives 3 new
|
||||
@ -137,7 +137,7 @@ index 21bd64a..a083ae4 100644
|
||||
|
||||
public Block getBlockAt(int x, int y, int z) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
index 83988c3..be77320 100644
|
||||
index b422bcd..94536c2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
@@ -1,7 +1,9 @@
|
||||
@ -150,7 +150,7 @@ index 83988c3..be77320 100644
|
||||
|
||||
public class Spigot {
|
||||
public static void initialize(CraftServer server, SimpleCommandMap commandMap, YamlConfiguration configuration) {
|
||||
@@ -32,5 +34,151 @@ public class Spigot {
|
||||
@@ -33,5 +35,151 @@ public class Spigot {
|
||||
server.getLogger().severe("[Spigot] You should not disable chunk-gc. Resetting period-in-ticks to 600 ticks.");
|
||||
server.chunkGCPeriod = 600;
|
||||
}
|
||||
@ -322,10 +322,10 @@ index bb0c191..6a4a05e 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/resources/configurations/bukkit.yml b/src/main/resources/configurations/bukkit.yml
|
||||
index 6931712..06ac168 100644
|
||||
index 474ac54..f36aab3 100644
|
||||
--- a/src/main/resources/configurations/bukkit.yml
|
||||
+++ b/src/main/resources/configurations/bukkit.yml
|
||||
@@ -49,6 +49,9 @@ world-settings:
|
||||
@@ -50,6 +50,9 @@ world-settings:
|
||||
sugar-growth-modifier: 100
|
||||
tree-growth-modifier: 100
|
||||
mushroom-growth-modifier: 100
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren