mirror of
https://github.com/BX-Team/DivineMC.git
synced 2025-12-19 14:59:25 +00:00
cleanup
This commit is contained in:
@@ -130,10 +130,10 @@ index b06c2c4aa77edafb374f7cf0406cf4d29c6e7f9f..c3ac5ba5d8084fefc0e9f58b09b521ef
|
||||
String awtException = io.papermc.paper.util.ServerEnvironment.awtDependencyCheck();
|
||||
if (awtException != null) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index d651ddade8a460c25f4f8d70822d9ef69f1acb4b..8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19 100644
|
||||
index 3de43e4edb33bb2c657a315ad2676ce44ee3bd6a..2d01252a66e59f69ff69055b83d7e881f2f3e5cd 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1177,6 +1177,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1184,6 +1184,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
protected void runServer() {
|
||||
try {
|
||||
|
||||
@@ -213,7 +213,7 @@ index 18071dcc69cc28471dddb7de94e803ec1e5fc2e4..aa25f5ebaf7d1b22825b962b02dcae02
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe2fb61f6d 100644
|
||||
index 2d01252a66e59f69ff69055b83d7e881f2f3e5cd..824f9200b66639ad1e3e821c8ae2ea4c66fe0b30 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -114,19 +114,8 @@ import net.minecraft.util.TimeUtil;
|
||||
@@ -250,7 +250,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
private ServerConnectionListener connection;
|
||||
public final ChunkProgressListenerFactory progressListenerFactory;
|
||||
@Nullable
|
||||
@@ -993,9 +975,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1000,9 +982,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
shutdownThread = Thread.currentThread(); // Paper - Improved watchdog support
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper - Improved watchdog support
|
||||
// CraftBukkit end
|
||||
@@ -260,7 +260,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
|
||||
LOGGER.info("Stopping server");
|
||||
Commands.COMMAND_SENDING_POOL.shutdownNow(); // Paper - Perf: Async command map building; Shutdown and don't bother finishing
|
||||
@@ -1268,50 +1247,38 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1275,50 +1254,38 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Spigot end
|
||||
|
||||
boolean flag = l == 0L;
|
||||
@@ -336,7 +336,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
this.isReady = true;
|
||||
JvmProfiler.INSTANCE.onServerTick(this.smoothedTickTimeMillis);
|
||||
}
|
||||
@@ -1483,7 +1450,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1490,7 +1457,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void doRunTask(TickTask task) {
|
||||
@@ -344,7 +344,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
super.doRunTask(task);
|
||||
}
|
||||
|
||||
@@ -1573,12 +1539,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1580,12 +1546,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.ticksUntilAutosave--;
|
||||
// Paper start - Incremental chunk and player saving
|
||||
@@ -357,7 +357,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
final boolean fullSave = autosavePeriod > 0 && this.tickCount % autosavePeriod == 0;
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@@ -1593,10 +1557,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1600,10 +1564,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
this.runAllTasks(); // Paper - move runAllTasks() into full server tick (previously for timings)
|
||||
this.server.spark.executeMainThreadTasks(); // Paper - spark
|
||||
// Paper start - Server Tick Events
|
||||
@@ -1605,7 +1567,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1612,7 +1574,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
new com.destroystokyo.paper.event.server.ServerTickEndEvent(this.tickCount, ((double)(endTime - lastTick) / 1000000D), remaining).callEvent();
|
||||
// Paper end - Server Tick Events
|
||||
this.server.spark.tickEnd(((double)(endTime - lastTick) / 1000000D)); // Paper - spark
|
||||
@@ -376,7 +376,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
long l = Util.getNanos() - nanos;
|
||||
int i1 = this.tickCount % 100;
|
||||
this.aggregatedTickTimesNanos = this.aggregatedTickTimesNanos - this.tickTimesNanos[i1];
|
||||
@@ -1618,16 +1579,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1625,16 +1586,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.tickTimes60s.add(this.tickCount, l);
|
||||
// Paper end - Add tick times API and /mspt command
|
||||
this.logTickMethodTime(nanos);
|
||||
@@ -393,7 +393,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
LOGGER.debug("Autosave finished");
|
||||
}
|
||||
|
||||
@@ -1695,7 +1652,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1702,7 +1659,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public final io.papermc.paper.threadedregions.EntityScheduler.EntitySchedulerTickList entitySchedulerTickList = new io.papermc.paper.threadedregions.EntityScheduler.EntitySchedulerTickList(); // Paper - optimise Folia entity scheduler
|
||||
|
||||
protected void tickChildren(BooleanSupplier hasTimeLeft) {
|
||||
@@ -401,7 +401,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
this.getPlayerList().getPlayers().forEach(serverPlayer1 -> serverPlayer1.connection.suspendFlushing());
|
||||
this.server.getScheduler().mainThreadHeartbeat(); // CraftBukkit
|
||||
// Paper start - optimise Folia entity scheduler
|
||||
@@ -1710,9 +1666,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1717,9 +1673,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// Paper end - optimise Folia entity scheduler
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.ADVENTURE_CLICK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
io.papermc.paper.adventure.providers.ClickCallbackProviderImpl.DIALOG_CLICK_MANAGER.handleQueue(this.tickCount); // Paper
|
||||
@@ -411,7 +411,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
|
||||
// CraftBukkit start
|
||||
// Run tasks that are waiting on processing
|
||||
@@ -1748,17 +1702,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1755,17 +1709,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
serverLevel.updateLagCompensationTick(); // Paper - lag compensation
|
||||
net.minecraft.world.level.block.entity.HopperBlockEntity.skipHopperEvents = serverLevel.paperConfig().hopper.disableMoveEvent || org.bukkit.event.inventory.InventoryMoveItemEvent.getHandlerList().getRegisteredListeners().length == 0; // Paper - Perf: Optimize Hoppers
|
||||
serverLevel.hasRidableMoveEvent = org.purpurmc.purpur.event.entity.RidableMoveEvent.getHandlerList().getRegisteredListeners().length > 0; // Purpur - Ridables
|
||||
@@ -429,7 +429,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
try {
|
||||
serverLevel.tick(hasTimeLeft);
|
||||
} catch (Throwable var7) {
|
||||
@@ -1767,34 +1716,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1774,34 +1723,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
throw new ReportedException(crashReport);
|
||||
}
|
||||
|
||||
@@ -464,7 +464,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
}
|
||||
|
||||
public void tickConnection() {
|
||||
@@ -1810,14 +1749,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1817,14 +1756,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void forceTimeSynchronization() {
|
||||
@@ -479,7 +479,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
}
|
||||
|
||||
public boolean isLevelEnabled(Level level) {
|
||||
@@ -2633,55 +2567,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2640,55 +2574,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
@@ -535,7 +535,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
public Path getWorldPath(LevelResource levelResource) {
|
||||
return this.storageSource.getLevelPath(levelResource);
|
||||
}
|
||||
@@ -2731,24 +2616,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2738,24 +2623,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.isSaving;
|
||||
}
|
||||
|
||||
@@ -560,7 +560,7 @@ index 8fce263f8cab4e0ff2ee6fe4fd9e46bbd0bbde19..6498455c4c2838cbee743f016d8be1fe
|
||||
public int getMaxChainedNeighborUpdates() {
|
||||
return 1000000;
|
||||
}
|
||||
@@ -2858,55 +2725,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2865,55 +2732,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
}
|
||||
|
||||
@@ -1128,7 +1128,7 @@ index 4221af18f5087badb5cd8c7cf66ab3312edf0394..e9d861182439eecacfab2ac431726e8a
|
||||
ChunkPyramid chunkPyramid = needsGeneration ? ChunkPyramid.GENERATION_PYRAMID : ChunkPyramid.LOADING_PYRAMID;
|
||||
return chunkPyramid.getStepTo(this.targetStatus).getAccumulatedRadiusOf(status);
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index eb352aa4296abc3ed4cf31c590bc0be66daf4de3..edda52a8430386238be4963e8ea2406f0c2d4df3 100644
|
||||
index 6c648f2395b2f00180a71a4f6b50a6be51970d39..c0d996fb99f053863ce623889add3feb70d7137d 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -62,8 +62,6 @@ import net.minecraft.util.CsvOutput;
|
||||
@@ -4006,7 +4006,7 @@ index 39a604c9a53930b53d959b1d2eb504aa964e9a58..0d0380e3955836ce125f777841477503
|
||||
|
||||
@Override
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 310d5aabf282ef62432b496065447f055b45af18..0171befef713e89d9241c7735d5d285b23373e8f 100644
|
||||
index b50753d2316afa4a59799e49e985642977a24813..5bc7f37290eb99145a2ea3e40d31180f3494979b 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -80,8 +80,6 @@ import net.minecraft.tags.TagKey;
|
||||
@@ -4920,7 +4920,7 @@ index 07d7c4737635f671f33b8f73001d67928fc75782..f2c82217811712625df594667330a73f
|
||||
LOGGER.info("Loaded {} recipes", object.values().size());
|
||||
}
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 1ad419b4a2ad4610a0a8d18b26665a7ec0ccc960..4c1ce7e85f9c3315635472047ffaf15a711aeffd 100644
|
||||
index 2c60b1c8ecb54c4c9526a2b2f6e6698b77359065..abf90aabf47f1bac805b2d40585c2e3c41b5cfe9 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -35,8 +35,6 @@ import net.minecraft.util.AbortableIterationConsumer;
|
||||
@@ -4957,15 +4957,15 @@ index 1ad419b4a2ad4610a0a8d18b26665a7ec0ccc960..4c1ce7e85f9c3315635472047ffaf15a
|
||||
this.tickingBlockEntities = true;
|
||||
if (!this.pendingBlockEntityTickers.isEmpty()) {
|
||||
this.blockEntityTickers.addAll(this.pendingBlockEntityTickers);
|
||||
@@ -1529,7 +1523,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
this.blockEntityTickers.removeAll(toRemove); // Paper - Fix MC-117075
|
||||
@@ -1527,7 +1521,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
this.blockEntityTickers.removeMarkedEntries(); // DivineMC - optimize block entity removals - Fix MC-117075
|
||||
|
||||
this.tickingBlockEntities = false;
|
||||
- profilerFiller.pop();
|
||||
this.spigotConfig.currentPrimedTnt = 0; // Spigot
|
||||
}
|
||||
|
||||
@@ -1781,7 +1774,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1779,7 +1772,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
|
||||
@Override
|
||||
public List<Entity> getEntities(@Nullable Entity entity, AABB boundingBox, Predicate<? super Entity> predicate) {
|
||||
@@ -4973,7 +4973,7 @@ index 1ad419b4a2ad4610a0a8d18b26665a7ec0ccc960..4c1ce7e85f9c3315635472047ffaf15a
|
||||
List<Entity> list = Lists.newArrayList();
|
||||
|
||||
// Paper start - rewrite chunk system
|
||||
@@ -1810,8 +1802,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1808,8 +1800,6 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
public <T extends Entity> void getEntities(final EntityTypeTest<Entity, T> entityTypeTest,
|
||||
final AABB boundingBox, final Predicate<? super T> predicate,
|
||||
final List<? super T> into, final int maxCount) {
|
||||
@@ -5039,7 +5039,7 @@ index b80924fbe054b00fe5117df896358e330f41e993..1669c21534a453c9cf16b992df7a6bf2
|
||||
|
||||
if (this.fire) {
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 75578e6ed7233a03d9b6cd3c6d3997f1c6148392..b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6 100644
|
||||
index 8345405116202b59055f5343fc26b82f48008050..dbb4142ea38cdf484e74c81103cebb024ae8813d 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -24,8 +24,6 @@ import net.minecraft.network.protocol.game.ClientboundLevelChunkPacketData;
|
||||
@@ -5051,7 +5051,7 @@ index 75578e6ed7233a03d9b6cd3c6d3997f1c6148392..b88254fb3c12b99684c6ede1ae8a6671
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.level.ChunkPos;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -385,12 +383,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -392,12 +390,8 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
}
|
||||
|
||||
if (LightEngine.hasDifferentLightProperties(blockState, state)) {
|
||||
@@ -5064,7 +5064,7 @@ index 75578e6ed7233a03d9b6cd3c6d3997f1c6148392..b88254fb3c12b99684c6ede1ae8a6671
|
||||
}
|
||||
|
||||
boolean flag = !blockState.is(block);
|
||||
@@ -922,8 +916,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -929,8 +923,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
BlockPos blockPos = this.blockEntity.getBlockPos();
|
||||
if (LevelChunk.this.isTicking(blockPos)) {
|
||||
try {
|
||||
@@ -5073,7 +5073,7 @@ index 75578e6ed7233a03d9b6cd3c6d3997f1c6148392..b88254fb3c12b99684c6ede1ae8a6671
|
||||
BlockState blockState = LevelChunk.this.getBlockState(blockPos);
|
||||
if (this.blockEntity.getType().isValid(blockState)) {
|
||||
this.ticker.tick(LevelChunk.this.level, this.blockEntity.getBlockPos(), blockState, this.blockEntity);
|
||||
@@ -937,8 +929,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -944,8 +936,6 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
}
|
||||
// Paper end - Remove the Block Entity if it's invalid
|
||||
}
|
||||
@@ -5115,7 +5115,7 @@ index 81de6c1bbef1cafd3036e736dd305fbedc8368c6..c2baadcdceb1df6a881d6f73aa4eb4dd
|
||||
// Paper end - Perf: remove streams and optimize collection
|
||||
}
|
||||
diff --git a/net/minecraft/world/ticks/LevelTicks.java b/net/minecraft/world/ticks/LevelTicks.java
|
||||
index 66abc2e7adee60fa98eed1ba36e018814fd02cad..0a9805d42142678ca5213c511235daa6505ddbf3 100644
|
||||
index 769037ecd67b2ed92067bba4e5f7ac9383c3d456..2f88649c398d7f60f10532eb6b36ce1c27bcbdcc 100644
|
||||
--- a/net/minecraft/world/ticks/LevelTicks.java
|
||||
+++ b/net/minecraft/world/ticks/LevelTicks.java
|
||||
@@ -23,8 +23,6 @@ import net.minecraft.Util;
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 6 Jul 2025 02:50:15 +0300
|
||||
Subject: [PATCH] Respawn players that were dead on server restart
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 6498455c4c2838cbee743f016d8be1fe2fb61f6d..141c19eb290080f762da1e2090dae0609f2e3575 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -971,6 +971,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
+ // DivineMC start - Respawn players that were dead on server restart
|
||||
+ for (ServerPlayer player : this.playerList.players) {
|
||||
+ if (player.isDeadOrDying() || (player.isRemoved() && player.getRemovalReason() == net.minecraft.world.entity.Entity.RemovalReason.KILLED)) {
|
||||
+ this.playerList.respawn(player, false, net.minecraft.world.entity.Entity.RemovalReason.KILLED, org.bukkit.event.player.PlayerRespawnEvent.RespawnReason.DEATH);
|
||||
+ }
|
||||
+ }
|
||||
+ // DivineMC end - Respawn players that were dead on server restart
|
||||
if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
|
||||
shutdownThread = Thread.currentThread(); // Paper - Improved watchdog support
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper - Improved watchdog support
|
||||
@@ -1,18 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 23 Feb 2025 01:03:59 +0300
|
||||
Subject: [PATCH] Configurable MC-67
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/entity/Entity.java b/net/minecraft/world/entity/Entity.java
|
||||
index 0171befef713e89d9241c7735d5d285b23373e8f..5bc7f37290eb99145a2ea3e40d31180f3494979b 100644
|
||||
--- a/net/minecraft/world/entity/Entity.java
|
||||
+++ b/net/minecraft/world/entity/Entity.java
|
||||
@@ -4198,6 +4198,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
||||
}
|
||||
|
||||
public boolean canTeleport(Level fromLevel, Level toLevel) {
|
||||
+ if (!fromLevel.divineConfig.allowEntityPortalWithPassenger && (this.isPassenger() || this.isVehicle())) return false; // DivineMC - Allow entity teleport with passenger
|
||||
if (!this.isAlive() || !this.valid) return false; // Paper - Fix item duplication and teleport issues
|
||||
if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) {
|
||||
for (Entity entity : this.getPassengers()) {
|
||||
@@ -5,10 +5,10 @@ Subject: [PATCH] Option to disable disconnect.spam
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index a63ade75461b68a780c56bfb5ff7c61f99f76744..fe7d68f3947bf55a389c73ef301fae8e396bf1da 100644
|
||||
index e269535609363528971268fdca9e6a6b70902608..637c5ca0c004e5de66bc3f84dba5fee47f729579 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -844,7 +844,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -846,7 +846,7 @@ public class ServerGamePacketListenerImpl
|
||||
public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
|
||||
// PacketUtils.ensureRunningOnSameThread(packet, this, this.player.level()); // Paper - AsyncTabCompleteEvent; run this async
|
||||
// CraftBukkit start
|
||||
@@ -17,7 +17,7 @@ index a63ade75461b68a780c56bfb5ff7c61f99f76744..fe7d68f3947bf55a389c73ef301fae8e
|
||||
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - Kick event cause // Paper - add proper async disconnect
|
||||
return;
|
||||
}
|
||||
@@ -856,7 +856,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -858,7 +858,7 @@ public class ServerGamePacketListenerImpl
|
||||
// Paper end - Don't suggest if tab-complete is disabled
|
||||
// Paper start
|
||||
final int index;
|
||||
@@ -26,7 +26,7 @@ index a63ade75461b68a780c56bfb5ff7c61f99f76744..fe7d68f3947bf55a389c73ef301fae8e
|
||||
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - add proper async disconnect
|
||||
return;
|
||||
}
|
||||
@@ -916,6 +916,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -918,6 +918,7 @@ public class ServerGamePacketListenerImpl
|
||||
ParseResults<CommandSourceStack> parseResults = this.server.getCommands().getDispatcher().parse(stringReader, this.player.createCommandSourceStack());
|
||||
// Paper start - Handle non-recoverable exceptions
|
||||
if (!parseResults.getExceptions().isEmpty()
|
||||
@@ -34,7 +34,7 @@ index a63ade75461b68a780c56bfb5ff7c61f99f76744..fe7d68f3947bf55a389c73ef301fae8e
|
||||
&& parseResults.getExceptions().values().stream().anyMatch(e -> e instanceof io.papermc.paper.brigadier.TagParseCommandSyntaxException)) {
|
||||
this.disconnect(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM);
|
||||
return;
|
||||
@@ -2629,6 +2630,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -2631,6 +2632,7 @@ public class ServerGamePacketListenerImpl
|
||||
// this.chatSpamThrottler.increment();
|
||||
if (!this.chatSpamThrottler.isIncrementAndUnderThreshold()
|
||||
// CraftBukkit end
|
||||
@@ -42,7 +42,7 @@ index a63ade75461b68a780c56bfb5ff7c61f99f76744..fe7d68f3947bf55a389c73ef301fae8e
|
||||
&& !this.server.getPlayerList().isOp(this.player.getGameProfile())
|
||||
&& !this.server.isSingleplayerOwner(this.player.getGameProfile())) {
|
||||
this.disconnectAsync(Component.translatable("disconnect.spam"), org.bukkit.event.player.PlayerKickEvent.Cause.SPAM); // Paper - kick event cause & add proper async disconnect
|
||||
@@ -3328,7 +3330,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3330,7 +3332,7 @@ public class ServerGamePacketListenerImpl
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
||||
// Paper start - auto recipe limit
|
||||
if (!org.bukkit.Bukkit.isPrimaryThread()) {
|
||||
@@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 6 Jul 2025 03:04:04 +0300
|
||||
Subject: [PATCH] Carpet-Fixes: Fix Slime Block Bounce Logic
|
||||
|
||||
This patch is based on the following mixins:
|
||||
* "carpetfixes/mixins/blockFixes/SlimeBlock_incorrectLogicMixin.java"
|
||||
By: fxmorin <28154542+fxmorin@users.noreply.github.com>
|
||||
As part of: carpet-fixes (https://github.com/fxmorin/carpet-fixes)
|
||||
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
||||
|
||||
Patch description:
|
||||
Fixes incorrect logic in the slimeblock bounce code which prevents some entities from bouncing.
|
||||
This bug in the slime code is due to onGround reversing the velocity, the best way to fix this issue is by
|
||||
setting onGround to true, only once the Y velocity is smaller than -0.15
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/SlimeBlock.java b/net/minecraft/world/level/block/SlimeBlock.java
|
||||
index f26c3100d0aad0227f016bfa4c86ac647e13485a..59c9e63e6d5634973cc4927eac479463cc486a4a 100644
|
||||
--- a/net/minecraft/world/level/block/SlimeBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SlimeBlock.java
|
||||
@@ -42,6 +42,7 @@ public class SlimeBlock extends HalfTransparentBlock {
|
||||
Vec3 deltaMovement = entity.getDeltaMovement();
|
||||
if (deltaMovement.y < 0.0) {
|
||||
double d = entity instanceof LivingEntity ? 1.0 : 0.8;
|
||||
+ if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixIncorrectBounceLogic) entity.setOnGround(deltaMovement.y > -0.15); // DivineMC - Carpet-Fixes: Fix Slime Block Bounce Logic
|
||||
entity.setDeltaMovement(deltaMovement.x, -deltaMovement.y * d, deltaMovement.z);
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,10 @@ Subject: [PATCH] Option to allow weird movement and disable teleporting
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index fe7d68f3947bf55a389c73ef301fae8e396bf1da..39b95d3736d5acd3b71675410469727be6405cd3 100644
|
||||
index 637c5ca0c004e5de66bc3f84dba5fee47f729579..1bd6368704665f90eaa621366b4dec21bc937a96 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -607,7 +607,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -609,7 +609,7 @@ public class ServerGamePacketListenerImpl
|
||||
return;
|
||||
}
|
||||
// Paper end - Prevent moving into unloaded chunks
|
||||
@@ -18,7 +18,7 @@ index fe7d68f3947bf55a389c73ef301fae8e396bf1da..39b95d3736d5acd3b71675410469727b
|
||||
// CraftBukkit end
|
||||
LOGGER.warn(
|
||||
"{} (vehicle of {}) moved too quickly! {},{},{}", rootVehicle.getName().getString(), this.player.getName().getString(), d3, d4, d5
|
||||
@@ -637,7 +637,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -639,7 +639,7 @@ public class ServerGamePacketListenerImpl
|
||||
d5 = d2 - rootVehicle.getZ();
|
||||
d7 = d3 * d3 + d4 * d4 + d5 * d5;
|
||||
boolean flag1 = false;
|
||||
@@ -27,7 +27,7 @@ index fe7d68f3947bf55a389c73ef301fae8e396bf1da..39b95d3736d5acd3b71675410469727b
|
||||
flag1 = true; // Paper - diff on change, this should be moved wrongly
|
||||
LOGGER.warn("{} (vehicle of {}) moved wrongly! {}", rootVehicle.getName().getString(), this.player.getName().getString(), Math.sqrt(d7));
|
||||
}
|
||||
@@ -1555,20 +1555,24 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1557,20 +1557,24 @@ public class ServerGamePacketListenerImpl
|
||||
if (this.shouldCheckPlayerMovement(isFallFlying)) {
|
||||
float f2 = isFallFlying ? 300.0F : 100.0F;
|
||||
if (d7 - d6 > Math.max(f2, Mth.square(org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed))) {
|
||||
@@ -63,7 +63,7 @@ index fe7d68f3947bf55a389c73ef301fae8e396bf1da..39b95d3736d5acd3b71675410469727b
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1629,6 +1633,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1631,6 +1635,7 @@ public class ServerGamePacketListenerImpl
|
||||
d7 = d3 * d3 + d4 * d4 + d5 * d5;
|
||||
boolean movedWrongly = false; // Paper - Add fail move event; rename
|
||||
if (!this.player.isChangingDimension()
|
||||
@@ -287,7 +287,7 @@ index 667ef5b2ab50eeb0491f7fe0bc8913ec29a4603a..a7c4fad2b1cb0cbac742a18d37d688bb
|
||||
if (packet == null || this.processedDisconnect) { // Spigot
|
||||
return;
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 7ed75ef10e3d4504cebb0ad544e05d9544642c9e..3165fd57f8f04251f220716beab49f6f43736eeb 100644
|
||||
index 2db120cd68447a4adc6f4ed6334fa52b8b55effc..84250c9786f4886fe4ab2e42808f8162da3f45d8 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -276,7 +276,7 @@ public abstract class PlayerList {
|
||||
@@ -299,7 +299,7 @@ index 7ed75ef10e3d4504cebb0ad544e05d9544642c9e..3165fd57f8f04251f220716beab49f6f
|
||||
)
|
||||
);
|
||||
player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
|
||||
@@ -1332,6 +1332,7 @@ public abstract class PlayerList {
|
||||
@@ -1333,6 +1333,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean verifyChatTrusted(PlayerChatMessage message) {
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Lag compensation
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 141c19eb290080f762da1e2090dae0609f2e3575..5a7cb4cffa218a17300c74ee4d95b08b705324ea 100644
|
||||
index 824f9200b66639ad1e3e821c8ae2ea4c66fe0b30..dd88e4d0f72a482e4feea38bc194fc16799adf02 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -288,6 +288,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -36,7 +36,7 @@ index 758ce439d2e10e6ef42a58d147a77093667e0acd..de622982f864d96a5b76efcd69f1836e
|
||||
new java.util.concurrent.LinkedBlockingQueue<>(),
|
||||
new com.google.common.util.concurrent.ThreadFactoryBuilder()
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 5a7cb4cffa218a17300c74ee4d95b08b705324ea..4a53105e46e338a52bc5ad22d51688a9a261d9e5 100644
|
||||
index dd88e4d0f72a482e4feea38bc194fc16799adf02..2baa4dc93bcc448ce65bae50ca39d41e562e2211 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2640,8 +2640,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -54,10 +54,10 @@ index 5a7cb4cffa218a17300c74ee4d95b08b705324ea..4a53105e46e338a52bc5ad22d51688a9
|
||||
|
||||
public ChatDecorator getChatDecorator() {
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 39b95d3736d5acd3b71675410469727be6405cd3..253eb728773ab09023e8db56bb6382d9e21a96b3 100644
|
||||
index 1bd6368704665f90eaa621366b4dec21bc937a96..7b10fe7cf66757ed68f9e39e03259700dfabf184 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -836,8 +836,11 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -838,8 +838,11 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
|
||||
// Paper start - AsyncTabCompleteEvent
|
||||
@@ -1,25 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Mon, 7 Jul 2025 03:44:35 +0300
|
||||
Subject: [PATCH] SparklyPaper: Reset dirty flag when loading maps from the
|
||||
disk
|
||||
|
||||
Original project: https://github.com/SparklyPower/SparklyPaper
|
||||
|
||||
Patch description:
|
||||
|
||||
By default, the server will start rewriting all map datas to the disk after loading it, even if the map didn't have any changes
|
||||
This also slows down world saving a lot if you have a lot of maps
|
||||
|
||||
diff --git a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
index 7bbeed6c998c91e68376d3f17a510d68e3cd0b27..ebb0b7e5047efa65e8b6986f12dd5a7d6c0e9613 100644
|
||||
--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -160,6 +160,7 @@ public class MapItemSavedData extends SavedData {
|
||||
}
|
||||
|
||||
this.vanillaRender.buffer = colors.array(); // Paper - Use Vanilla map renderer when possible
|
||||
+ this.setDirty(false); // DivineMC - SparklyPaper: Reset dirty flag when loading maps from the disk
|
||||
}
|
||||
|
||||
public static MapItemSavedData createFresh(
|
||||
@@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sat, 1 Feb 2025 19:52:39 +0300
|
||||
Subject: [PATCH] SparklyPaper: Optimize "canSee" checks
|
||||
|
||||
Original project: https://github.com/SparklyPower/SparklyPaper
|
||||
|
||||
Patch description:
|
||||
|
||||
The "canSee" checks is in a hot path, invoked by each entity for each player on the server if they are in tracking range, so optimizing it is pretty nice
|
||||
First, we change the original "HashMap" to fastutil's "Object2ObjectOpenHashMap", because the containsKey throughput is better
|
||||
Then, we add a "isEmpty()" check before attempting to check if the map contains something
|
||||
This seems stupid, but it does seem that it improves the performance a bit, and it makes sense, "containsKey(...)" does not attempt to check the map size before attempting to check if the map contains the key
|
||||
We also create a "canSee" method tailored for "ChunkMap#updatePlayer()", a method without the equals check (the "updatePlayer()" already checks if the entity is the same entity) because the CraftPlayer's `equals()` check is a *bit* expensive compared to only checking the object's identity, and because the identity has already been check, we don't need to check it twice.
|
||||
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index edda52a8430386238be4963e8ea2406f0c2d4df3..c0d996fb99f053863ce623889add3feb70d7137d 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1295,7 +1295,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
flag = flag && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
|
||||
// Paper end - Configurable entity tracking range by Y
|
||||
// CraftBukkit start - respect vanish API
|
||||
- if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { // Paper - only consider hits
|
||||
+ if (flag && !player.getBukkitEntity().canSeeChunkMapUpdatePlayer(this.entity.getBukkitEntity())) { // Paper - only consider hits // DivineMC - SparklyPaper: Optimize "canSee" checks
|
||||
flag = false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -399,10 +399,10 @@ index 78bf3365b426e7090182af84630111d410a2460e..3c1795eb56900cd80cfec38bd1d922d5
|
||||
}
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 253eb728773ab09023e8db56bb6382d9e21a96b3..42ab4f50d07539aafba120e863d5b9cfc5a436e8 100644
|
||||
index 7b10fe7cf66757ed68f9e39e03259700dfabf184..c537d22fd97225c1b6d58bed61add83a20d9be24 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1934,7 +1934,6 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -1936,7 +1936,6 @@ public class ServerGamePacketListenerImpl
|
||||
}
|
||||
|
||||
public void internalTeleport(PositionMoveRotation posMoveRotation, Set<Relative> relatives) {
|
||||
@@ -9,7 +9,7 @@ Original project: https://github.com/pufferfish-gg/Pufferfish
|
||||
This patch reduces the main-thread impact of mob spawning by moving spawning work to other threads
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 4a53105e46e338a52bc5ad22d51688a9a261d9e5..9bd7cc58cf10489f0e463347cdc2bc537f0509ec 100644
|
||||
index 2baa4dc93bcc448ce65bae50ca39d41e562e2211..a0cad0bdb8245b19f4ff983245d61d7b237a4042 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -289,6 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -82,7 +82,7 @@ index ac27ff24f018d8798921c5152e679ceed1e88d8d..ec7d1353b19e55b00c558df8981323ef
|
||||
List<org.bukkit.block.BlockState> states = new java.util.ArrayList<>(level.capturedBlockStates.values());
|
||||
level.capturedBlockStates.clear();
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 951199cb015694790ea8d81264779a7d294ab6ef..85f0abc2ead2d78a7189abaac8f803b70328a21b 100644
|
||||
index a0cad0bdb8245b19f4ff983245d61d7b237a4042..c56fa00f9443b6a3a44f0b89da9dcfb6a4faf1c8 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -290,6 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -513,7 +513,7 @@ index 1431a2e386bee22ec10365a38ead349a398d551f..77d1cab278a13e08ba8096af2c683b50
|
||||
// Paper end - Inventory close reason
|
||||
this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index 3165fd57f8f04251f220716beab49f6f43736eeb..df47a3dc31a01464088eba21f4139f63d69895e5 100644
|
||||
index 84250c9786f4886fe4ab2e42808f8162da3f45d8..cfe2bbc46046f144044d8cba67cda978f231d354 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -149,6 +149,7 @@ public abstract class PlayerList {
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] MSPT Tracking for each world
|
||||
|
||||
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 85f0abc2ead2d78a7189abaac8f803b70328a21b..432b4b981353fe8427f9675806500e43a080535c 100644
|
||||
index c56fa00f9443b6a3a44f0b89da9dcfb6a4faf1c8..57d401aa7801c8cd37921086c3349414d9f7af4f 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1677,7 +1677,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -20,7 +20,7 @@ index 4535858701b2bb232b9d2feb2af6551526232ddc..aa4dd7517e8be167aef1eaf7aa907e3c
|
||||
if (var4 instanceof ReportedException reportedException && reportedException.getCause() instanceof OutOfMemoryError) {
|
||||
throw makeReportedException(var4, packet, processor);
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 432b4b981353fe8427f9675806500e43a080535c..b6cfd764273a2102525a66955ab2217071d0154d 100644
|
||||
index 57d401aa7801c8cd37921086c3349414d9f7af4f..008530bf0f09180ba365fc514b51d22630564de2 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1686,6 +1686,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -396,7 +396,7 @@ index 654d03368f06ab9870c11745b0994ea6722fa7bf..7fcf9761c3af761e6d3e402fce2f9cbc
|
||||
this.level.tickCustomSpawners(this.spawnEnemies, this.spawnFriendlies);
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index 07138e724d46ecfd09aa75008428502fa01c05fc..d4841095157106c3c69501ac2cd09511f62cfea0 100644
|
||||
index f9091b2daf735fd0788f8d6d60e3c812fd6dd4f2..0ad18866c323308ad9b87322932e03a283f740b1 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -191,7 +191,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -10,7 +10,7 @@ Original project: https://github.com/LogisticsCraft/OcclusionCulling
|
||||
Original license: MIT
|
||||
|
||||
diff --git a/net/minecraft/server/level/ChunkMap.java b/net/minecraft/server/level/ChunkMap.java
|
||||
index a3290eb416ecb377d240bf334aef4e2b5e3bbefc..269c3312c1633faf48c1b471583ca71adfc8d2c6 100644
|
||||
index 7ca147cf9da67c399806056e5092841f7ca32321..a6bf257ca93e4b3819b65b4ef4ba71d9e2b40933 100644
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1421,7 +1421,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
|
||||
@@ -54,7 +54,7 @@ index 62b9d9486c15a1ec6527f786df4e9fc483390bcb..36d8b93182cc44e3bea245800ea9e271
|
||||
int i = buffer.readableBytes();
|
||||
if (i >= 0 && i <= maxSize) {
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index b6cfd764273a2102525a66955ab2217071d0154d..0ccfbee593fc16073484b1d4ed9458406b8cce50 100644
|
||||
index 008530bf0f09180ba365fc514b51d22630564de2..7bc07d120ca3b8cffa6b1147f1687b5a4023b709 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1788,6 +1788,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -91,10 +91,10 @@ index a7c4fad2b1cb0cbac742a18d37d688bb2663944e..b94243d293e805743453adf7b4fc8d85
|
||||
bridge.removeChannel(channel);
|
||||
}
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 42ab4f50d07539aafba120e863d5b9cfc5a436e8..e8fd78e2898931f65e783ad46b5b73ce3fbde235 100644
|
||||
index c537d22fd97225c1b6d58bed61add83a20d9be24..75d9d06066c750ac9a176adc021410f1265cd36f 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3676,6 +3676,17 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -3678,6 +3678,17 @@ public class ServerGamePacketListenerImpl
|
||||
|
||||
@Override
|
||||
public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
|
||||
@@ -113,7 +113,7 @@ index 42ab4f50d07539aafba120e863d5b9cfc5a436e8..e8fd78e2898931f65e783ad46b5b73ce
|
||||
}
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index df47a3dc31a01464088eba21f4139f63d69895e5..a695a3152dbc72f1b20c713574763455b2569e1c 100644
|
||||
index cfe2bbc46046f144044d8cba67cda978f231d354..96af2c75b526c59510965665da0b2ca00bf657b3 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -343,6 +343,11 @@ public abstract class PlayerList {
|
||||
@@ -136,7 +136,7 @@ index df47a3dc31a01464088eba21f4139f63d69895e5..a695a3152dbc72f1b20c713574763455
|
||||
// Paper end - Fix kick event leave message not being sent
|
||||
org.purpurmc.purpur.task.BossBarTask.removeFromAll(player.getBukkitEntity()); // Purpur - Implement TPSBar
|
||||
ServerLevel serverLevel = player.level();
|
||||
@@ -1460,6 +1466,7 @@ public abstract class PlayerList {
|
||||
@@ -1461,6 +1467,7 @@ public abstract class PlayerList {
|
||||
serverPlayer.connection.send(clientboundUpdateRecipesPacket);
|
||||
serverPlayer.getRecipeBook().sendInitialRecipeBook(serverPlayer);
|
||||
}
|
||||
@@ -60,7 +60,7 @@ index 51c126735ace8fdde89ad97b5cab62f244212db0..23f6ed26b531ea570fdf2ae48c1e2710
|
||||
+ public void moonrise$write(final org.bxteam.divinemc.region.IRegionFile regionFile) throws IOException; // DivineMC - Buffered Linear region format
|
||||
}
|
||||
diff --git a/net/minecraft/server/MinecraftServer.java b/net/minecraft/server/MinecraftServer.java
|
||||
index 0ccfbee593fc16073484b1d4ed9458406b8cce50..f1696e8b2143caee9d6e9ce942c9a07c1e5d4998 100644
|
||||
index 7bc07d120ca3b8cffa6b1147f1687b5a4023b709..97f097eff051690ea0bc24b851153c7deafdc008 100644
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -942,10 +942,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -73,7 +73,7 @@ index aa4dd7517e8be167aef1eaf7aa907e3ce7cc0e62..e3d3b062e273fee4a9d3ba3cadc21278
|
||||
- // Paper end - detailed watchdog information
|
||||
}
|
||||
diff --git a/net/minecraft/server/level/ServerLevel.java b/net/minecraft/server/level/ServerLevel.java
|
||||
index d4841095157106c3c69501ac2cd09511f62cfea0..e68d857b59c3e3320221dd995b29cf7aa09aafc2 100644
|
||||
index 0ad18866c323308ad9b87322932e03a283f740b1..386fdc23b35675a7db66d16bf2a8a6dd5b44059a 100644
|
||||
--- a/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1349,13 +1349,7 @@ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLe
|
||||
@@ -1,16 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 6 Jul 2025 01:49:27 +0300
|
||||
Subject: [PATCH] Parchment: Make FixLight use action bar
|
||||
|
||||
Original license: GPLv3
|
||||
Original project: https://github.com/ProjectEdenGG/Parchment
|
||||
|
||||
diff --git a/io/papermc/paper/command/subcommands/FixLightCommand.java b/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||
index 85950a1aa732ab8c01ad28bec9e0de140e1a172e..fbc38577599dd0e606e2d225ce98943ab49e74f7 100644
|
||||
--- a/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||
+++ b/io/papermc/paper/command/subcommands/FixLightCommand.java
|
||||
@@ -95,17 +95,23 @@ public final class FixLightCommand implements PaperSubcommand {
|
||||
@@ -95,17 +_,23 @@
|
||||
((StarLightLightingProvider)lightengine).starlight$serverRelightChunks(chunks,
|
||||
(final ChunkPos chunkPos) -> {
|
||||
++relitChunks[0];
|
||||
@@ -1,5 +1,19 @@
|
||||
--- a/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/net/minecraft/server/MinecraftServer.java
|
||||
@@ -989,6 +_,13 @@
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
+ // DivineMC start - Respawn players that were dead on server restart
|
||||
+ for (ServerPlayer player : this.playerList.players) {
|
||||
+ if (player.isDeadOrDying() || (player.isRemoved() && player.getRemovalReason() == net.minecraft.world.entity.Entity.RemovalReason.KILLED)) {
|
||||
+ this.playerList.respawn(player, false, net.minecraft.world.entity.Entity.RemovalReason.KILLED, org.bukkit.event.player.PlayerRespawnEvent.RespawnReason.DEATH);
|
||||
+ }
|
||||
+ }
|
||||
+ // DivineMC end - Respawn players that were dead on server restart
|
||||
if (!hasLoggedStop && isDebugging()) io.papermc.paper.util.TraceUtil.dumpTraceForThread("Server stopped"); // Paper - Debugging
|
||||
shutdownThread = Thread.currentThread(); // Paper - Improved watchdog support
|
||||
org.spigotmc.WatchdogThread.doStop(); // Paper - Improved watchdog support
|
||||
@@ -1080,6 +_,7 @@
|
||||
// Paper end - rewrite chunk system
|
||||
// Paper start - Improved watchdog support - move final shutdown items here
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/server/level/ChunkMap.java
|
||||
+++ b/net/minecraft/server/level/ChunkMap.java
|
||||
@@ -1302,7 +_,7 @@
|
||||
flag = flag && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
|
||||
// Paper end - Configurable entity tracking range by Y
|
||||
// CraftBukkit start - respect vanish API
|
||||
- if (flag && !player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) { // Paper - only consider hits
|
||||
+ if (flag && !player.getBukkitEntity().canSeeChunkMapUpdatePlayer(this.entity.getBukkitEntity())) { // Paper - only consider hits // DivineMC - SparklyPaper: Optimize "canSee" checks
|
||||
flag = false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1,16 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Thu, 10 Jul 2025 22:17:00 +0300
|
||||
Subject: [PATCH] Leaves: Syncmatica Protocol
|
||||
|
||||
Original project: https://github.com/LeavesMC/Leaves
|
||||
Original license: GPLv3
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index e8fd78e2898931f65e783ad46b5b73ce3fbde235..75d9d06066c750ac9a176adc021410f1265cd36f 100644
|
||||
--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -313,6 +313,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -313,6 +_,7 @@
|
||||
private static final int MAX_SIGN_LINE_LENGTH = Integer.getInteger("Paper.maxSignLength", 80); // Paper - Limit client sign length
|
||||
private final io.papermc.paper.event.packet.ClientTickEndEvent tickEndEvent; // Paper - add client tick end event
|
||||
public final io.papermc.paper.connection.PaperPlayerGameConnection playerGameConnection; // Paper
|
||||
@@ -18,7 +8,7 @@ index e8fd78e2898931f65e783ad46b5b73ce3fbde235..75d9d06066c750ac9a176adc021410f1
|
||||
|
||||
public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie cookie) {
|
||||
super(server, connection, cookie);
|
||||
@@ -324,6 +325,7 @@ public class ServerGamePacketListenerImpl
|
||||
@@ -324,6 +_,7 @@
|
||||
this.chatMessageChain = new FutureChain(server.chatExecutor); // CraftBukkit - async chat
|
||||
this.tickEndEvent = new io.papermc.paper.event.packet.ClientTickEndEvent(player.getBukkitEntity()); // Paper - add client tick end event
|
||||
this.playerGameConnection = new io.papermc.paper.connection.PaperPlayerGameConnection(this); // Paper
|
||||
@@ -1,15 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 6 Jul 2025 02:48:57 +0300
|
||||
Subject: [PATCH] Don't respond ping before start fully
|
||||
|
||||
This is rewritten Purpur patch, to make this configurable
|
||||
|
||||
diff --git a/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||
index 1b966dc52b067cd9d1fa9f500b692e3f75f1cc90..ff4857522fc9bd5cdd01e3d0161418eef88886fc 100644
|
||||
--- a/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||
+++ b/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
|
||||
@@ -37,7 +37,10 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
|
||||
@@ -37,7 +_,10 @@
|
||||
} else {
|
||||
this.hasRequestedStatus = true;
|
||||
// this.connection.send(new ClientboundStatusResponsePacket(this.status)); // Paper
|
||||
@@ -1,16 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Thu, 10 Jul 2025 22:15:39 +0300
|
||||
Subject: [PATCH] Leaves: Xaero's Map Protocol
|
||||
|
||||
Original project: https://github.com/LeavesMC/Leaves
|
||||
Original license: GPLv3
|
||||
|
||||
diff --git a/net/minecraft/server/players/PlayerList.java b/net/minecraft/server/players/PlayerList.java
|
||||
index a695a3152dbc72f1b20c713574763455b2569e1c..96af2c75b526c59510965665da0b2ca00bf657b3 100644
|
||||
--- a/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1172,6 +1172,7 @@ public abstract class PlayerList {
|
||||
@@ -1143,6 +_,7 @@
|
||||
player.connection.send(new ClientboundInitializeBorderPacket(worldBorder));
|
||||
player.connection.send(new ClientboundSetTimePacket(level.getGameTime(), level.getDayTime(), level.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
|
||||
player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(level.getSharedSpawnPos(), level.getSharedSpawnAngle()));
|
||||
@@ -1,15 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 6 Jul 2025 02:10:59 +0300
|
||||
Subject: [PATCH] SparklyPaper: Clear dirty stats after copying
|
||||
|
||||
Original project: https://github.com/SparklyPower/SparklyPaper
|
||||
|
||||
diff --git a/net/minecraft/stats/ServerStatsCounter.java b/net/minecraft/stats/ServerStatsCounter.java
|
||||
index 16e06085ed3c0f6a0b35c730b63b75824f44a905..b2d8f5d146ec10d34a4e71cbfc975fb68e5a8d04 100644
|
||||
--- a/net/minecraft/stats/ServerStatsCounter.java
|
||||
+++ b/net/minecraft/stats/ServerStatsCounter.java
|
||||
@@ -98,12 +98,6 @@ public class ServerStatsCounter extends StatsCounter {
|
||||
@@ -98,12 +_,6 @@
|
||||
this.dirty.add(stat);
|
||||
}
|
||||
|
||||
@@ -22,7 +13,7 @@ index 16e06085ed3c0f6a0b35c730b63b75824f44a905..b2d8f5d146ec10d34a4e71cbfc975fb6
|
||||
public void parseLocal(DataFixer fixerUpper, String json) {
|
||||
try {
|
||||
JsonElement jsonElement = StrictJsonParser.parse(json);
|
||||
@@ -139,10 +133,12 @@ public class ServerStatsCounter extends StatsCounter {
|
||||
@@ -139,9 +_,11 @@
|
||||
public void sendStats(ServerPlayer player) {
|
||||
Object2IntMap<Stat<?>> map = new Object2IntOpenHashMap<>();
|
||||
|
||||
@@ -30,9 +21,8 @@ index 16e06085ed3c0f6a0b35c730b63b75824f44a905..b2d8f5d146ec10d34a4e71cbfc975fb6
|
||||
+ for (Stat<?> stat : this.dirty) { // DivineMC - SparklyPaper: Skip dirty stats copy when requesting player stats
|
||||
map.put(stat, this.getValue(stat));
|
||||
}
|
||||
|
||||
+ this.dirty.clear(); // DivineMC - SparklyPaper: Clear dirty stats after copying
|
||||
+
|
||||
+ this.dirty.clear(); // DivineMC - SparklyPaper: Clear dirty stats after copying
|
||||
|
||||
player.connection.send(new ClientboundAwardStatsPacket(map));
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,14 @@
|
||||
final Vec3 originalMovement = movement; // Paper - Expose pre-collision velocity
|
||||
// Paper start - detailed watchdog information
|
||||
ca.spottedleaf.moonrise.common.util.TickThread.ensureTickThread("Cannot move an entity off-main");
|
||||
@@ -4219,6 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean canTeleport(Level fromLevel, Level toLevel) {
|
||||
+ if (!fromLevel.divineConfig.allowEntityPortalWithPassenger && (this.isPassenger() || this.isVehicle())) return false; // DivineMC - Allow entity teleport with passenger
|
||||
if (!this.isAlive() || !this.valid) return false; // Paper - Fix item duplication and teleport issues
|
||||
if (fromLevel.dimension() == Level.END && toLevel.dimension() == Level.OVERWORLD) {
|
||||
for (Entity entity : this.getPassengers()) {
|
||||
@@ -4448,6 +_,7 @@
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sat, 1 Feb 2025 19:43:42 +0300
|
||||
Subject: [PATCH] Re-Fix MC-117075
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/Level.java b/net/minecraft/world/level/Level.java
|
||||
index 9625213b7c1295b813071dbedea5366510c7072f..bf38e3bfcb0b96c4529d5e535893043512f52b02 100644
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -104,7 +104,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -106,7 +_,7 @@
|
||||
public static final int TICKS_PER_DAY = 24000;
|
||||
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
||||
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
||||
@@ -17,7 +9,7 @@ index 9625213b7c1295b813071dbedea5366510c7072f..bf38e3bfcb0b96c4529d5e5358930435
|
||||
protected final NeighborUpdater neighborUpdater;
|
||||
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
||||
private boolean tickingBlockEntities;
|
||||
@@ -1510,13 +1510,11 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1501,13 +_,11 @@
|
||||
boolean runsNormally = this.tickRateManager().runsNormally();
|
||||
|
||||
int tickedEntities = 0; // Paper - rewrite chunk system
|
||||
@@ -32,7 +24,7 @@ index 9625213b7c1295b813071dbedea5366510c7072f..bf38e3bfcb0b96c4529d5e5358930435
|
||||
} else if (runsNormally && this.shouldTickBlocksAt(tickingBlockEntity.getPos())) {
|
||||
tickingBlockEntity.tick();
|
||||
// Paper start - rewrite chunk system
|
||||
@@ -1526,7 +1524,7 @@ public abstract class Level implements LevelAccessor, UUIDLookup<Entity>, AutoCl
|
||||
@@ -1517,7 +_,7 @@
|
||||
// Paper end - rewrite chunk system
|
||||
}
|
||||
}
|
||||
@@ -40,4 +32,4 @@ index 9625213b7c1295b813071dbedea5366510c7072f..bf38e3bfcb0b96c4529d5e5358930435
|
||||
+ this.blockEntityTickers.removeMarkedEntries(); // DivineMC - optimize block entity removals - Fix MC-117075
|
||||
|
||||
this.tickingBlockEntities = false;
|
||||
this.spigotConfig.currentPrimedTnt = 0; // Spigot
|
||||
profilerFiller.pop();
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/world/level/block/SlimeBlock.java
|
||||
+++ b/net/minecraft/world/level/block/SlimeBlock.java
|
||||
@@ -42,6 +_,7 @@
|
||||
Vec3 deltaMovement = entity.getDeltaMovement();
|
||||
if (deltaMovement.y < 0.0) {
|
||||
double d = entity instanceof LivingEntity ? 1.0 : 0.8;
|
||||
+ if (org.bxteam.divinemc.config.DivineConfig.FixesCategory.fixIncorrectBounceLogic) entity.setOnGround(deltaMovement.y > -0.15); // DivineMC - Carpet-Fixes: Fix Slime Block Bounce Logic
|
||||
entity.setDeltaMovement(deltaMovement.x, -deltaMovement.y * d, deltaMovement.z);
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Wed, 5 Mar 2025 18:08:25 +0300
|
||||
Subject: [PATCH] Configurable MC-59471
|
||||
|
||||
Bring back MC-59471, MC-129055 on 1.21.2+, which fixed in 1.21.2 snapshots 24w33a and 24w36a
|
||||
|
||||
P.S: This setting is different from skip-tripwire-hook-placement-validation in Paper
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/TripWireHookBlock.java b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
index 8a3a8b0fdf9545a41501dc992c6982d9c8ce7b66..52fa81fdce9d7998f4c2d3b90dfc08391218f7fd 100644
|
||||
--- a/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
+++ b/net/minecraft/world/level/block/TripWireHookBlock.java
|
||||
@@ -187,7 +187,6 @@ public class TripWireHookBlock extends Block {
|
||||
@@ -187,7 +_,6 @@
|
||||
if (!cancelledEmitterHook) { // Paper - Call BlockRedstoneEvent
|
||||
emitState(level, pos, flag2, flag3, flag, flag1);
|
||||
if (!attaching) {
|
||||
@@ -19,7 +8,7 @@ index 8a3a8b0fdf9545a41501dc992c6982d9c8ce7b66..52fa81fdce9d7998f4c2d3b90dfc0839
|
||||
level.setBlock(pos, blockState1.setValue(FACING, direction), 3);
|
||||
if (shouldNotifyNeighbours) {
|
||||
notifyNeighbors(block, level, pos, direction);
|
||||
@@ -200,10 +199,18 @@ public class TripWireHookBlock extends Block {
|
||||
@@ -200,10 +_,18 @@
|
||||
BlockPos blockPos1 = pos.relative(direction, i2);
|
||||
BlockState blockState2 = blockStates[i2];
|
||||
if (blockState2 != null) {
|
||||
@@ -1,16 +1,6 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sat, 12 Apr 2025 17:40:53 +0300
|
||||
Subject: [PATCH] SparklyPaper: Allow throttling hopper checks if the target
|
||||
container is full
|
||||
|
||||
Original project: https://github.com/SparklyPower/SparklyPaper
|
||||
|
||||
diff --git a/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
index 800b7e78ae989868ed0b9e060c80dcd002759412..3c9843979baff7ed419d4ae2124d7ccf47b95b5b 100644
|
||||
--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
|
||||
@@ -423,6 +423,11 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen
|
||||
@@ -423,6 +_,11 @@
|
||||
} else {
|
||||
Direction opposite = blockEntity.facing.getOpposite();
|
||||
if (isFullContainer(attachedContainer, opposite)) {
|
||||
@@ -1,24 +1,18 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
|
||||
Date: Sun, 6 Jul 2025 02:47:58 +0300
|
||||
Subject: [PATCH] Optimize block state lookup
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/chunk/LevelChunk.java b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index b88254fb3c12b99684c6ede1ae8a6671ffbe9ad6..dbb4142ea38cdf484e74c81103cebb024ae8813d 100644
|
||||
--- a/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -270,11 +270,18 @@ public class LevelChunk extends ChunkAccess implements ca.spottedleaf.moonrise.p
|
||||
@@ -272,11 +_,18 @@
|
||||
public BlockState getBlockStateFinal(final int x, final int y, final int z) {
|
||||
// Copied and modified from below
|
||||
final int sectionIndex = this.getSectionIndex(y);
|
||||
- if (sectionIndex < 0 || sectionIndex >= this.sections.length
|
||||
- || this.sections[sectionIndex].nonEmptyBlockCount == 0) {
|
||||
- return Blocks.AIR.defaultBlockState();
|
||||
- }
|
||||
- return this.sections[sectionIndex].states.get((y & 15) << 8 | (z & 15) << 4 | x & 15);
|
||||
+ // DivineMC start - Optimize block state lookup
|
||||
+ if (sectionIndex < 0 || sectionIndex >= this.sections.length) {
|
||||
return Blocks.AIR.defaultBlockState();
|
||||
}
|
||||
- return this.sections[sectionIndex].states.get((y & 15) << 8 | (z & 15) << 4 | x & 15);
|
||||
+ return Blocks.AIR.defaultBlockState();
|
||||
+ }
|
||||
+
|
||||
+ final LevelChunkSection section = this.sections[sectionIndex];
|
||||
+ if (section.nonEmptyBlockCount == 0) {
|
||||
@@ -0,0 +1,10 @@
|
||||
--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -160,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.vanillaRender.buffer = colors.array(); // Paper - Use Vanilla map renderer when possible
|
||||
+ this.setDirty(false); // DivineMC - SparklyPaper: Reset dirty flag when loading maps from the disk
|
||||
}
|
||||
|
||||
public static MapItemSavedData createFresh(
|
||||
@@ -231,25 +231,10 @@ index 62e2d5704c348955bc8284dc2d54c933b7bcdd06..341f13e57896f03058ea3ec68e69b7cb
|
||||
public void executeAsync(final Runnable runnable) {
|
||||
MCUtil.scheduleAsyncTask(this.catching(runnable, "asynchronous"));
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 748bd9650da4a209743b7a5dde584b2e19c5a578..7e90142cb65937103aa99fd011540086449c45c8 100644
|
||||
index 748bd9650da4a209743b7a5dde584b2e19c5a578..3a4239d6f5768f7e2b6025477670dd2eb9f8cbc4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -1,14 +1,8 @@
|
||||
package org.bukkit.craftbukkit;
|
||||
|
||||
import java.io.File;
|
||||
-import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
-import java.util.Calendar;
|
||||
-import java.util.Date;
|
||||
-import java.util.logging.Level;
|
||||
-import java.util.logging.Logger;
|
||||
import joptsimple.OptionParser;
|
||||
-import joptsimple.OptionSet;
|
||||
import joptsimple.util.PathConverter;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
@@ -24,7 +18,7 @@ public class Main {
|
||||
@@ -24,7 +24,7 @@ public class Main {
|
||||
}
|
||||
// Paper end - Reset loggers after shutdown
|
||||
|
||||
@@ -258,7 +243,7 @@ index 748bd9650da4a209743b7a5dde584b2e19c5a578..7e90142cb65937103aa99fd011540086
|
||||
if (System.getProperty("jdk.nio.maxCachedBufferSize") == null) System.setProperty("jdk.nio.maxCachedBufferSize", "262144"); // Paper - cap per-thread NIO cache size; https://www.evanjones.ca/java-bytebuffer-leak.html
|
||||
OptionParser parser = new OptionParser() {
|
||||
{
|
||||
@@ -180,77 +174,6 @@ public class Main {
|
||||
@@ -180,77 +180,6 @@ public class Main {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Configuration
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 592e8a4c04ef5acda9fdfd1405d8ff4952396ada..c8c7fa0304e8eaf0d444fc0c9a36c00bb27ccc71 100644
|
||||
index 53702f1e87e143a6b4260a21c858643746814146..906865cdb2ddde3d9e018cd9cca0fa3bdcc9b4d8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1060,6 +1060,7 @@ public final class CraftServer implements Server {
|
||||
@@ -31,10 +31,10 @@ index 592e8a4c04ef5acda9fdfd1405d8ff4952396ada..c8c7fa0304e8eaf0d444fc0c9a36c00b
|
||||
|
||||
Plugin[] pluginClone = pluginManager.getPlugins().clone(); // Paper
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 7e90142cb65937103aa99fd011540086449c45c8..7653ba0259ddc930dc4e2af84636641d3dba6e7f 100644
|
||||
index 3a4239d6f5768f7e2b6025477670dd2eb9f8cbc4..0838fcfaa950300f7a394295509be86cab824f99 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -166,6 +166,14 @@ public class Main {
|
||||
@@ -172,6 +172,14 @@ public class Main {
|
||||
.describedAs("Yml file");
|
||||
// Purpur end - Purpur config files
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ index 70413fddd23ca1165cb5090cce4fddcb1bbca93f..ae70b84e6473fa2ed94416bf4bef8849
|
||||
@SuppressWarnings("unchecked")
|
||||
java.util.List<Path> files = ((java.util.List<File>) optionSet.valuesOf("add-plugin")).stream().map(File::toPath).toList();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 7653ba0259ddc930dc4e2af84636641d3dba6e7f..1a3a5e8a9119af8ed9d13a61bc5dc7b3ee0b7a65 100644
|
||||
index 0838fcfaa950300f7a394295509be86cab824f99..d9bf383c9cb4fedcea84044f7db0da68b05fab76 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -174,6 +174,14 @@ public class Main {
|
||||
@@ -180,6 +180,14 @@ public class Main {
|
||||
.describedAs("Yml file");
|
||||
// DivineMC end - Configuration
|
||||
|
||||
|
||||
@@ -66,9 +66,10 @@ public class DivineBootstrap {
|
||||
SharedConstants.tryDetectVersion();
|
||||
getStartupVersionMessages().forEach(LOGGER::info);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
LOGGER.error("Failed to initialize the server", t);
|
||||
}
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ import java.util.Set;
|
||||
* <p>For conversion tools between MCA and buffered region file formats, see:
|
||||
* <a href="https://github.com/NONPLAYT/LinearRegionFileFormatTools">LinearRegionFileFormatTools</a>
|
||||
*/
|
||||
@SuppressWarnings({"unused", "FieldMayBeFinal"})
|
||||
public class BufferedRegionFile implements IRegionFile {
|
||||
private static final double AUTO_COMPACT_PERCENT = 3.0 / 5.0; // 60%
|
||||
private static final long AUTO_COMPACT_SIZE = 1024 * 1024; // 1 MiB
|
||||
@@ -751,7 +752,7 @@ public class BufferedRegionFile implements IRegionFile {
|
||||
}
|
||||
}
|
||||
|
||||
private class Sector{
|
||||
private class Sector {
|
||||
private final int index;
|
||||
private long offset;
|
||||
private long length;
|
||||
|
||||
Reference in New Issue
Block a user