Send a fake team as needed for the collision rule

This commit is contained in:
Zach Brown 2016-07-30 17:04:39 -05:00
parent 46bfd418a8
commit 8f6208b1d3
No known key found for this signature in database
GPG key ID: CC9DA35FC5450B76
3 changed files with 26 additions and 8 deletions

View file

@ -1,11 +1,11 @@
From 1c6c69b96da276f32ff330c25091299c3efd1fbd Mon Sep 17 00:00:00 2001
From 9159553f5801fda15241c4be67595ea5c22ba4e4 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 17:58:01 -0600
Subject: [PATCH] Check Paper versions
diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index b55abdb..6d32e1d 100644
index 760d58e..0790f3c 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -28,6 +28,11 @@ import org.json.simple.JSONObject;
@ -139,5 +139,5 @@ index b55abdb..6d32e1d 100644
+ // Paper end
}
--
2.8.0
2.9.2.windows.1

View file

@ -1,4 +1,4 @@
From e74586a69790842697352759b3546ac021c0f027 Mon Sep 17 00:00:00 2001
From b7d32c2cb04b15597d51c3b33499d01a086ad70d Mon Sep 17 00:00:00 2001
From: gsand <gsandowns@gmail.com>
Date: Tue, 1 Mar 2016 13:43:16 -0600
Subject: [PATCH] Player Exhaustion Multipliers
@ -36,7 +36,7 @@ index d17160a..f7cf12f 100644
ItemStack itemstack1 = this.u(iblockdata);
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index ca9f0fe..cbceeca 100644
index 30c5116..ffcc235 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1464,13 +1464,13 @@ public abstract class EntityHuman extends EntityLiving {
@ -56,5 +56,5 @@ index ca9f0fe..cbceeca 100644
} else if (this.m_()) {
if (d1 > 0.0D) {
--
2.8.3
2.9.2.windows.1

View file

@ -1,4 +1,4 @@
From e54e91c0d241e40804c85e1945598297d4581435 Mon Sep 17 00:00:00 2001
From 2101a61a8d3df8d0dc1fd0164f8a45bbba2ba9cf Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision
@ -31,6 +31,24 @@ index d8ec504..eb45d3c 100644
packetdataserializer.writeByte(this.g);
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 91e52f9..f75d996 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -241,6 +241,13 @@ public abstract class PlayerList {
public void sendScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
HashSet hashset = Sets.newHashSet();
Iterator iterator = scoreboardserver.getTeams().iterator();
+
+ // Paper start - Send a fake team to the client to initialize collision rule if no others exist
+ if (!com.destroystokyo.paper.PaperConfig.enablePlayerCollisions && !iterator.hasNext()) {
+ entityplayer.playerConnection.sendPacket(new PacketPlayOutScoreboardTeam(new ScoreboardTeam(scoreboardserver, "collideRule"), 0));
+ return;
+ }
+ // Paper end
while (iterator.hasNext()) {
ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next();
--
2.9.0
2.9.2.windows.1