13
0
geforkt von Mirrors/Paper

Restore some timings functionality lost in last

Dieser Commit ist enthalten in:
Zach Brown 2016-08-27 19:36:26 -05:00
Ursprung b170e8cedb
Commit ba4aaaa607
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: CC9DA35FC5450B76
9 geänderte Dateien mit 367 neuen und 42 gelöschten Zeilen

Datei anzeigen

@ -1,4 +1,4 @@
From a6eea0b71f9783fbe8c3d2faceb4c634a015b3e6 Mon Sep 17 00:00:00 2001
From bcf58a57e761e7607e15baa7a62d92aea8f430d0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -23,10 +23,10 @@ index 4ae34c8..63aaa7a 100644
<version>3.0.3</version>
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 0000000..0f8315c
index 0000000..2dff5e3
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,110 @@
@@ -0,0 +1,114 @@
+package co.aikar.timings;
+
+import net.minecraft.server.*;
@ -136,13 +136,149 @@ index 0000000..0f8315c
+ public static Timing getBlockTiming(Block block) {
+ return Timings.ofSafe("## Scheduled Block: " + block.getName());
+ }
+
+ public static Timing getStructureTiming(StructureGenerator structureGenerator) {
+ return Timings.ofSafe("Structure Generator - " + structureGenerator.getName());
+ }
+}
diff --git a/src/main/java/co/aikar/timings/TimedChunkGenerator.java b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
new file mode 100644
index 0000000..2bf5b66
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedChunkGenerator.java
@@ -0,0 +1,126 @@
+/*
+ * This file is licensed under the MIT License (MIT).
+ *
+ * Copyright (c) 2014-2016 Daniel Ennis <http://aikar.co>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+package co.aikar.timings;
+
+import net.minecraft.server.BiomeBase.BiomeMeta;
+import net.minecraft.server.BlockPosition;
+import net.minecraft.server.Chunk;
+import net.minecraft.server.EnumCreatureType;
+import net.minecraft.server.World;
+import net.minecraft.server.WorldServer;
+import org.bukkit.Location;
+import org.bukkit.craftbukkit.generator.InternalChunkGenerator;
+import org.bukkit.generator.BlockPopulator;
+
+import javax.annotation.Nullable;
+import java.util.List;
+import java.util.Random;
+
+public class TimedChunkGenerator extends InternalChunkGenerator {
+ private final WorldServer world;
+ private final InternalChunkGenerator timedGenerator;
+
+ public TimedChunkGenerator(WorldServer worldServer, InternalChunkGenerator gen) {
+ world = worldServer;
+ timedGenerator = gen;
+ }
+
+ @Override
+ @Deprecated
+ public byte[] generate(org.bukkit.World world, Random random, int x, int z) {
+ return timedGenerator.generate(world, random, x, z);
+ }
+
+ @Override
+ @Deprecated
+ public short[][] generateExtBlockSections(org.bukkit.World world, Random random, int x, int z,
+ BiomeGrid biomes) {
+ return timedGenerator.generateExtBlockSections(world, random, x, z, biomes);
+ }
+
+ @Override
+ @Deprecated
+ public byte[][] generateBlockSections(org.bukkit.World world, Random random, int x, int z,
+ BiomeGrid biomes) {
+ return timedGenerator.generateBlockSections(world, random, x, z, biomes);
+ }
+
+ @Override
+ public ChunkData generateChunkData(org.bukkit.World world, Random random, int x, int z, BiomeGrid biome) {
+ return timedGenerator.generateChunkData(world, random, x, z, biome);
+ }
+
+ @Override
+ public boolean canSpawn(org.bukkit.World world, int x, int z) {
+ return timedGenerator.canSpawn(world, x, z);
+ }
+
+ @Override
+ public List<BlockPopulator> getDefaultPopulators(org.bukkit.World world) {
+ return timedGenerator.getDefaultPopulators(world);
+ }
+
+ @Override
+ public Location getFixedSpawnLocation(org.bukkit.World world, Random random) {
+ return timedGenerator.getFixedSpawnLocation(world, random);
+ }
+
+ @Override
+ public Chunk getOrCreateChunk(int i, int j) {
+ try (Timing ignored = world.timings.chunkGeneration.startTiming()) {
+ return timedGenerator.getOrCreateChunk(i, j);
+ }
+ }
+
+ @Override
+ public void recreateStructures(int i, int j) {
+ try (Timing ignored = world.timings.syncChunkLoadStructuresTimer.startTiming()) {
+ timedGenerator.recreateStructures(i, j);
+ }
+ }
+
+ @Override
+ public boolean a(Chunk chunk, int i, int j) {
+ return timedGenerator.a(chunk, i, j);
+ }
+
+ @Override
+ public List<BiomeMeta> getMobsFor(EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
+ return timedGenerator.getMobsFor(enumcreaturetype, blockposition);
+ }
+
+ @Override
+ @Nullable
+ public BlockPosition findNearestMapFeature(World world, String s, BlockPosition blockposition) {
+ return timedGenerator.findNearestMapFeature(world, s, blockposition);
+ }
+
+ @Override
+ public void recreateStructures(Chunk chunk, int i, int j) {
+ try (Timing ignored = world.timings.syncChunkLoadStructuresTimer.startTiming()) {
+ timedGenerator.recreateStructures(chunk, i, j);
+ }
+ }
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 0000000..741da72
index 0000000..36aafb2
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,85 @@
@@ -0,0 +1,91 @@
+package co.aikar.timings;
+
+import net.minecraft.server.World;
@ -158,6 +294,7 @@ index 0000000..741da72
+ public final Timing scheduledBlocksCleanup;
+ public final Timing scheduledBlocksTicking;
+ public final Timing chunkTicks;
+ public final Timing lightChunk;
+ public final Timing chunkTicksBlocks;
+ public final Timing doVillages;
+ public final Timing doChunkMap;
@ -182,10 +319,12 @@ index 0000000..741da72
+ public final Timing syncChunkLoadTimer;
+ public final Timing syncChunkLoadDataTimer;
+ public final Timing syncChunkLoadStructuresTimer;
+ public final Timing syncChunkLoadEntitiesTimer;
+ public final Timing syncChunkLoadTileEntitiesTimer;
+ public final Timing syncChunkLoadTileTicksTimer;
+ public final Timing syncChunkLoadPostTimer;
+ public final Timing syncChunkLoadNBTTimer;
+ public final Timing syncChunkLoadPopulateNeighbors;
+ public final Timing chunkGeneration;
+ public final Timing chunkIOStage1;
+ public final Timing chunkIOStage2;
+
+ public WorldTimingsHandler(World server) {
+ String name = server.worldData.getName() +" - ";
@ -196,6 +335,7 @@ index 0000000..741da72
+ scheduledBlocksCleanup = Timings.ofSafe(name + "Scheduled Blocks - Cleanup");
+ scheduledBlocksTicking = Timings.ofSafe(name + "Scheduled Blocks - Ticking");
+ chunkTicks = Timings.ofSafe(name + "Chunk Ticks");
+ lightChunk = Timings.ofSafe(name + "Light Chunk");
+ chunkTicksBlocks = Timings.ofSafe(name + "Chunk Ticks - Blocks");
+ doVillages = Timings.ofSafe(name + "doVillages");
+ doChunkMap = Timings.ofSafe(name + "doChunkMap");
@ -216,11 +356,13 @@ index 0000000..741da72
+
+ syncChunkLoadTimer = Timings.ofSafe(name + "syncChunkLoad");
+ syncChunkLoadDataTimer = Timings.ofSafe(name + "syncChunkLoad - Data");
+ syncChunkLoadStructuresTimer = Timings.ofSafe(name + "chunkLoad - Structures");
+ syncChunkLoadEntitiesTimer = Timings.ofSafe(name + "chunkLoad - Entities");
+ syncChunkLoadTileEntitiesTimer = Timings.ofSafe(name + "chunkLoad - TileEntities");
+ syncChunkLoadTileTicksTimer = Timings.ofSafe(name + "chunkLoad - TileTicks");
+ syncChunkLoadStructuresTimer = Timings.ofSafe(name + "chunkLoad - recreateStructures");
+ syncChunkLoadPostTimer = Timings.ofSafe(name + "chunkLoad - Post");
+ syncChunkLoadNBTTimer = Timings.ofSafe(name + "chunkLoad - NBT");
+ syncChunkLoadPopulateNeighbors = Timings.ofSafe(name + "chunkLoad - Populate Neighbors");
+ chunkGeneration = Timings.ofSafe(name + "chunkGeneration");
+ chunkIOStage1 = Timings.ofSafe(name + "ChunkIO Stage 1 - DiskIO");
+ chunkIOStage2 = Timings.ofSafe(name + "ChunkIO Stage 2 - Post Load");
+
+ tracker1 = Timings.ofSafe(name + "tracker stage 1");
+ tracker2 = Timings.ofSafe(name + "tracker stage 2");
@ -292,6 +434,94 @@ index a106e44..d17160a 100644
public static int getId(Block block) {
return Block.REGISTRY.a(block); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index b651edc..5807bb8 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -900,7 +900,7 @@ public class Chunk {
// CraftBukkit start
public void loadNearby(IChunkProvider ichunkprovider, ChunkGenerator chunkgenerator, boolean newChunk) {
- world.timings.syncChunkLoadPostTimer.startTiming(); // Spigot
+ world.timings.syncChunkLoadPostTimer.startTiming(); // Paper
Server server = world.getServer();
if (server != null) {
/*
@@ -926,7 +926,8 @@ public class Chunk {
}
}
// CraftBukkit end
-
+ world.timings.syncChunkLoadPostTimer.stopTiming(); // Paper
+ world.timings.syncChunkLoadPopulateNeighbors.startTiming(); // Paper
Chunk chunk = ichunkprovider.getLoadedChunkAt(this.locX, this.locZ - 1);
Chunk chunk1 = ichunkprovider.getLoadedChunkAt(this.locX + 1, this.locZ);
Chunk chunk2 = ichunkprovider.getLoadedChunkAt(this.locX, this.locZ + 1);
@@ -951,7 +952,7 @@ public class Chunk {
chunk4.a(chunkgenerator);
}
}
- world.timings.syncChunkLoadPostTimer.stopTiming(); // Spigot
+ world.timings.syncChunkLoadPopulateNeighbors.stopTiming(); // Paper
}
@@ -1164,6 +1165,7 @@ public class Chunk {
}
public void o() {
+ world.timings.lightChunk.startTiming(); // Paper
this.done = true;
this.lit = true;
BlockPosition blockposition = new BlockPosition(this.locX << 4, 0, this.locZ << 4);
@@ -1197,6 +1199,7 @@ public class Chunk {
}
}
+ world.timings.lightChunk.stopTiming(); // Paper
}
private void z() {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index f604639..17dd7bb 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -394,7 +394,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
public void loadEntities(Chunk chunk, NBTTagCompound nbttagcompound, World world) {
// CraftBukkit end
- world.timings.syncChunkLoadEntitiesTimer.startTiming(); // Spigot
+ world.timings.syncChunkLoadNBTTimer.startTiming(); // Spigot
NBTTagList nbttaglist1 = nbttagcompound.getList("Entities", 10);
if (nbttaglist1 != null) {
@@ -405,8 +405,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
chunk.g(true);
}
}
- world.timings.syncChunkLoadEntitiesTimer.stopTiming(); // Spigot
- world.timings.syncChunkLoadTileEntitiesTimer.startTiming(); // Spigot
NBTTagList nbttaglist2 = nbttagcompound.getList("TileEntities", 10);
if (nbttaglist2 != null) {
@@ -419,8 +417,6 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
}
- world.timings.syncChunkLoadTileEntitiesTimer.stopTiming(); // Spigot
- world.timings.syncChunkLoadTileTicksTimer.startTiming(); // Spigot
if (nbttagcompound.hasKeyOfType("TileTicks", 9)) {
NBTTagList nbttaglist3 = nbttagcompound.getList("TileTicks", 10);
@@ -440,7 +436,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
}
}
- world.timings.syncChunkLoadTileTicksTimer.stopTiming(); // Spigot
+ world.timings.syncChunkLoadNBTTimer.stopTiming(); // Spigot
// return chunk; // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 11a49a3..e70d5c5 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
@ -756,6 +986,48 @@ index d5dd29b..13a6cfe 100644
// this.minecraftServer.getCommandHandler().a(this.player, s);
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index 8dd434c..c965af1 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -1,5 +1,7 @@
package net.minecraft.server;
+import co.aikar.timings.MinecraftTimings;
+import co.aikar.timings.Timing;
import it.unimi.dsi.fastutil.longs.Long2ObjectMap;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import java.util.Iterator;
@@ -8,11 +10,13 @@ import java.util.Random;
public abstract class StructureGenerator extends WorldGenBase {
+ private final Timing timing = MinecraftTimings.getStructureTiming(this); // Paper
private PersistentStructure a;
protected Long2ObjectMap<StructureStart> c = new Long2ObjectOpenHashMap(1024);
public StructureGenerator() {}
+ public String getName() { return a(); } // Paper // OBF HELPER
public abstract String a();
protected final synchronized void a(World world, final int i, final int j, int k, int l, ChunkSnapshot chunksnapshot) {
@@ -68,6 +72,7 @@ public abstract class StructureGenerator extends WorldGenBase {
}
public synchronized boolean a(World world, Random random, ChunkCoordIntPair chunkcoordintpair) {
+ timing.startTiming(); // Paper
this.a(world);
int i = (chunkcoordintpair.x << 4) + 8;
int j = (chunkcoordintpair.z << 4) + 8;
@@ -84,6 +89,7 @@ public abstract class StructureGenerator extends WorldGenBase {
this.a(structurestart.e(), structurestart.f(), structurestart);
}
}
+ timing.stopTiming(); // Paper
return flag;
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index 42f37df..2b82312 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
@ -883,7 +1155,7 @@ index e649435..b73f64e 100644
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 0668887..e0f448d 100644
index 0668887..94d07eb 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -245,13 +245,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -963,6 +1235,15 @@ index 0668887..e0f448d 100644
this.methodProfiler.b();
this.U.clear();
@@ -842,7 +850,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
gen = new org.bukkit.craftbukkit.generator.NormalChunkGenerator(this, this.getSeed());
}
- return new ChunkProviderServer(this, ichunkloader, gen);
+ return new ChunkProviderServer(this, ichunkloader, new co.aikar.timings.TimedChunkGenerator(this, gen)); // Paper
// CraftBukkit end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e7e9941..5f2a9b0 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@ -1179,6 +1460,50 @@ index 41d2d87..0000000
- }
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 3a95b44..b5efb9c 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -1,6 +1,8 @@
package org.bukkit.craftbukkit.chunkio;
import java.io.IOException;
+
+import co.aikar.timings.Timing;
import net.minecraft.server.Chunk;
import net.minecraft.server.ChunkCoordIntPair;
import net.minecraft.server.ChunkRegionLoader;
@@ -16,7 +18,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
// async stuff
public Chunk callStage1(QueuedChunk queuedChunk) throws RuntimeException {
- try {
+ try (Timing ignored = queuedChunk.provider.world.timings.chunkIOStage1.startTimingIfSync()) { // Paper
ChunkRegionLoader loader = queuedChunk.loader;
Object[] data = loader.loadChunk(queuedChunk.world, queuedChunk.x, queuedChunk.z);
@@ -38,6 +40,7 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
queuedChunk.provider.originalGetChunkAt(queuedChunk.x, queuedChunk.z);
return;
}
+ try (Timing ignored = queuedChunk.provider.world.timings.chunkIOStage2.startTimingIfSync()) { // Paper
queuedChunk.loader.loadEntities(chunk, queuedChunk.compound.getCompound("Level"), queuedChunk.world);
chunk.setLastSaved(queuedChunk.provider.world.getTime());
@@ -45,12 +48,11 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
chunk.addEntities();
if (queuedChunk.provider.chunkGenerator != null) {
- queuedChunk.provider.world.timings.syncChunkLoadStructuresTimer.startTiming(); // Spigot
queuedChunk.provider.chunkGenerator.recreateStructures(chunk, queuedChunk.x, queuedChunk.z);
- queuedChunk.provider.world.timings.syncChunkLoadStructuresTimer.stopTiming(); // Spigot
}
chunk.loadNearby(queuedChunk.provider, queuedChunk.provider.chunkGenerator, false);
+ } // Paper
}
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 3c75538..5874554 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java

Datei anzeigen

@ -1,4 +1,4 @@
From 6a7b6bc589f136582c083249c2ccaca5d436c5bb Mon Sep 17 00:00:00 2001
From 55cfaf3677015d0009f483b6c496d43dc1c4c8b7 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 00:52:31 -0600
Subject: [PATCH] Lighting Queue
@ -6,19 +6,19 @@ Subject: [PATCH] Lighting Queue
This provides option to queue lighting updates to ensure they do not cause the server lag
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
index 741da72..8b3aa17 100644
index 36aafb2..90bdbf0 100644
--- a/src/main/java/co/aikar/timings/WorldTimingsHandler.java
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -42,6 +42,8 @@ public class WorldTimingsHandler {
public final Timing syncChunkLoadTileTicksTimer;
public final Timing syncChunkLoadPostTimer;
@@ -45,6 +45,8 @@ public class WorldTimingsHandler {
public final Timing chunkIOStage1;
public final Timing chunkIOStage2;
+ public final Timing lightingQueueTimer;
+
public WorldTimingsHandler(World server) {
String name = server.worldData.getName() +" - ";
@@ -81,5 +83,7 @@ public class WorldTimingsHandler {
@@ -87,5 +89,7 @@ public class WorldTimingsHandler {
tracker2 = Timings.ofSafe(name + "tracker stage 2");
doTick = Timings.ofSafe(name + "doTick");
tickEntities = Timings.ofSafe(name + "tickEntities");
@ -42,7 +42,7 @@ index d78b688..158db3a 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 015a223..0fae95d 100644
index 445419f..76130c9 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -33,6 +33,7 @@ public class Chunk {

Datei anzeigen

@ -1,4 +1,4 @@
From 98c93c01ba0a797b56fb0d268689f5ff3be93913 Mon Sep 17 00:00:00 2001
From 165f860eb9571e17f3ffefd6cc4259cee7f21592 Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net>
Date: Wed, 2 Mar 2016 02:17:54 -0600
Subject: [PATCH] Generator Settings
@ -245,10 +245,10 @@ index 6e6ecd8..e95175e 100644
}
}
diff --git a/src/main/java/net/minecraft/server/StructureGenerator.java b/src/main/java/net/minecraft/server/StructureGenerator.java
index 8dd434c..4248a36 100644
index c965af1..3ce4449 100644
--- a/src/main/java/net/minecraft/server/StructureGenerator.java
+++ b/src/main/java/net/minecraft/server/StructureGenerator.java
@@ -89,6 +89,7 @@ public abstract class StructureGenerator extends WorldGenBase {
@@ -95,6 +95,7 @@ public abstract class StructureGenerator extends WorldGenBase {
}
public boolean b(BlockPosition blockposition) {
@ -256,7 +256,7 @@ index 8dd434c..4248a36 100644
this.a(this.g);
return this.c(blockposition) != null;
}
@@ -116,6 +117,7 @@ public abstract class StructureGenerator extends WorldGenBase {
@@ -122,6 +123,7 @@ public abstract class StructureGenerator extends WorldGenBase {
}
public synchronized boolean b(World world, BlockPosition blockposition) { // CraftBukkit - synchronized

Datei anzeigen

@ -1,4 +1,4 @@
From cb7cba1492fa45cb0b8d20862147e971ff40b9c4 Mon Sep 17 00:00:00 2001
From be477a85ae20e7d9e729c909da01a8bb3e5f0734 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 4 Mar 2016 18:18:37 -0600
Subject: [PATCH] Chunk save queue improvements
@ -41,7 +41,7 @@ index 9ab6445..d01bca1 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index ff450f4..73b8b8b 100644
index 162cdd6..e6e7626 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -12,14 +12,17 @@ import java.util.Map;
@ -135,7 +135,7 @@ index ff450f4..73b8b8b 100644
}
return flag;
@@ -558,4 +559,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -554,4 +555,16 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
return entity;
}
}

Datei anzeigen

@ -1,4 +1,4 @@
From 96c5e2c3cce309b02bc2705fd29713388aa9ea59 Mon Sep 17 00:00:00 2001
From 558f80834dec489fa405e3cbe67c9d54cdb3c577 Mon Sep 17 00:00:00 2001
From: DemonWav <demonwav@gmail.com>
Date: Sat, 26 Mar 2016 21:36:05 -0500
Subject: [PATCH] Prevent possible infinite loop in BlockPosition iterator

Datei anzeigen

@ -1,4 +1,4 @@
From 6aa657efe8c229a5f5a2af8f9d325a430f2eb2cf Mon Sep 17 00:00:00 2001
From d8659025421b5fd8ab7fbb2a32fe39689d5d49f0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 28 Mar 2016 20:46:14 -0400
Subject: [PATCH] Configurable Chunk Inhabited Timer
@ -23,10 +23,10 @@ index 9628c06..6eb0a2d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index c7452d9..e36525a 100644
index 63e11aa..74ffa66 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1402,7 +1402,7 @@ public class Chunk {
@@ -1405,7 +1405,7 @@ public class Chunk {
}
public long x() {

Datei anzeigen

@ -1,4 +1,4 @@
From 866f9fa9929d55a3d4bdd735a86e0206ee249bd9 Mon Sep 17 00:00:00 2001
From 800aec526783fdd35ccfe8a181c76f75ada3c11a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 12 May 2016 01:55:17 -0400
Subject: [PATCH] Do not mark chunks as active for neighbor updates
@ -6,13 +6,13 @@ Subject: [PATCH] Do not mark chunks as active for neighbor updates
Fixes chunk unload issues
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 3419d0f..a2d9f62 100644
index 0ee8a13..1ec820f 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1003,25 +1003,25 @@ public class Chunk {
}
@@ -1004,25 +1004,25 @@ public class Chunk {
// CraftBukkit end
world.timings.syncChunkLoadPostTimer.stopTiming(); // Paper
world.timings.syncChunkLoadPopulateNeighbors.startTiming(); // Paper
- Chunk chunk = ichunkprovider.getLoadedChunkAt(this.locX, this.locZ - 1);
- Chunk chunk1 = ichunkprovider.getLoadedChunkAt(this.locX + 1, this.locZ);
- Chunk chunk2 = ichunkprovider.getLoadedChunkAt(this.locX, this.locZ + 1);

Datei anzeigen

@ -1,4 +1,4 @@
From a3ff6a3ffa37d8816ce860c340635e410d2d0ed7 Mon Sep 17 00:00:00 2001
From 51da3caf6f0b0d7a6cdea101aa9c4a273726edf8 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 27 May 2016 21:41:26 -0400
Subject: [PATCH] Ensure Chunks never ever load async
@ -27,10 +27,10 @@ index 7b7a3d0..9aaca21 100644
public static void queueChunkLoad(World world, ChunkRegionLoader loader, ChunkProviderServer provider, int x, int z, Runnable runnable) {
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 3a95b44..229fa6c 100644
index b5efb9c..ef9529a 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -33,8 +33,8 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
@@ -35,8 +35,8 @@ class ChunkIOProvider implements AsynchronousExecutor.CallBackProvider<QueuedChu
// sync stuff
public void callStage2(QueuedChunk queuedChunk, Chunk chunk) throws RuntimeException {

Datei anzeigen

@ -1,4 +1,4 @@
From e9f787942513485cd1e634bc16689a7dc5cf55f4 Mon Sep 17 00:00:00 2001
From b2b83ce857f36558201df4545b39d92511d9dc85 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 21 Jun 2016 22:54:34 -0400
Subject: [PATCH] Fix Double World Add issues
@ -8,10 +8,10 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added.
Also add debug if something else tries to, and abort before world gets bad state
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index d68bd28..978e7ab 100644
index eb36e1f..3a46a0a 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -527,7 +527,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@@ -523,7 +523,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
}
public static void a(Entity entity, World world, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {