Reduce and improve dupe uuid resolve message

This commit is contained in:
Aikar 2018-07-23 22:50:56 -04:00
parent 5c4367f9d3
commit 9ec7ffa358
No known key found for this signature in database
GPG Key ID: 401ADFC9891FAAFE

View File

@ -1,4 +1,4 @@
From 2a6d7b5cf9db036928914e854416039d7c8a14af Mon Sep 17 00:00:00 2001 From 60078ed225caffbeab2732eb4a64364d9d342341 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 14:27:34 -0400 Date: Sat, 21 Jul 2018 14:27:34 -0400
Subject: [PATCH] Duplicate UUID Resolve Option Subject: [PATCH] Duplicate UUID Resolve Option
@ -78,7 +78,7 @@ index 14c8edeff..e3f6557e1 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 04adf4e3c..ea9559583 100644 index 04adf4e3c..b31c301ec 100644
--- a/src/main/java/net/minecraft/server/Chunk.java --- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,10 @@ @@ -1,5 +1,10 @@
@ -108,7 +108,7 @@ index 04adf4e3c..ea9559583 100644
} }
int k = MathHelper.floor(entity.locY / 16.0D); int k = MathHelper.floor(entity.locY / 16.0D);
@@ -851,6 +858,37 @@ public class Chunk { @@ -851,6 +858,35 @@ public class Chunk {
for (int j = 0; j < i; ++j) { for (int j = 0; j < i; ++j) {
List entityslice = aentityslice[j]; // Spigot List entityslice = aentityslice[j]; // Spigot
@ -126,13 +126,11 @@ index 04adf4e3c..ea9559583 100644
+ switch (mode) { + switch (mode) {
+ case REGEN: { + case REGEN: {
+ entity.setUUID(UUID.randomUUID()); + entity.setUUID(UUID.randomUUID());
+ logger.error("Duplicate UUID found used by " + other); + logger.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", regenerated UUID for " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
+ logger.error("Regenerated a new UUID for " + entity);
+ break; + break;
+ } + }
+ case DELETE: { + case DELETE: {
+ logger.error("Duplicate UUID found used by " + other); + logger.warn("[DUPE-UUID] Duplicate UUID found used by " + other + ", deleted entity " + entity + ". See https://github.com/PaperMC/Paper/issues/1223 for discussion on what this is about.");
+ logger.error("Deleting duplicate entity " + entity);
+ entity.die(); + entity.die();
+ iterator.remove(); + iterator.remove();
+ break; + break;