Merge branch 'master' into pre/1.13

* master:
  fix missed break statement and enum check on dupe uuid resolve
This commit is contained in:
Aikar 2018-08-03 01:33:34 -04:00
commit 919b04c7b8
2 changed files with 5 additions and 4 deletions

View file

@ -7,7 +7,7 @@ This disables the behavior that allows players to keep chunks permanently loaded
by default and allows server operators to enable it if they wish.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 50d3483eb0..5b14973810 100644
index 809441fc63..4a135d84db 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {

View file

@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7bd7aa0d94..50d3483eb0 100644
index 7bd7aa0d94..809441fc63 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
@ -52,6 +52,7 @@ index 7bd7aa0d94..50d3483eb0 100644
+ case "saferegenerate":
+ duplicateUUIDMode = DuplicateUUIDMode.SAFE_REGEN;
+ log("Duplicate UUID Resolve: Safer Regenerate New UUID (Delete likely duplicates)");
+ break;
+ case "regen":
+ case "regenerate":
+ duplicateUUIDMode = DuplicateUUIDMode.REGEN;
@ -82,7 +83,7 @@ index 7bd7aa0d94..50d3483eb0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 1997cbdc65..2838f4e822 100644
index 1997cbdc65..a593a798c9 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -0,0 +0,0 @@
@ -118,7 +119,7 @@ index 1997cbdc65..2838f4e822 100644
List entityslice = aentityslice[j]; // Spigot
+ // Paper start
+ DuplicateUUIDMode mode = world.paperConfig.duplicateUUIDMode;
+ if (mode == DuplicateUUIDMode.WARN | mode == DuplicateUUIDMode.DELETE || mode == DuplicateUUIDMode.REGEN) {
+ if (mode == DuplicateUUIDMode.WARN | mode == DuplicateUUIDMode.DELETE || mode == DuplicateUUIDMode.REGEN || mode == DuplicateUUIDMode.SAFE_REGEN) {
+ Map<UUID, Entity> thisChunk = new HashMap<>();
+ for (Iterator<Entity> iterator = ((List<Entity>) entityslice).iterator(); iterator.hasNext(); ) {
+ Entity entity = iterator.next();