diff options
author | md_5 <git@md-5.net> | 2015-12-15 17:12:32 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-12-15 17:12:32 +1100 |
commit | 4ac23479e5e3ca24c4a656efbbde2490aa551923 (patch) | |
tree | c2ce590071cc8ba5fe54ef0079ab1da8df2758d9 | |
parent | 18fbb24b46427e2b41d3715a79f829b356b05ed5 (diff) | |
download | craftbukkit-4ac23479e5e3ca24c4a656efbbde2490aa551923.tar craftbukkit-4ac23479e5e3ca24c4a656efbbde2490aa551923.tar.gz craftbukkit-4ac23479e5e3ca24c4a656efbbde2490aa551923.tar.lz craftbukkit-4ac23479e5e3ca24c4a656efbbde2490aa551923.tar.xz craftbukkit-4ac23479e5e3ca24c4a656efbbde2490aa551923.zip |
Add some warnings from snapshot versions to check whether they are applicable in 1.8.8
-rw-r--r-- | nms-patches/WorldServer.patch | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/nms-patches/WorldServer.patch b/nms-patches/WorldServer.patch index 5acbfbda..be617f41 100644 --- a/nms-patches/WorldServer.patch +++ b/nms-patches/WorldServer.patch @@ -507,7 +507,7 @@ Iterator iterator = arraylist.iterator(); while (iterator.hasNext()) { -@@ -695,8 +920,12 @@ +@@ -695,12 +920,37 @@ this.worldData.k(this.getWorldBorder().getWarningTime()); this.worldData.b(this.getWorldBorder().j()); this.worldData.e(this.getWorldBorder().i()); @@ -521,7 +521,32 @@ } protected void a(Entity entity) { -@@ -728,8 +957,16 @@ + super.a(entity); ++ // CraftBukkit start ++ UUID uuid = entity.getUniqueID(); ++ ++ if (this.entitiesByUUID.containsKey(uuid)) { ++ Entity entity1 = (Entity) this.entitiesByUUID.get(uuid); ++ ++ 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()); ++ } ++ ++ 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 @@ } public boolean strikeLightning(Entity entity) { @@ -539,7 +564,7 @@ return true; } else { return false; -@@ -741,10 +978,20 @@ +@@ -741,10 +999,20 @@ } public Explosion createExplosion(Entity entity, double d0, double d1, double d2, float f, boolean flag, boolean flag1) { @@ -560,7 +585,7 @@ if (!flag1) { explosion.clearBlocks(); } -@@ -790,7 +1037,8 @@ +@@ -790,7 +1058,8 @@ BlockActionData blockactiondata = (BlockActionData) iterator.next(); if (this.a(blockactiondata)) { @@ -570,7 +595,7 @@ } } -@@ -813,6 +1061,7 @@ +@@ -813,6 +1082,7 @@ boolean flag = this.S(); super.p(); @@ -578,7 +603,7 @@ if (this.o != this.p) { this.server.getPlayerList().a(new PacketPlayOutGameStateChange(7, this.p), this.worldProvider.getDimension()); } -@@ -831,6 +1080,21 @@ +@@ -831,6 +1101,21 @@ this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(7, this.p)); this.server.getPlayerList().sendAll(new PacketPlayOutGameStateChange(8, this.r)); } @@ -600,7 +625,7 @@ } -@@ -859,10 +1123,17 @@ +@@ -859,10 +1144,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) { |