geforkt von Mirrors/Paper
Revert "Updated Upstream (Bukkit/CraftBukkit/Spigot)"
This reverts commit d833a4aeef
.
Dieser Commit ist enthalten in:
Ursprung
d833a4aeef
Commit
7391a61447
@ -8,7 +8,7 @@ diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chun
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/Chunk.java
|
--- a/src/main/java/org/bukkit/Chunk.java
|
||||||
+++ b/src/main/java/org/bukkit/Chunk.java
|
+++ b/src/main/java/org/bukkit/Chunk.java
|
||||||
@@ -0,0 +0,0 @@ public interface Chunk extends PersistentDataHolder {
|
@@ -0,0 +0,0 @@ public interface Chunk {
|
||||||
@NotNull
|
@NotNull
|
||||||
Entity[] getEntities();
|
Entity[] getEntities();
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ diff --git a/src/main/java/org/bukkit/Chunk.java b/src/main/java/org/bukkit/Chun
|
|||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/org/bukkit/Chunk.java
|
--- a/src/main/java/org/bukkit/Chunk.java
|
||||||
+++ b/src/main/java/org/bukkit/Chunk.java
|
+++ b/src/main/java/org/bukkit/Chunk.java
|
||||||
@@ -0,0 +0,0 @@ public interface Chunk extends PersistentDataHolder {
|
@@ -0,0 +0,0 @@ public interface Chunk {
|
||||||
*/
|
*/
|
||||||
int getZ();
|
int getZ();
|
||||||
|
|
||||||
|
@ -1891,8 +1891,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+import org.bukkit.command.RemoteConsoleCommandSender;
|
+import org.bukkit.command.RemoteConsoleCommandSender;
|
||||||
+
|
+
|
||||||
+import java.util.List;
|
+import java.util.List;
|
||||||
+import java.util.UUID;
|
|
||||||
+
|
|
||||||
+import org.jetbrains.annotations.NotNull;
|
+import org.jetbrains.annotations.NotNull;
|
||||||
+import org.jetbrains.annotations.Nullable;
|
+import org.jetbrains.annotations.Nullable;
|
||||||
+
|
+
|
||||||
@ -2944,10 +2942,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+import org.bukkit.plugin.Plugin;
|
+import org.bukkit.plugin.Plugin;
|
||||||
+
|
+
|
||||||
+import java.util.Set;
|
+import java.util.Set;
|
||||||
+import java.util.UUID;
|
|
||||||
+
|
|
||||||
+import org.jetbrains.annotations.NotNull;
|
+import org.jetbrains.annotations.NotNull;
|
||||||
+import org.jetbrains.annotations.Nullable;
|
|
||||||
+
|
+
|
||||||
+/**
|
+/**
|
||||||
+ * For when all you care about is just messaging
|
+ * For when all you care about is just messaging
|
||||||
@ -2961,18 +2956,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
|
||||||
+ default void sendMessage(@Nullable UUID sender, @NotNull String message) {
|
|
||||||
+ sendMessage(message);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Override
|
|
||||||
+ default void sendMessage(@Nullable UUID sender, @NotNull String[] messages) {
|
|
||||||
+ for (String message : messages) {
|
|
||||||
+ sendMessage(message);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @NotNull
|
+ @NotNull
|
||||||
+ @Override
|
+ @Override
|
||||||
+ default Server getServer() {
|
+ default Server getServer() {
|
||||||
|
@ -1014,7 +1014,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
chunksection.getBlocks().a(nbttagcompound2.getList("Palette", 10), nbttagcompound2.getLongArray("BlockStates"));
|
chunksection.getBlocks().a(nbttagcompound2.getList("Palette", 10), nbttagcompound2.getLongArray("BlockStates"));
|
||||||
chunksection.recalcBlockCounts();
|
chunksection.recalcBlockCounts();
|
||||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader {
|
@@ -0,0 +0,0 @@ public class ChunkRegionLoader {
|
||||||
// CraftBukkit end
|
loadEntities(nbttagcompound1, chunk);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
- ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1);
|
- ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1);
|
||||||
|
@ -2688,9 +2688,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
- for (int i = -1; i < 17; ++i) {
|
- for (int i = -1; i < 17; ++i) {
|
||||||
+ for (int i = -1; i < 17; ++i) { // Paper - conflict on loop parameter change
|
+ for (int i = -1; i < 17; ++i) { // Paper - conflict on loop parameter change
|
||||||
int finalI = i; // CraftBukkit - decompile errors
|
int finalI = i;
|
||||||
ChunkSection chunksection = (ChunkSection) Arrays.stream(achunksection).filter((chunksection1) -> {
|
ChunkSection chunksection = (ChunkSection) Arrays.stream(achunksection).filter((chunksection1) -> {
|
||||||
return chunksection1 != null && chunksection1.getYPosition() >> 4 == finalI; // CraftBukkit - decompile errors
|
return chunksection1 != null && chunksection1.getYPosition() >> 4 == finalI;
|
||||||
}).findFirst().orElse(Chunk.a);
|
}).findFirst().orElse(Chunk.a);
|
||||||
- NibbleArray nibblearray = lightenginethreaded.a(EnumSkyBlock.BLOCK).a(SectionPosition.a(chunkcoordintpair, i));
|
- NibbleArray nibblearray = lightenginethreaded.a(EnumSkyBlock.BLOCK).a(SectionPosition.a(chunkcoordintpair, i));
|
||||||
- NibbleArray nibblearray1 = lightenginethreaded.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, i));
|
- NibbleArray nibblearray1 = lightenginethreaded.a(EnumSkyBlock.SKY).a(SectionPosition.a(chunkcoordintpair, i));
|
||||||
|
@ -25,15 +25,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
|
|
||||||
- object = new Chunk(worldserver.getMinecraftWorld(), chunkcoordintpair, biomestorage, chunkconverter, (TickList) object1, (TickList) object2, j, achunksection, (chunk) -> {
|
- object = new Chunk(worldserver.getMinecraftWorld(), chunkcoordintpair, biomestorage, chunkconverter, (TickList) object1, (TickList) object2, j, achunksection, (chunk) -> {
|
||||||
- loadEntities(nbttagcompound1, chunk);
|
- loadEntities(nbttagcompound1, chunk);
|
||||||
- // CraftBukkit start - load chunk persistent data from nbt
|
|
||||||
- NBTTagCompound persistentBase = nbttagcompound1.getCompound("BukkitValues");
|
|
||||||
- if (persistentBase != null) {
|
|
||||||
- chunk.persistentDataContainer.putAll(nbttagcompound1);
|
|
||||||
- }
|
|
||||||
- // CraftBukkit end
|
|
||||||
- });
|
- });
|
||||||
+ object = new Chunk(worldserver.getMinecraftWorld(), chunkcoordintpair, biomestorage, chunkconverter, (TickList) object1, (TickList) object2, j, achunksection, // Paper start - fix massive nbt memory leak due to lambda. move lambda into a container method to not leak scope. Only clone needed NBT keys.
|
+ object = new Chunk(worldserver.getMinecraftWorld(), chunkcoordintpair, biomestorage, chunkconverter, (TickList) object1, (TickList) object2, j, achunksection, // Paper start - fix massive nbt memory leak due to lambda. move lambda into a container method to not leak scope. Only clone needed NBT keys.
|
||||||
+ createLoadEntitiesConsumer(new SafeNBTCopy(nbttagcompound1, "TileEntities", "Entities", "BukkitValues")) // Paper - move CB Chunk PDC into here
|
+ createLoadEntitiesConsumer(new SafeNBTCopy(nbttagcompound1, "TileEntities", "Entities"))
|
||||||
+ );// Paper end
|
+ );// Paper end
|
||||||
} else {
|
} else {
|
||||||
ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, worldserver); // Paper - Anti-Xray - Add parameter
|
ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, worldserver); // Paper - Anti-Xray - Add parameter
|
||||||
@ -70,15 +64,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ private static java.util.function.Consumer<Chunk> createLoadEntitiesConsumer(NBTTagCompound nbt) {
|
+ private static java.util.function.Consumer<Chunk> createLoadEntitiesConsumer(NBTTagCompound nbt) {
|
||||||
+ return (chunk) -> {
|
+ return (chunk) -> loadEntities(nbt, chunk);
|
||||||
+ loadEntities(nbt, chunk);
|
|
||||||
+ // CraftBukkit start - load chunk persistent data from nbt
|
|
||||||
+ NBTTagCompound persistentBase = nbt.getCompound("BukkitValues");
|
|
||||||
+ if (persistentBase != null) {
|
|
||||||
+ chunk.persistentDataContainer.putAll(nbt);
|
|
||||||
+ }
|
|
||||||
+ // CraftBukkit end
|
|
||||||
+ };
|
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
|
@ -2442,7 +2442,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
HeightMap.Type[] aheightmap_type = HeightMap.Type.values();
|
HeightMap.Type[] aheightmap_type = HeightMap.Type.values();
|
||||||
int j = aheightmap_type.length;
|
int j = aheightmap_type.length;
|
||||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||||
public final org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
|
public boolean needsDecoration;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 01e22e09726e700776739ec0662acd30e7844cec
|
Subproject commit 9165c3c0b0e34aefce111933495e1c3efb000d4b
|
@ -1 +1 @@
|
|||||||
Subproject commit 4ef13f94d6a4042e0dadd622666a50cee7468d26
|
Subproject commit 055870c4bca477067f9113deb1090228cccf67c6
|
@ -1 +1 @@
|
|||||||
Subproject commit 57bbdd8eb797a51960cf9a47f764b68f97d4f18c
|
Subproject commit 988b41197dad25f715bf535ec725af7c0c1a1627
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren