Fix more compile issues

Dieser Commit ist enthalten in:
Nassim Jahnke 2024-04-25 21:40:53 +02:00
Ursprung ca9001a936
Commit d01f6b2fd2
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: EF6771C01F6EF02F
836 geänderte Dateien mit 259 neuen und 253 gelöschten Zeilen

Datei anzeigen

@ -1804,10 +1804,10 @@ index 0000000000000000000000000000000000000000..8323f135d6bf2e1f12525e05094ffa3f
+}
diff --git a/src/main/java/io/papermc/paper/adventure/providers/DataComponentValueConverterProviderImpl.java b/src/main/java/io/papermc/paper/adventure/providers/DataComponentValueConverterProviderImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..c197e28d8d8cdf751be1cf3fdc413f8ca0d03038
index 0000000000000000000000000000000000000000..ef19891a895e699cac638bd9b9f2fa0eaf1371ba
--- /dev/null
+++ b/src/main/java/io/papermc/paper/adventure/providers/DataComponentValueConverterProviderImpl.java
@@ -0,0 +1,76 @@
@@ -0,0 +1,75 @@
+package io.papermc.paper.adventure.providers;
+
+import com.google.gson.JsonElement;
@ -1828,8 +1828,7 @@ index 0000000000000000000000000000000000000000..c197e28d8d8cdf751be1cf3fdc413f8c
+import org.checkerframework.checker.nullness.qual.Nullable;
+import org.checkerframework.framework.qual.DefaultQualifier;
+
+import static net.kyori.adventure.nbt.api.BinaryTagHolder.binaryTagHolder;
+import static net.kyori.adventure.text.serializer.gson.GsonDataComponentValue.gsonDatacomponentValue;
+import static net.kyori.adventure.text.serializer.gson.GsonDataComponentValue.gsonDataComponentValue;
+
+@DefaultQualifier(NonNull.class)
+public class DataComponentValueConverterProviderImpl implements DataComponentValueConverterRegistry.Provider {
@ -1848,7 +1847,7 @@ index 0000000000000000000000000000000000000000..c197e28d8d8cdf751be1cf3fdc413f8c
+ DataComponentValueConverterRegistry.Conversion.convert(
+ PaperAdventure.DataComponentValueImpl.class,
+ GsonDataComponentValue.class,
+ (key, dataComponentValue) -> gsonDatacomponentValue((JsonElement) dataComponentValue.codec().encodeStart(JsonOps.INSTANCE, dataComponentValue.value()).getOrThrow())
+ (key, dataComponentValue) -> gsonDataComponentValue((JsonElement) dataComponentValue.codec().encodeStart(JsonOps.INSTANCE, dataComponentValue.value()).getOrThrow())
+ ),
+ DataComponentValueConverterRegistry.Conversion.convert(
+ GsonDataComponentValue.class,

Datei anzeigen

@ -4,15 +4,20 @@ Date: Thu, 3 Mar 2016 03:53:43 -0600
Subject: [PATCH] Allow for toggling of spawn chunks
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 5f881af95bd5ee94daadfd9e5d64ee6d411255c4..10e0630d30864f8d38434e58f43c63a6984b974b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -258,6 +258,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
});
// CraftBukkit end
this.timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
+ this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper - Option to keep spawn chunks loaded
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 476b513e05a8ef099a17db44732ebc8eed8a595c..a72b84cdf2b5f4aea5eb7fe4dfc0faad27c46876 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -403,6 +403,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
this.dragonFight = null;
}
+ // Paper start - keep spawn loaded
+ if (this.paperConfig().spawn.keepSpawnLoaded && this.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS) == 0) {
+ this.getGameRules().getRule(GameRules.RULE_SPAWN_CHUNK_RADIUS).set(this.paperConfig().spawn.keepSpawnLoadedRange, this);
+ }
+ // Paper end - keep spawn loaded
+
this.sleepStatus = new SleepStatus();
this.gameEventDispatcher = new GameEventDispatcher(this);
this.randomSequences = (RandomSequences) Objects.requireNonNullElseGet(randomsequences, () -> {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity Origin API
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 476b513e05a8ef099a17db44732ebc8eed8a595c..53a448b60168c0bcbb0979884a589a31baf9c841 100644
index a72b84cdf2b5f4aea5eb7fe4dfc0faad27c46876..c8dadfd6441452817db858ae934b7baed5194403 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2173,6 +2173,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2179,6 +2179,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
entity.inWorld = true; // CraftBukkit - Mark entity as in world
entity.valid = true; // CraftBukkit

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Prevent block entity and entity crashes
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 10e0630d30864f8d38434e58f43c63a6984b974b..d878203f7d013ab5648bca82c9a71cceeda1f11f 100644
index 5f881af95bd5ee94daadfd9e5d64ee6d411255c4..472df81e4aef21e0cf2684a9e04d6ce18d6d6922 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -727,11 +727,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -726,11 +726,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
try {
tickConsumer.accept(entity);
} catch (Throwable throwable) {

Datei anzeigen

@ -120,7 +120,7 @@ index cd6d831d8519b406571e6f626053afb662799ad9..8a4c086d7ac4bf59f39ab37e583b0e8d
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d878203f7d013ab5648bca82c9a71cceeda1f11f..b638e223c9ac1019fac9d1a8203feac90cfcc724 100644
index 472df81e4aef21e0cf2684a9e04d6ce18d6d6922..395744b57e0dcff2de5f2675c03c2e696123d386 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -167,6 +167,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable thunder
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 53a448b60168c0bcbb0979884a589a31baf9c841..057ae550d0cb3617f2f6c282d172f46be1c0b263 100644
index c8dadfd6441452817db858ae934b7baed5194403..b41a4d6dc7fb98b6f6fc172a2b83ea43213643b4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -615,7 +615,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -621,7 +621,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
ProfilerFiller gameprofilerfiller = this.getProfiler();
gameprofilerfiller.push("thunder");

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable ice and snow
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 057ae550d0cb3617f2f6c282d172f46be1c0b263..de6601291b7f8a8e3ee37aceeccfca9083f9fb90 100644
index b41a4d6dc7fb98b6f6fc172a2b83ea43213643b4..6440c0459248a9a0de21c8871e4f4ce399b525ec 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -645,11 +645,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -651,11 +651,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
gameprofilerfiller.popPush("iceandsnow");

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Disable spigot tick limiters
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b638e223c9ac1019fac9d1a8203feac90cfcc724..dac9c71d696a3fd1554408a6beb6840382bbc30c 100644
index 395744b57e0dcff2de5f2675c03c2e696123d386..03fec2504579acb0a8ba835939e0067f3649ab6a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -700,9 +700,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -699,9 +699,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
boolean flag = this.tickRateManager().runsNormally();
int tilesThisCycle = 0;

Datei anzeigen

@ -91,10 +91,10 @@ index 8183c26b4a5ad169a53702b8c45fd05cda934e80..36dec6cd78a0990ba3c09a4a748c259e
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index dac9c71d696a3fd1554408a6beb6840382bbc30c..29fe6aaa9e344a9c373399d63dd63ff0c04cbfda 100644
index 03fec2504579acb0a8ba835939e0067f3649ab6a..2eb2fbe57a33701770baefea5dc727684f2779ec 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -729,6 +729,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -728,6 +728,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper start - Prevent block entity and entity crashes
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
MinecraftServer.LOGGER.error(msg, throwable);

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
Methods that can be used for other patches to help improve logic.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 29fe6aaa9e344a9c373399d63dd63ff0c04cbfda..0e0ab7b2790c1b7540eeb27eb17099e39a6099d4 100644
index 2eb2fbe57a33701770baefea5dc727684f2779ec..8ba4395670304647d62987952c6339d394140af6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -341,6 +341,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -340,6 +340,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return chunk == null ? null : chunk.getFluidState(blockposition);
}

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index de6601291b7f8a8e3ee37aceeccfca9083f9fb90..0dfcf5b2a0865f6f14a2a34622d27c9742af6948 100644
index 6440c0459248a9a0de21c8871e4f4ce399b525ec..2b0f4839b128d8a0cdedd0bb8f4a4c6cf02990af 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -620,7 +620,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -626,7 +626,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (this.isRainingAt(blockposition)) {
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);

Datei anzeigen

@ -18,7 +18,7 @@ index b5f305c7d0972438a686d9b3a022156e39b130a2..d5b5eb914278fbd85921c039a8da3492
this.profiler.push(() -> {
String s = String.valueOf(worldserver);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 0dfcf5b2a0865f6f14a2a34622d27c9742af6948..4badda17dd48bd6dbb8228774d8b1824de6d1d87 100644
index 2b0f4839b128d8a0cdedd0bb8f4a4c6cf02990af..c37e613361a2cc8bae2442c5b4ec425df821f30e 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -226,6 +226,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -30,10 +30,10 @@ index 0dfcf5b2a0865f6f14a2a34622d27c9742af6948..4badda17dd48bd6dbb8228774d8b1824
public LevelChunk getChunkIfLoaded(int x, int z) {
return this.chunkSource.getChunk(x, z, false);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 0e0ab7b2790c1b7540eeb27eb17099e39a6099d4..2a7d2eea46e05d85ce3e72a69dfd26a671a882ac 100644
index 8ba4395670304647d62987952c6339d394140af6..33c9001970fe01bedd72f6ba4388b43ed9707fc8 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -491,7 +491,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -490,7 +490,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
CraftWorld world = ((ServerLevel) this).getWorld();

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 4badda17dd48bd6dbb8228774d8b1824de6d1d87..ede5afa51818f3c36d40787ff3e6d0d45108cdf8 100644
index c37e613361a2cc8bae2442c5b4ec425df821f30e..b6bc5edad1cf6b54e1b18dddd5acf4002f3c97fd 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2185,6 +2185,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2191,6 +2191,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
}
// Paper end - Entity origin API
@ -16,7 +16,7 @@ index 4badda17dd48bd6dbb8228774d8b1824de6d1d87..ede5afa51818f3c36d40787ff3e6d0d4
}
public void onTrackingEnd(Entity entity) {
@@ -2255,6 +2256,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2261,6 +2262,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
}
// CraftBukkit end

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index ede5afa51818f3c36d40787ff3e6d0d45108cdf8..0d0a20d5ca09404d8be4d67fc4221c1fb0d24c1c 100644
index b6bc5edad1cf6b54e1b18dddd5acf4002f3c97fd..ab91dc3c9a738097b79bdecbcbe41557aa3ed0de 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1391,6 +1391,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1397,6 +1397,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@Override
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Faster redstone torch rapid clock removal
Only resize the the redstone torch list once, since resizing arrays / lists is costly
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 2a7d2eea46e05d85ce3e72a69dfd26a671a882ac..afb1c203f6299b90179244b4b0d0c6332f961e35 100644
index 33c9001970fe01bedd72f6ba4388b43ed9707fc8..95fc5fc293eb7d77868fa0a37beb792ee0620fcd 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -168,6 +168,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

Datei anzeigen

@ -11,10 +11,10 @@ Co-authored-by: lexikiq <noellekiq@gmail.com>
Co-authored-by: Aikar <aikar@aikar.co>
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 0d0a20d5ca09404d8be4d67fc4221c1fb0d24c1c..6e16a95472922faf34c1743f6e082b631eac4257 100644
index ab91dc3c9a738097b79bdecbcbe41557aa3ed0de..f2016ed77a2239bdc597175c24ce4427a808d1a6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1324,7 +1324,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1330,7 +1330,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@Override
public void levelEvent(@Nullable Player player, int eventId, BlockPos pos, int data) {
@ -81,10 +81,10 @@ index 6df874ac5091896be5edddd362c11958c0ad815b..37cfb9694dc06f693b7b54f20bc31dfd
double deltaLength = Math.sqrt(distanceSquared);
double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index afb1c203f6299b90179244b4b0d0c6332f961e35..57856f334370da394e9119fb1f8c7fb9c4916aa3 100644
index 95fc5fc293eb7d77868fa0a37beb792ee0620fcd..edcab2dd4070703101ed9bef86f320093be6c1cb 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -1263,4 +1263,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -1262,4 +1262,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private ExplosionInteraction() {}
}

Datei anzeigen

@ -6,10 +6,10 @@ Subject: [PATCH] Optimize Level.hasChunkAt(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 57856f334370da394e9119fb1f8c7fb9c4916aa3..b2b0dea688df220a06abd458ac47aae3d67a7797 100644
index edcab2dd4070703101ed9bef86f320093be6c1cb..004dd17181a49df5c2255a9eeca03f5a354920aa 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -342,6 +342,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -341,6 +341,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return chunk == null ? null : chunk.getFluidState(blockposition);
}

Datei anzeigen

@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b2b0dea688df220a06abd458ac47aae3d67a7797..e78f39ce95e587b84afccae0e4635171370b7323 100644
index 004dd17181a49df5c2255a9eeca03f5a354920aa..ec6640bc761b6232d6b48a32fae11e60d5cdcbdf 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -113,7 +113,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {

Datei anzeigen

@ -5,10 +5,10 @@ Subject: [PATCH] Fix MC-117075: Block entity unload lag spike
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index e78f39ce95e587b84afccae0e4635171370b7323..b650a3c8c141c8848dd3c88991f1cad7b0606adb 100644
index ec6640bc761b6232d6b48a32fae11e60d5cdcbdf..917ee31fedd92184d97f2c0a11fd61583361de92 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -722,6 +722,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -721,6 +721,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
boolean flag = this.tickRateManager().runsNormally();
int tilesThisCycle = 0;
@ -17,7 +17,7 @@ index e78f39ce95e587b84afccae0e4635171370b7323..b650a3c8c141c8848dd3c88991f1cad7
for (tileTickPosition = 0; tileTickPosition < this.blockEntityTickers.size(); tileTickPosition++) { // Paper - Disable tick limiters
this.tileTickPosition = (this.tileTickPosition < this.blockEntityTickers.size()) ? this.tileTickPosition : 0;
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
@@ -730,12 +732,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -729,12 +731,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity.isRemoved()) {
// Spigot start
tilesThisCycle--;

Datei anzeigen

@ -18,7 +18,7 @@ the blockstate that will be valid for restoration, as opposed to dropping
information on restoration when the event is cancelled.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b650a3c8c141c8848dd3c88991f1cad7b0606adb..ce2957c8955b95865c07eb3f3d7d9fcca2438e5e 100644
index 917ee31fedd92184d97f2c0a11fd61583361de92..26adc305c5d5ef16dda141f931973666ee163d01 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -149,7 +149,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -30,7 +30,7 @@ index b650a3c8c141c8848dd3c88991f1cad7b0606adb..ce2957c8955b95865c07eb3f3d7d9fcc
public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
public List<ItemEntity> captureDrops;
public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
@@ -384,7 +384,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -383,7 +383,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {
@ -39,7 +39,7 @@ index b650a3c8c141c8848dd3c88991f1cad7b0606adb..ce2957c8955b95865c07eb3f3d7d9fcc
if (blockstate == null) {
blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
this.capturedBlockStates.put(pos.immutable(), blockstate);
@@ -405,7 +405,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -404,7 +404,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// CraftBukkit start - capture blockstates
boolean captured = false;
if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
@ -49,7 +49,7 @@ index b650a3c8c141c8848dd3c88991f1cad7b0606adb..ce2957c8955b95865c07eb3f3d7d9fcc
this.capturedBlockStates.put(pos.immutable(), blockstate);
captured = true;
}
@@ -606,7 +607,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -605,7 +606,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public BlockState getBlockState(BlockPos pos) {
// CraftBukkit start - tree generation
if (this.captureTreeGeneration) {

Datei anzeigen

@ -16,10 +16,10 @@ public net.minecraft.world.entity.projectile.Projectile cachedOwner
public net.minecraft.world.entity.projectile.Projectile ownerUUID
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 6e16a95472922faf34c1743f6e082b631eac4257..2522c7a602338f515569cac42c71ae423daca6b3 100644
index f2016ed77a2239bdc597175c24ce4427a808d1a6..7be0547f6225a6be6ca1037f63f4aff8759b5dc4 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2143,6 +2143,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2149,6 +2149,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
public void onTickingEnd(Entity entity) {
ServerLevel.this.entityTickList.remove(entity);

Datei anzeigen

@ -10,10 +10,10 @@ Adds an option to control the force mode of the particle.
This adds a new Builder API which is much friendlier to use.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 2522c7a602338f515569cac42c71ae423daca6b3..a4369e73a8af5d2f0f216939685f6553433debd1 100644
index 7be0547f6225a6be6ca1037f63f4aff8759b5dc4..e79329ee9b02a11b55253cf2ce4e08b2fc39a43f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1510,12 +1510,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1516,12 +1516,17 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
public <T extends ParticleOptions> int sendParticles(ServerPlayer sender, T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6, boolean force) {

Datei anzeigen

@ -7,10 +7,10 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index a4369e73a8af5d2f0f216939685f6553433debd1..542a940ec2ebf367920d9f96f99d703ee1b3351f 100644
index e79329ee9b02a11b55253cf2ce4e08b2fc39a43f..c5b89c3149b869a3358434490a001f0f45f716fb 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1241,7 +1241,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1247,7 +1247,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
for (net.minecraft.world.level.block.entity.BlockEntity tileentity : chunk.getBlockEntities().values()) {
if (tileentity instanceof net.minecraft.world.Container) {
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((net.minecraft.world.Container) tileentity).getViewers())) {
@ -19,7 +19,7 @@ index a4369e73a8af5d2f0f216939685f6553433debd1..542a940ec2ebf367920d9f96f99d703e
}
}
}
@@ -2228,7 +2228,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -2234,7 +2234,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
// Spigot Start
if (entity.getBukkitEntity() instanceof org.bukkit.inventory.InventoryHolder && (!(entity instanceof ServerPlayer) || entity.getRemovalReason() != Entity.RemovalReason.KILLED)) { // SPIGOT-6876: closeInventory clears death message
for (org.bukkit.entity.HumanEntity h : Lists.newArrayList(((org.bukkit.inventory.InventoryHolder) entity.getBukkitEntity()).getInventory().getViewers())) {

Datei anzeigen

@ -17,10 +17,10 @@ index d33c49c4a4b87a5203f9b4592deff9389e6e870d..62d63883f6a9f4da099491f697b309d4
Iterator iterator = list.iterator();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index ce2957c8955b95865c07eb3f3d7d9fcca2438e5e..9e717a360dd50a2b4a5344011ae77811a3e182c1 100644
index 26adc305c5d5ef16dda141f931973666ee163d01..6e23e4d0477f361f2eb5bb93bd9dd2bf5073833c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -760,6 +760,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -759,6 +759,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
// Paper end - Prevent block entity and entity crashes
}
}

Datei anzeigen

@ -39,10 +39,10 @@ index 6ca74a5cf691ee92c84bd031e875f72440df6b32..cee3f1200af602b5dfd0b27d05eb0182
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9e717a360dd50a2b4a5344011ae77811a3e182c1..d050d72eb87a2d1b4723ab831dfef5e25c6a65b2 100644
index 6e23e4d0477f361f2eb5bb93bd9dd2bf5073833c..be2220eff094c735bdb0c3e777bfbcfa4d44a578 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -265,6 +265,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -264,6 +264,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
}

Datei anzeigen

@ -26,10 +26,10 @@ index 46da628073e2bfb77b3deab623dba46228d92618..1c508d1f122d287cd8dc0a905de96436
protected void tick() {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 542a940ec2ebf367920d9f96f99d703ee1b3351f..1beb2541cf799c7862685b5332ecbbfae1edc170 100644
index c5b89c3149b869a3358434490a001f0f45f716fb..2879de5d5c6638d9b683e74da8dc3863738f2b65 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1203,6 +1203,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1209,6 +1209,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
// CraftBukkit start
private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot

Datei anzeigen

@ -11,7 +11,7 @@ floating in the air.
This can replace many uses of BlockPhysicsEvent
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d050d72eb87a2d1b4723ab831dfef5e25c6a65b2..65b556d6ecae489c1c40b60d0eb432f4e1542e04 100644
index be2220eff094c735bdb0c3e777bfbcfa4d44a578..30ceb1e2765217e284abcb786b2c1f7b60f9c3dc 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -25,6 +25,7 @@ import net.minecraft.core.registries.Registries;
@ -22,7 +22,7 @@ index d050d72eb87a2d1b4723ab831dfef5e25c6a65b2..65b556d6ecae489c1c40b60d0eb432f4
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.level.FullChunkStatus;
import net.minecraft.server.level.ServerLevel;
@@ -576,9 +577,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -575,9 +576,26 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return false;
} else {
FluidState fluid = this.getFluidState(pos);

Datei anzeigen

@ -22,10 +22,10 @@ index bf72cf288ade52ee8cc41ca978f368b3ad575951..798999be50d26be357ef3c6d5b9383ce
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 1beb2541cf799c7862685b5332ecbbfae1edc170..81b6ae88c37b0876dc24b1d85a6aa20e242eae8b 100644
index 2879de5d5c6638d9b683e74da8dc3863738f2b65..893846b2b216ef67652285a59ba3c67bb2b4c78d 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1209,6 +1209,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@@ -1215,6 +1215,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
return true;
}
// Paper end - extra debug info

Datei anzeigen

@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
just do a get call since the value can never be null.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 65b556d6ecae489c1c40b60d0eb432f4e1542e04..eec2ca8306d42e4eafdf3ab0778bf2023739cb83 100644
index 30ceb1e2765217e284abcb786b2c1f7b60f9c3dc..895c263570acf0f8ac2e8d680a6187bc189a205e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -908,9 +908,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@@ -907,9 +907,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@Nullable
public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen