mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-21 18:15:54 +01:00
Send maps, just a lot less often.
This commit is contained in:
parent
5efea6f794
commit
7d858839a7
@ -1,6 +1,6 @@
|
||||
From 92f2c13f80e1503d4e5812a26f1fe34d77098272 Mon Sep 17 00:00:00 2001
|
||||
From 919d7607ccfee7e7949c5b289a05a73974b76546 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 29 Jan 2013 16:51:35 +1100
|
||||
Date: Sat, 2 Feb 2013 19:38:11 +1100
|
||||
Subject: [PATCH] Spigot changes.
|
||||
|
||||
---
|
||||
@ -18,9 +18,7 @@ Subject: [PATCH] Spigot changes.
|
||||
.../net/minecraft/server/ChunkRegionLoader.java | 35 +-
|
||||
.../java/net/minecraft/server/ChunkSection.java | 31 +-
|
||||
src/main/java/net/minecraft/server/EntityItem.java | 3 +-
|
||||
.../java/net/minecraft/server/EntityPlayer.java | 1 +
|
||||
.../java/net/minecraft/server/EntitySquid.java | 4 -
|
||||
.../net/minecraft/server/EntityTrackerEntry.java | 2 +
|
||||
.../java/net/minecraft/server/MinecraftServer.java | 51 +--
|
||||
.../net/minecraft/server/PlayerConnection.java | 18 +-
|
||||
src/main/java/net/minecraft/server/PlayerList.java | 10 +-
|
||||
@ -43,7 +41,7 @@ Subject: [PATCH] Spigot changes.
|
||||
.../org/bukkit/craftbukkit/util/TimedThread.java | 37 ++
|
||||
.../bukkit/craftbukkit/util/WatchdogThread.java | 88 ++++
|
||||
src/main/resources/configurations/bukkit.yml | 30 ++
|
||||
39 files changed, 1424 insertions(+), 134 deletions(-)
|
||||
37 files changed, 1421 insertions(+), 134 deletions(-)
|
||||
create mode 100644 src/main/java/org/bukkit/craftbukkit/Spigot.java
|
||||
create mode 100644 src/main/java/org/bukkit/craftbukkit/command/RestartCommand.java
|
||||
create mode 100644 src/main/java/org/bukkit/craftbukkit/command/TicksPerSecondCommand.java
|
||||
@ -400,18 +398,6 @@ index b8b6d52..a7baa0f 100644
|
||||
++this.age;
|
||||
if (!this.world.isStatic && this.age >= 6000) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 8d61ca6..3aed58f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -49,6 +49,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public int newTotalExp = 0;
|
||||
public boolean keepLevel = false;
|
||||
// CraftBukkit end
|
||||
+ public java.util.Set<java.util.UUID> sentFrames = new java.util.HashSet<java.util.UUID>(); // Spigot
|
||||
|
||||
public EntityPlayer(MinecraftServer minecraftserver, World world, String s, PlayerInteractManager playerinteractmanager) {
|
||||
super(world);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
|
||||
index 961d83a..188d477 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySquid.java
|
||||
@ -427,26 +413,6 @@ index 961d83a..188d477 100644
|
||||
public void c() {
|
||||
super.c();
|
||||
this.e = this.d;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index a026c4c..cb91e30 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -84,6 +84,7 @@ public class EntityTrackerEntry {
|
||||
while (j0.hasNext()) {
|
||||
EntityHuman j1 = (EntityHuman) j0.next();
|
||||
EntityPlayer j2 = (EntityPlayer) j1;
|
||||
+ if (j2.sentFrames.contains(i4.uniqueId)) continue; // Spigot
|
||||
|
||||
i7.a(j2, i5);
|
||||
if (j2.playerConnection.lowPriorityCount() <= 5) {
|
||||
@@ -91,6 +92,7 @@ public class EntityTrackerEntry {
|
||||
|
||||
if (j3 != null) {
|
||||
j2.playerConnection.sendPacket(j3);
|
||||
+ j2.sentFrames.add(i4.uniqueId); // Spigot
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 4bdf8aa..4ee2b8b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
|
@ -0,0 +1,26 @@
|
||||
From f3d2c0764c022bea6bee6591a0e376e1c047b35a 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(-)
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index a026c4c..bef8fad 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 {
|
||||
this.broadcast(new Packet39AttachEntity(this.tracker, this.tracker.vehicle));
|
||||
}
|
||||
|
||||
- if (this.tracker instanceof EntityItemFrame && this.m % 10 == 0) {
|
||||
+ if (this.tracker instanceof EntityItemFrame && this.m % 1000 == 0) {
|
||||
EntityItemFrame i4 = (EntityItemFrame) this.tracker;
|
||||
ItemStack i5 = i4.i();
|
||||
|
||||
--
|
||||
1.8.1-rc2
|
||||
|
Loading…
Reference in New Issue
Block a user