summaryrefslogtreecommitdiffstats
path: root/nms-patches/WorldServer.patch
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2015-12-17 10:24:55 +1100
committermd_5 <git@md-5.net>2015-12-17 10:24:55 +1100
commitd3e0b6feadd3d47c440b0d212f3a0962b69f2134 (patch)
tree68e05219b6442720f7471e3bdeb0e13a12e9f415 /nms-patches/WorldServer.patch
parent4ac23479e5e3ca24c4a656efbbde2490aa551923 (diff)
downloadcraftbukkit-d3e0b6feadd3d47c440b0d212f3a0962b69f2134.tar
craftbukkit-d3e0b6feadd3d47c440b0d212f3a0962b69f2134.tar.gz
craftbukkit-d3e0b6feadd3d47c440b0d212f3a0962b69f2134.tar.lz
craftbukkit-d3e0b6feadd3d47c440b0d212f3a0962b69f2134.tar.xz
craftbukkit-d3e0b6feadd3d47c440b0d212f3a0962b69f2134.zip
SPIGOT-1347: Don't change entity add behaviour, just print warning.
Diffstat (limited to 'nms-patches/WorldServer.patch')
-rw-r--r--nms-patches/WorldServer.patch24
1 files changed, 8 insertions, 16 deletions
diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch
index be617f41..394e4bab 100644
--- a/nms-patches/WorldServer.patch
+++ b/nms-patches/WorldServer.patch
@@ -507,7 +507,7 @@
Iterator iterator = arraylist.iterator();
while (iterator.hasNext()) {
-@@ -695,12 +920,37 @@
+@@ -695,12 +920,29 @@
this.worldData.k(this.getWorldBorder().getWarningTime());
this.worldData.b(this.getWorldBorder().j());
this.worldData.e(this.getWorldBorder().i());
@@ -530,23 +530,15 @@
+
+ if (this.g.contains(entity1)) {
+ WorldServer.a.warn("Tried to add entity " + EntityTypes.b(entity1) + " with pending removal and duplicate UUID " + uuid.toString());
-+ this.g.remove(entity1);
+ } else {
-+ if (!(entity instanceof EntityHuman)) {
-+ WorldServer.a.warn("Keeping entity " + EntityTypes.b(entity1) + " that already exists with UUID " + uuid.toString());
-+ return;
-+ }
-+
-+ WorldServer.a.warn("Force-added player with duplicate UUID " + uuid.toString());
++ WorldServer.a.warn("Tried to add entity " + EntityTypes.b(entity1) + " that already exists with UUID " + uuid.toString());
+ }
-+
-+ this.removeEntity(entity1);
+ }
+ // CraftBukkit end
this.entitiesById.a(entity.getId(), entity);
this.entitiesByUUID.put(entity.getUniqueID(), entity);
Entity[] aentity = entity.aB();
-@@ -728,8 +978,16 @@
+@@ -728,8 +970,16 @@
}
public boolean strikeLightning(Entity entity) {
@@ -564,7 +556,7 @@
return true;
} else {
return false;
-@@ -741,10 +999,20 @@
+@@ -741,10 +991,20 @@
}
public Explosion createExplosion(Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) {
@@ -585,7 +577,7 @@
if (!flag1) {
explosion.clearBlocks();
}
-@@ -790,7 +1058,8 @@
+@@ -790,7 +1050,8 @@
BlockActionData blockactiondata = (BlockActionData) iterator.next();
if (this.a(blockactiondata)) {
@@ -595,7 +587,7 @@
}
}
-@@ -813,6 +1082,7 @@
+@@ -813,6 +1074,7 @@
boolean flag = this.S();
super.p();
@@ -603,7 +595,7 @@
if (this.o != this.p) {
this.server.getPlayerList().a(new PacketPlayOutGameStateChange(7, this.p), this.worldProvider.getDimension());
}
-@@ -831,6 +1101,21 @@
+@@ -831,6 +1093,21 @@
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.p));
this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.r));
}
@@ -625,7 +617,7 @@
}
-@@ -859,10 +1144,17 @@
+@@ -859,10 +1136,17 @@
}
public void a(EnumParticle enumparticle, boolean flag, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, int... aint) {