mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@05ed6a6 Fix priority scheduling logic PaperMC/Paper@967f98a Optimise chunk tick checking during chunk tick PaperMC/Paper@00b949f Remove Moonrise utils to MCUtils, remove duplicated/unused utils PaperMC/Paper@4efd24b Remove unused chunk system hooks in MCUtils PaperMC/Paper@b653276 Finish chunk tick iteration optimisation port from Moonrise PaperMC/Paper@2df5bba Log throwable when failing to save chunk/poi/entity data PaperMC/Paper@44c3dd0 fix exact choice shapeless recipes (#10973)
This commit is contained in:
@@ -83,7 +83,7 @@ index e9775b4506909bee65a74964f0d5391a0513de1d..684f7f202305c09b1037c5d38a52a5ea
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791e9ecf3a6 100644
|
||||
index 20d6d433925312a5894d9d6628ec3c39483ef4d2..a4c6b7342c0cc2d8017561645d25f94571167765 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -422,13 +422,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -186,9 +186,9 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
- this.profiler.pop();
|
||||
+ //this.profiler.pop(); // Purpur
|
||||
// Paper end - Incremental chunk and player saving
|
||||
io.papermc.paper.util.CachedLists.reset(); // Paper
|
||||
// Paper start - move executeAll() into full server tick timing
|
||||
@@ -1655,7 +1655,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
//try (co.aikar.timings.Timing ignored = MinecraftTimings.processTasksTimer.startTiming()) { // Purpur
|
||||
@@ -1654,7 +1654,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
long remaining = (TICK_TIME - (endTime - lastTick)) - catchupTime;
|
||||
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||
// Paper end - Server Tick Events
|
||||
@@ -197,7 +197,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
long j = Util.getNanos() - i;
|
||||
int k = this.tickCount % 100;
|
||||
|
||||
@@ -1669,7 +1669,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1668,7 +1668,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickTimes60s.add(this.tickCount, j);
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
this.logTickMethodTime(i);
|
||||
@@ -206,7 +206,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
//co.aikar.timings.TimingsManager.FULL_SERVER_TICK.stopTiming(); // Paper // Purpur
|
||||
}
|
||||
@@ -1760,11 +1760,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1759,11 +1759,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
// Paper end - Folia scheduler API
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.CALLBACK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
@@ -220,7 +220,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
//Iterator iterator = this.getAllLevels().iterator(); // Paper - Throw exception on world create while being ticked; moved down
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -1807,20 +1807,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1806,20 +1806,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worldserver.updateLagCompensationTick(); // Paper - lag compensation
|
||||
worldserver.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur
|
||||
|
||||
@@ -246,7 +246,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
|
||||
try {
|
||||
//worldserver.timings.doTick.startTiming(); // Spigot // Purpur
|
||||
@@ -1833,17 +1833,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1832,17 +1832,17 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
//MinecraftTimings.playerListTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
this.playerList.tick();
|
||||
//MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
@@ -1851,7 +1851,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1850,7 +1850,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
GameTestTicker.SINGLETON.tick();
|
||||
}
|
||||
|
||||
@@ -277,7 +277,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
|
||||
//MinecraftTimings.tickablesTimer.startTiming(); // Spigot // Paper // Purpur
|
||||
for (int i = 0; i < this.tickables.size(); ++i) {
|
||||
@@ -1859,7 +1859,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1858,7 +1858,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
//MinecraftTimings.tickablesTimer.stopTiming(); // Spigot // Paper // Purpur
|
||||
|
||||
@@ -286,7 +286,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
iterator = this.playerList.getPlayers().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1869,7 +1869,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1868,7 +1868,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
entityplayer.connection.resumeFlushing();
|
||||
}
|
||||
|
||||
@@ -295,7 +295,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
}
|
||||
|
||||
private void synchronizeTime(ServerLevel world) {
|
||||
@@ -1877,7 +1877,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1876,7 +1876,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void forceTimeSynchronization() {
|
||||
@@ -304,7 +304,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1886,7 +1886,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1885,7 +1885,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.synchronizeTime(worldserver);
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
}
|
||||
|
||||
public boolean isLevelEnabled(Level world) {
|
||||
@@ -2598,6 +2598,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2597,6 +2597,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public ProfilerFiller getProfiler() {
|
||||
@@ -321,7 +321,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
return this.profiler;
|
||||
}
|
||||
|
||||
@@ -2844,7 +2845,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2843,7 +2844,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit end
|
||||
|
||||
private void startMetricsRecordingTick() {
|
||||
@@ -330,7 +330,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(Util.timeSource, this.isDedicatedServer()), Util.timeSource, Util.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
|
||||
this.executeBlocking(() -> {
|
||||
this.saveDebugReport(path.resolve("server"));
|
||||
@@ -2854,40 +2855,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2853,40 +2854,40 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.willStartRecordingMetrics = false;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ index a7554d272d13747bed32ce4190b58151b106f7e4..0852e14cbb194bd524147ec443eb2791
|
||||
}
|
||||
|
||||
public Path getWorldPath(LevelResource worldSavePath) {
|
||||
@@ -2940,15 +2941,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2939,15 +2940,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public boolean isTimeProfilerRunning() {
|
||||
@@ -449,10 +449,10 @@ index 9cd4f7c6910727c849ac7f5d675dc6105c4bbba2..4e4b7f2a6d7ed92a2ce06e566186027c
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
index 5d52df83c643845ffbeeba3bb640c9deeae11139..4f02f8b6003580fc178991cbece8ad438efd15cb 100644
|
||||
index d518d5bd510050291a19f0ccfaf625505bb74518..989ba0fa3b928866d5a7163d1663d30d276e1264 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -425,16 +425,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -392,16 +392,16 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
}
|
||||
|
||||
protected void tick(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -474,10 +474,10 @@ index 5d52df83c643845ffbeeba3bb640c9deeae11139..4f02f8b6003580fc178991cbece8ad43
|
||||
|
||||
public boolean hasWork() {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82db46df15 100644
|
||||
index 84a66167e0e8e933c2c0051aae4c68d698b57738..74453c9f81f8c2c0dec96d25ccf2cb3449a73899 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
||||
@@ -381,26 +381,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -380,26 +380,26 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
|
||||
// CraftBukkit start - modelled on below
|
||||
public void purgeUnload() {
|
||||
@@ -509,7 +509,7 @@ index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82
|
||||
if (tickChunks) {
|
||||
//this.level.timings.chunks.startTiming(); // Paper - timings // Purpur
|
||||
((ca.spottedleaf.moonrise.patches.chunk_system.level.ChunkSystemServerLevel)this.level).moonrise$getPlayerChunkLoader().tick(); // Paper - rewrite chunk system
|
||||
@@ -410,10 +410,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -409,10 +409,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
|
||||
//this.level.timings.doChunkUnload.startTiming(); // Spigot // Purpur
|
||||
@@ -522,7 +522,7 @@ index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82
|
||||
this.clearCache();
|
||||
}
|
||||
|
||||
@@ -424,10 +424,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -423,10 +423,10 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
|
||||
this.lastInhabitedUpdate = i;
|
||||
if (!this.level.isDebug()) {
|
||||
@@ -533,11 +533,11 @@ index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82
|
||||
- gameprofilerfiller.push("filteringLoadedChunks");
|
||||
+ //gameprofilerfiller.push("pollingChunks"); // Purpur
|
||||
+ //gameprofilerfiller.push("filteringLoadedChunks"); // Purpur
|
||||
List<ServerChunkCache.ChunkAndHolder> list = Lists.newArrayListWithCapacity(this.chunkMap.size());
|
||||
Iterator iterator = this.chunkMap.getChunks().iterator();
|
||||
//if (this.level.getServer().tickRateManager().runsNormally()) this.level.timings.chunkTicks.startTiming(); // Paper // Purpur
|
||||
@@ -442,7 +442,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
// Paper start - chunk tick iteration optimisations
|
||||
List<ServerChunkCache.ChunkAndHolder> list;
|
||||
{
|
||||
@@ -452,7 +452,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
// Paper - chunk tick iteration optimisations
|
||||
|
||||
if (this.level.tickRateManager().runsNormally()) {
|
||||
- gameprofilerfiller.popPush("naturalSpawnCount");
|
||||
@@ -545,7 +545,7 @@ index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82
|
||||
//this.level.timings.countNaturalMobs.startTiming(); // Paper - timings // Purpur
|
||||
int k = this.distanceManager.getNaturalSpawnChunkCount();
|
||||
// Paper start - Optional per player mob spawns
|
||||
@@ -471,7 +471,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -481,7 +481,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
// this.level.timings.countNaturalMobs.stopTiming(); // Paper - timings // Purpur
|
||||
|
||||
this.lastSpawnState = spawnercreature_d;
|
||||
@@ -553,8 +553,8 @@ index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82
|
||||
+ //gameprofilerfiller.popPush("spawnAndTick"); // Purpur
|
||||
boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
|
||||
|
||||
Util.shuffle(list, this.level.random);
|
||||
@@ -511,7 +511,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
if (!this.level.paperConfig().entities.spawning.perPlayerMobSpawns) Util.shuffle(list, this.level.random); // Paper - per player mob spawns - do not need this when per-player is enabled
|
||||
@@ -521,7 +521,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
//this.level.timings.chunkTicks.stopTiming(); // Paper // Purpur
|
||||
|
||||
@@ -563,17 +563,19 @@ index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82
|
||||
if (flag) {
|
||||
//try (co.aikar.timings.Timing ignored = this.level.timings.miscMobSpawning.startTiming()) { // Paper - timings // Purpur
|
||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||
@@ -519,14 +519,14 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -529,7 +529,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
}
|
||||
|
||||
- gameprofilerfiller.popPush("broadcast");
|
||||
+ //gameprofilerfiller.popPush("broadcast"); // Purpur
|
||||
list.forEach((chunkproviderserver_a1) -> {
|
||||
//this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Purpur
|
||||
chunkproviderserver_a1.holder.broadcastChanges(chunkproviderserver_a1.chunk);
|
||||
//this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Purpur
|
||||
});
|
||||
// Paper start - chunk tick iteration optimisations
|
||||
//this.level.timings.broadcastChunkUpdates.startTiming(); // Paper - timing // Purpur
|
||||
{
|
||||
@@ -547,8 +547,8 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
}
|
||||
//this.level.timings.broadcastChunkUpdates.stopTiming(); // Paper - timing // Purpur
|
||||
// Paper end - chunk tick iteration optimisations
|
||||
- gameprofilerfiller.pop();
|
||||
- gameprofilerfiller.pop();
|
||||
+ //gameprofilerfiller.pop(); // Purpur
|
||||
@@ -581,7 +583,7 @@ index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82
|
||||
}
|
||||
}
|
||||
|
||||
@@ -707,7 +707,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
@@ -729,7 +729,7 @@ public class ServerChunkCache extends ChunkSource implements ca.spottedleaf.moon
|
||||
|
||||
@Override
|
||||
protected void doRunTask(Runnable task) {
|
||||
@@ -591,10 +593,10 @@ index bb7e02af46ecd313debcfb778d3390ad5f2c3991..01683897aa15cd280f28a26057237e82
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845b7a8189d 100644
|
||||
index 270986af40f1f91448cb6d1ab1560d2efc0b3e99..a4ea3eca166510e05bc53504d2f1040e3bead39a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -669,16 +669,16 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -688,16 +688,16 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
}
|
||||
|
||||
public void tick(BooleanSupplier shouldKeepTicking) {
|
||||
@@ -614,7 +616,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
this.advanceWeatherCycle();
|
||||
}
|
||||
|
||||
@@ -710,30 +710,30 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -729,30 +729,30 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
this.tickTime();
|
||||
}
|
||||
|
||||
@@ -652,7 +654,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
if (flag) {
|
||||
// this.timings.doSounds.startTiming(); // Spigot // Purpur
|
||||
this.runBlockEvents();
|
||||
@@ -741,7 +741,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -760,7 +760,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
}
|
||||
|
||||
this.handlingTick = false;
|
||||
@@ -661,7 +663,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
boolean flag1 = !paperConfig().unsupportedSettings.disableWorldTickingWhenEmpty || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players // Paper - restore this
|
||||
|
||||
if (flag1) {
|
||||
@@ -749,12 +749,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -768,12 +768,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
}
|
||||
|
||||
if (flag1 || this.emptyTime++ < 300) {
|
||||
@@ -677,7 +679,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
}
|
||||
|
||||
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
||||
@@ -764,9 +764,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -783,9 +783,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
if (false && this.shouldDiscardEntity(entity)) { // CraftBukkit - We prevent spawning in general, so this butchering is not needed
|
||||
entity.discard();
|
||||
} else if (!tickratemanager.isEntityFrozen(entity)) {
|
||||
@@ -689,7 +691,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
if (true || this.chunkSource.chunkMap.getDistanceManager().inEntityTickingRange(entity.chunkPosition().toLong())) { // Paper - rewrite chunk system
|
||||
Entity entity1 = entity.getVehicle();
|
||||
|
||||
@@ -778,22 +778,22 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -797,22 +797,22 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
entity.stopRiding();
|
||||
}
|
||||
|
||||
@@ -717,7 +719,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -926,9 +926,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -945,9 +945,9 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
boolean flag = this.isRaining();
|
||||
int j = chunkcoordintpair.getMinBlockX();
|
||||
int k = chunkcoordintpair.getMinBlockZ();
|
||||
@@ -729,7 +731,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder
|
||||
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
||||
|
||||
@@ -965,7 +965,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -984,7 +984,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
}
|
||||
}
|
||||
|
||||
@@ -738,7 +740,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
|
||||
if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
|
||||
for (int l = 0; l < randomTickSpeed; ++l) {
|
||||
@@ -975,14 +975,14 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -994,14 +994,14 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
}
|
||||
} // Paper - Option to disable ice and snow
|
||||
|
||||
@@ -755,7 +757,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -1328,19 +1328,19 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -1347,19 +1347,19 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
//try { // Purpur
|
||||
// Paper end - timings
|
||||
entity.setOldPosAndRot();
|
||||
@@ -780,7 +782,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
//} finally { timer.stopTiming(); } // Paper - timings // Purpur
|
||||
Iterator iterator = entity.getPassengers().iterator();
|
||||
|
||||
@@ -1369,12 +1369,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -1388,12 +1388,12 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
// Paper end
|
||||
passenger.setOldPosAndRot();
|
||||
++passenger.tickCount;
|
||||
@@ -797,7 +799,7 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
// Paper start - EAR 2
|
||||
if (isActive) {
|
||||
passenger.rideTick();
|
||||
@@ -1386,7 +1386,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
@@ -1405,7 +1405,7 @@ public class ServerLevel extends Level implements WorldGenLevel, ca.spottedleaf.
|
||||
vehicle.positionRider(passenger);
|
||||
}
|
||||
// Paper end - EAR 2
|
||||
@@ -807,10 +809,10 @@ index 17022327262157ad1520fb7d4fc187c8f1da00c2..665d45ba1129a72a1fb393d524bfa845
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 2021e6db4864b5e20a6483605e6372de2efaba4d..7c7124f6b5911d4fa63af03f018323b6032a06a4 100644
|
||||
index 69b57105a7c8dccf46fe7a09c204fcf490e2fda9..7d586111996a4f7ad9437cb45c41c5e01aa7c7d0 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1401,7 +1401,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
|
||||
@@ -1398,7 +1398,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
|
||||
this.unsetRemoved();
|
||||
*/
|
||||
// CraftBukkit end
|
||||
@@ -819,7 +821,7 @@ index 2021e6db4864b5e20a6483605e6372de2efaba4d..7c7124f6b5911d4fa63af03f018323b6
|
||||
if (worldserver != null && resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit - empty to fall through to null to event
|
||||
this.enteredNetherPosition = this.position();
|
||||
}
|
||||
@@ -1417,8 +1417,8 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
|
||||
@@ -1414,8 +1414,8 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
|
||||
worldserver = ((CraftWorld) exit.getWorld()).getHandle();
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -830,7 +832,7 @@ index 2021e6db4864b5e20a6483605e6372de2efaba4d..7c7124f6b5911d4fa63af03f018323b6
|
||||
// CraftBukkit start
|
||||
this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
|
||||
LevelData worlddata = worldserver.getLevelData();
|
||||
@@ -1436,7 +1436,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
|
||||
@@ -1433,7 +1433,7 @@ public class ServerPlayer extends net.minecraft.world.entity.player.Player imple
|
||||
this.connection.teleport(exit); // CraftBukkit - use internal teleport without event
|
||||
this.connection.resetPosition();
|
||||
worldserver.addDuringTeleport(this);
|
||||
@@ -1066,7 +1068,7 @@ index a715ecf4a8ac91d3e5e5c6269d89e54b2c1cd279..223c3665126c576eddb1a8f7c9f5bc60
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 9c294bb8ae3cb9ec18ed633821c64c38bad50e95..42ff02305e9eedb0a7c4a3b25106eb98776696a4 100644
|
||||
index bf4cfa2269769cbaf1fdd2189a877fd3558c8372..cc880364db02e0e648880b4d235572779c10cbf3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -880,7 +880,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
@@ -1386,7 +1388,7 @@ index 6dfb13eef96ff43d368cd8163ae5883571cec604..a07cadcbd73f7058a5cf8535fb317ac0
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
index 74d4f653d5c7f1923c59019effd78337402f7025..b4e4670536f6dcea109c029d75d9710cb386f1d0 100644
|
||||
index 9bdbf3e9453bc3ce96d52d04b8cde0d05f7356d8..ff8fc5f0202b6176afef51e5b591fa6b7e4faee5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/GoalSelector.java
|
||||
@@ -87,8 +87,8 @@ public class GoalSelector {
|
||||
@@ -1794,7 +1796,7 @@ index a248d859cbce48f4a34c4771a7acffc17d7edc84..4ce32603dcd691e018a3e1962311d2ac
|
||||
|
||||
if (this.fire) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 342c8a114b9063b2fa959aae22cdd2c0d412c50d..ba2254ef7688177eff2ed8115726b7b551620560 100644
|
||||
index 9dd8378099b1ece5657adf1677f988ca331899b1..ed313b0424b2e1e1335ee3e3bd4d9cfd15f24b39 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -269,7 +269,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable, ca.spottedl
|
||||
@@ -1863,7 +1865,7 @@ index 342c8a114b9063b2fa959aae22cdd2c0d412c50d..ba2254ef7688177eff2ed8115726b7b5
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 2812505185df691e8f08932aa0bba162a7d9db86..35e94c06361795d032f995e8282f8b35c075dae7 100644
|
||||
index 735f39fed209e086a52185565f8bd6873c0b8d6e..4dc060bc677984d91a30a88155c576d5e187aa1b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -127,7 +127,7 @@ public final class NaturalSpawner {
|
||||
@@ -1885,10 +1887,10 @@ index 2812505185df691e8f08932aa0bba162a7d9db86..35e94c06361795d032f995e8282f8b35
|
||||
|
||||
// Paper start - Add mobcaps commands
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 8d48dbd43f29c6ccf268ae2f52f2b75a559c108d..7411e3d132dddde4599c182384f317679de1f2bf 100644
|
||||
index c68a3ab2129d4eba7f7c08b811fe3461d86ebd97..3ec4ba40f6ff44365eaa4b33ac447c191670f259 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -372,11 +372,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -383,11 +383,11 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
if (LightEngine.hasDifferentLightProperties(this, blockposition, iblockdata1, iblockdata)) {
|
||||
ProfilerFiller gameprofilerfiller = this.level.getProfiler();
|
||||
|
||||
@@ -1903,7 +1905,7 @@ index 8d48dbd43f29c6ccf268ae2f52f2b75a559c108d..7411e3d132dddde4599c182384f31767
|
||||
}
|
||||
|
||||
boolean flag3 = iblockdata1.hasBlockEntity();
|
||||
@@ -1007,9 +1007,9 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -1018,9 +1018,9 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
|
||||
if (LevelChunk.this.isTicking(blockposition)) {
|
||||
try {
|
||||
@@ -1915,7 +1917,7 @@ index 8d48dbd43f29c6ccf268ae2f52f2b75a559c108d..7411e3d132dddde4599c182384f31767
|
||||
//this.blockEntity.tickTimer.startTiming(); // Spigot // Purpur
|
||||
BlockState iblockdata = LevelChunk.this.getBlockState(blockposition);
|
||||
|
||||
@@ -1026,7 +1026,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -1037,7 +1037,7 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
// Paper end - Remove the Block Entity if it's invalid
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user