Update paperweight to 1.5.9 (#9872)

Dieser Commit ist enthalten in:
Jason Penilla 2023-10-26 16:34:58 -07:00 committet von GitHub
Ursprung acc6d012b0
Commit b974a6b6f3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
104 geänderte Dateien mit 605 neuen und 639 gelöschten Zeilen

Datei anzeigen

@ -5,7 +5,7 @@ plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
id("io.papermc.paperweight.core") version "1.5.8"
id("io.papermc.paperweight.core") version "1.5.9"
}
allprojects {

Datei anzeigen

@ -88,36 +88,6 @@ index 95a5ce711150c4c999a9d17f28a497f034638610..214215d203892b8009595539f25ce26e
private LootContextParamSet paramSet;
private Optional<ResourceLocation> randomSequence;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftParticle.java b/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
index 8a7d1c7b214a29f1364f42c1eb0aa89d0e3e4b41..af88ca7eaf94dc52d4b9dd96ffc8f8c956230812 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
@@ -113,7 +113,7 @@ public abstract class CraftParticle<D> implements Keyed {
private static final BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> VOID_FUNCTION = (name, particle) -> new CraftParticle<>(name, particle, Void.class) {
@Override
public ParticleOptions createParticleParam(Void data) {
- return (SimpleParticleType) CraftParticle.this.getHandle();
+ return (SimpleParticleType) this.getHandle(); // Paper - fix?
}
};
@@ -129,14 +129,14 @@ public abstract class CraftParticle<D> implements Keyed {
BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> itemStackFunction = (name, particle) -> new CraftParticle<>(name, particle, ItemStack.class) {
@Override
public ParticleOptions createParticleParam(ItemStack data) {
- return new ItemParticleOption((net.minecraft.core.particles.ParticleType<ItemParticleOption>) CraftParticle.this.getHandle(), CraftItemStack.asNMSCopy(data));
+ return new ItemParticleOption((net.minecraft.core.particles.ParticleType<ItemParticleOption>) this.getHandle(), CraftItemStack.asNMSCopy(data)); // Paper - fix?
}
};
BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> blockDataFunction = (name, particle) -> new CraftParticle<>(name, particle, BlockData.class) {
@Override
public ParticleOptions createParticleParam(BlockData data) {
- return new BlockParticleOption((net.minecraft.core.particles.ParticleType<BlockParticleOption>) CraftParticle.this.getHandle(), ((CraftBlockData) data).getState());
+ return new BlockParticleOption((net.minecraft.core.particles.ParticleType<BlockParticleOption>) this.getHandle(), ((CraftBlockData) data).getState()); // Paper - fix?
}
};
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
index b70450722da13bc4d358a70d3d1d2f30a2cca2b9..86d86c292bdeeb7f42685691287c3b4bd476ea14 100644
--- a/src/test/java/org/bukkit/DyeColorsTest.java

Datei anzeigen

@ -15,7 +15,7 @@ public net.minecraft.server.dedicated.DedicatedServerProperties reload(Lnet/mine
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
diff --git a/build.gradle.kts b/build.gradle.kts
index 677ec3d3b440dba6fd38ffb6f1102794ab3b013a..fd4eb839bbfa99a66ad30289d29bdc6a9fd1f3c8 100644
index 844eff88c9ad95871900c2d8aa3136b3f2928bf9..3aca132fcbd7dce2b26ac17f8e365d5f22d61e8d 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -12,6 +12,7 @@ dependencies {
@ -4774,7 +4774,7 @@ index 2ac60ea28ce722cdef61cfdc69bbbdf391628238..9cfdd5d8c1650d9c9bdfbc07980239e5
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index bc4f2e0a7086825ba8d1a503a65a4375d6c90d72..1561b26e1b4115f4d5631f20b31c2238d1d23202 100644
index 0e7c2e2d796aa2f29ab9a0d44a52f833b1ee6f77..7fca1f7a7ba2a6f6238eddc134f78f9abdc1531b 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -289,6 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -4832,11 +4832,11 @@ index 71e7beac6cf1e0f813d5ff3e9c51c13491be7139..f1cc27809c1e8612f7c4fa912f5e39c0
@Nullable
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 97065ae5eb30edfb2cb3fbc53769f8ffc7712377..a9ec28c3cf3ed50d929c80ac21959d82603ff0aa 100644
index e62eb92b63c027dfa431f8cc241ab968a3abf3f4..65ea4d909059387e6718ea68a3d9408556d26cbe 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
org.spigotmc.SpigotConfig.init((java.io.File) options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.init((java.io.File) this.options.valueOf("spigot-settings"));
org.spigotmc.SpigotConfig.registerCommands();
// Spigot end
+ // Paper start
@ -4859,7 +4859,7 @@ index 37ab411817008d4e6194e177d88d50931e53b42e..ca23639f15107ccd43b874ae38fa3727
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index df03b655bc5b864164da101bbf7edbca4cc7e147..f3a41559be5ad0b40762d368d8582704c8305961 100644
index c8e5e99d46c711efa90e446689e55267c70c7254..10968eb004ee01c4fb72aeb93f058747b02998b9 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -234,7 +234,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -4872,7 +4872,7 @@ index df03b655bc5b864164da101bbf7edbca4cc7e147..f3a41559be5ad0b40762d368d8582704
this.convertable = convertable_conversionsession;
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index cda55e481ddbcc1de5478125c5db20ebba168e7d..bacd4d875642cd93c3185f788745dd73a3cfde8a 100644
index 4dfb372f8c8f60b6aad18ea9b6334e1a7c9bc4ed..9f877007869ef984d2c95bd8e3d773a2b98f202c 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -155,6 +155,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -4900,19 +4900,19 @@ index cda55e481ddbcc1de5478125c5db20ebba168e7d..bacd4d875642cd93c3185f788745dd73
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 671095a9fb124cc496700e680bab1ef118a7fb5b..2d5627f5dc48c0d51464452907b50bbeb069e67c 100644
index b72a4c4e0d65646290545bf4bae99853c01f592e..b8844bc5fa43ad85230d9c80ae7602306cd22b27 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -918,6 +918,7 @@ public final class CraftServer implements Server {
}
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
+ this.console.paperConfigurations.reloadConfigs(this.console);
for (ServerLevel world : this.console.getAllLevels()) {
world.serverLevelData.setDifficulty(config.difficulty);
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 85b8e4ca89e9745d0fa27501712113937770de1f..6b93a90f2871781e7721499b8d322d5108254092 100644
index 5456b4fa5491bed89183024aea6ef99f4fad4688..3523f8851472890c97e628e22df883b91ba603fe 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -141,6 +141,19 @@ public class Main {
@ -4936,7 +4936,7 @@ index 85b8e4ca89e9745d0fa27501712113937770de1f..6b93a90f2871781e7721499b8d322d51
};
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index b97720e8934121be0f937bff6e257682e5738221..b599e098e6d2e6f78b89114e05cb03d716b7c5f4 100644
index 32feb7c02cff0d54384317f11b75be46dea337c4..d10b1d3a134e11fa8417fa3c845f088d8fc1f71c 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -96,7 +96,7 @@ public class SpigotConfig
@ -4949,7 +4949,7 @@ index b97720e8934121be0f937bff6e257682e5738221..b599e098e6d2e6f78b89114e05cb03d7
for ( Method method : clazz.getDeclaredMethods() )
{
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 65a6aadeca7fbd1271e8e96cd1f708942b6cba2d..afe68aa28f8b39fd490f650a335c90818e1c9a8d 100644
index 974e679ff20193f85fccb6e779a7ba791d0c5db4..8491ff48051224204b58d273c4971d16ab8867c1 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -58,8 +58,14 @@ public class SpigotWorldConfig

Datei anzeigen

@ -6072,7 +6072,7 @@ index 44cac39893eb968aa8ea21ee571c0dcb866ce06c..5151d68ba6ec72a7124f298253c5f0af
+
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 124fad1031d6125bca233541e2d5f256da70ca44..2a7c614df7b9c9405a5dd23e6a888ede7fc86683 100644
index fdbc744e7a4843e564ffaeecdc05ef6bbd53b74a..36748baf6030028f083902459797f0719f50e456 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -290,6 +290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -6366,7 +6366,7 @@ index 1641bdf8725df778ba91bf5cd22c1ebbb3745058..facfdbb87e89f4db33ce13233c2ba436
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index e9cf8686b59c232816b2fde92fc6616f77979a64..10132390dd356461f696971b34df3eeed05c572e 100644
index e80b251ca2cf4e1bad1f914380bf08f8a1471380..770f6a08c613093577172385549df8040ded627b 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -167,6 +167,62 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -6676,7 +6676,7 @@ index 1bfa33253a154c66dc8b7e476c777b74cda8999f..d8b83c8c89143d78620f812c491a1950
while (objectiterator.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 6c94ffc01377e3a066771509727e62521b2cea78..f402341b95c7752a2706edd502098696f786f4ef 100644
index dc1f88a562c61781ea9e86ff40041e9fecd308e0..4ff18d9995d5d26bde4dbe2ec31c77c2d1515227 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -51,6 +51,7 @@ import net.minecraft.world.level.storage.LevelStorageSource;
@ -6983,7 +6983,7 @@ index 6c94ffc01377e3a066771509727e62521b2cea78..f402341b95c7752a2706edd502098696
ChunkHolder playerchunk = this.getVisibleChunkIfPresent(pos);
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 32565740c6b013d9ad644e7c62d6721bdbd15b10..e2eff46cae9771931b2e0dfee5e73fd4842e3ab5 100644
index 0668f61ff7e52d1ea32af9f1fd1879d7280bb7cd..3c00b7519b37c5026e80e76a4b4ced2a3a0166f6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -176,6 +176,7 @@ import org.bukkit.event.weather.LightningStrikeEvent;
@ -6995,7 +6995,7 @@ index 32565740c6b013d9ad644e7c62d6721bdbd15b10..e2eff46cae9771931b2e0dfee5e73fd4
public class ServerLevel extends Level implements WorldGenLevel {
@@ -228,6 +229,98 @@ public class ServerLevel extends Level implements WorldGenLevel {
return convertable.dimensionType;
return this.convertable.dimensionType;
}
+ // Paper start
@ -7094,7 +7094,7 @@ index 32565740c6b013d9ad644e7c62d6721bdbd15b10..e2eff46cae9771931b2e0dfee5e73fd4
public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
// IRegistryCustom.Dimension iregistrycustom_dimension = minecraftserver.registryAccess(); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index fb5043e69ef59623c51b88176914f9f8becfc9ae..084339c7da80ce21ab8405e20b76af87dbbbe8ce 100644
index 2206e1846526df05636e80afbb499a867a26f1b7..a10f3b9b07692333a2d243bc5591e6e6a43fdf06 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -251,6 +251,8 @@ public class ServerPlayer extends Player {
@ -7159,7 +7159,7 @@ index a63d5ba706a5b8e430aedc045bdeb3a410bd0eef..e96a0ca47e4701ba187555bd92c96834
public BlockState getBlockState(BlockPos pos) {
return this.getChunk(SectionPos.blockToSectionCoord(pos.getX()), SectionPos.blockToSectionCoord(pos.getZ())).getBlockState(pos);
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 7f2ef8946be167e899656141d61921a2ff6356b0..fc56906135347e0d5e4b18c39adef6932496d924 100644
index 11d3b31be43c0e57a47578caff3014a205bb3beb..4c64ab1533534a1d5757722c796771b03db6367f 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -178,6 +178,7 @@ public abstract class PlayerList {
@ -7189,7 +7189,7 @@ index 337e0a7b3c14e1b1a28744920e0dc0a69e0c5a87..f5829ae484d93b547a5437b85a962134
@Override
public void tell(R runnable) {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 0863d7acce248895d57a4c0496881b542e4b79f1..6c5000ff3dbb7517d095e9fb2cdf555212b2c090 100644
index 33a88623ef7011fd60b2e4dd008bf54635714d81..9a29dea3c02cbca89faaa1cd9b750f1a2694d100 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -323,6 +323,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -7205,7 +7205,7 @@ index 0863d7acce248895d57a4c0496881b542e4b79f1..6c5000ff3dbb7517d095e9fb2cdf5552
public Entity(EntityType<?> type, Level world) {
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index d2458b1e6c34477b2e97a748edba9981af792587..e472679f23d2b9e727fec6f322f84fabbe0d02be 100644
index ba1c0ce4088b711897c028d62605b50719a89040..8fa96e6875b1d5dd66ef536d76648170b912c919 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -258,6 +258,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -7388,7 +7388,7 @@ index 3c707d6674b2594b09503b959a31c1f4ad3981e6..db61b6b0158a9bcc0e1d735e34fe3671
public BlockState getBlockState(BlockPos pos) {
return Blocks.AIR.defaultBlockState();
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index bacd4d875642cd93c3185f788745dd73a3cfde8a..003e2064f64115d1f5c48ac97e16100d4c10c5d7 100644
index 9f877007869ef984d2c95bd8e3d773a2b98f202c..384cb02b124dac42521767b0aff481a1b12c0eab 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -90,6 +90,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -7620,7 +7620,7 @@ index 532a0cae6db0d830e720a72e9021aa7a8ed0f106..e5e562f75e7d4b6a750f192842940c5e
this.levelHeightAccessor = heightLimitView;
this.sections = new LevelChunkSection[heightLimitView.getSectionsCount()];
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 4185b7528ac757a2d6ebca4da4d46e65b7a981d0..b32e1bba27c91e81b7382072c4d8230db695066c 100644
index 57805b84054e44a3d7c95cf269316a42205bb99c..17d36b53ec8efbc60b0648764f7195003e40fdcc 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -114,6 +114,109 @@ public class LevelChunk extends ChunkAccess {
@ -7856,7 +7856,7 @@ index 25156be63f91a1c41ef41154f675d04eb97459a8..47bab513feec217d875192afef61f3af
return false;
} else {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 146cf1168c82430b4faf35d7544abbec8e5f1c08..ea49dea83b9e8fa168e2a83451eed1b5977a336e 100644
index 300e79c796dcfcacd4e4828cd239291de54e07f0..9e1c76fe26a07bc211182b819df611b7b8fd2a13 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -243,8 +243,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -7913,7 +7913,7 @@ index 146cf1168c82430b4faf35d7544abbec8e5f1c08..ea49dea83b9e8fa168e2a83451eed1b5
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index bdf7d8e4256626b6866f8c6fed1fde64b7cc6892..2a55bbd728aea55a6ca0f6a7d856d1e3a3f1e1a3 100644
index c2a1c122f2072759ee69833f3529a89cde3ba535..145542a29cc7df606328a106dd044db956b2c8ff 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1202,4 +1202,37 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -7955,7 +7955,7 @@ index bdf7d8e4256626b6866f8c6fed1fde64b7cc6892..2a55bbd728aea55a6ca0f6a7d856d1e3
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 34a54a99e7484b2934e1d174c1b55f0472ff3812..40aad6a209fbded448e3db21207a85d9f2875e71 100644
index c6881e1d74476c2633e2c2bd3636134c844c5942..8eb170bd71c7158dcd1b90f9c8d46a13a2202509 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -23,6 +23,16 @@ import org.bukkit.material.MaterialData;
@ -7976,7 +7976,7 @@ index 34a54a99e7484b2934e1d174c1b55f0472ff3812..40aad6a209fbded448e3db21207a85d9
if (original instanceof CraftItemStack) {
CraftItemStack stack = (CraftItemStack) original;
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 07249989e6f0f76f8408363d7f20e7335b7a8e06..4d94c3a19f98f78476ecc403f410d75a6ea57c2d 100644
index 591c71352ad2a041ba5dc3d05b7ebc65fcca5e3c..e359668d9f4fceae13bf6c36842db9f2b2817c9b 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -44,6 +44,7 @@ import org.bukkit.scheduler.BukkitWorker;
@ -8026,7 +8026,7 @@ index 07249989e6f0f76f8408363d7f20e7335b7a8e06..4d94c3a19f98f78476ecc403f410d75a
this.currentTask = null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index 592a2a513ebf0002abf1255e11012ecc66adecf0..b89846e0f645c79afec018dae1d64a1bda043ed9 100644
index e4d1eb4a0ce2c9874922585f6bb0d9ead433fde1..d56abf283f38548faa790c57045033f7ade6f958 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -40,6 +40,21 @@ public class CraftTask implements BukkitTask, Runnable { // Spigot
@ -8300,7 +8300,7 @@ index d2026d218405a40a6949c5f491c04704811b72b5..629178347039893fb9de710810fe8112
public WorldBorder getWorldBorder() {
throw new UnsupportedOperationException("Not supported yet.");
diff --git a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
index aced43492a32d603690e75d0d9877667770fc6db..40d6bf127d288340e9c2500732d1e0963c186ebd 100644
index 96c4f7aed548a181f6b1487e58dcf157bae52daa..837e3d6ee71566b5a6f37a49438291333c47f5d1 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
@@ -120,6 +120,32 @@ public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAcc
@ -8337,7 +8337,7 @@ index aced43492a32d603690e75d0d9877667770fc6db..40d6bf127d288340e9c2500732d1e096
public void clear() {
// Create new array to reset memory usage to initial capacity
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index b599e098e6d2e6f78b89114e05cb03d716b7c5f4..83eabc34d952bbb13ec4b4bdcf34f647189c0b46 100644
index d10b1d3a134e11fa8417fa3c845f088d8fc1f71c..1d066ce7dcf5f548c2a34d308d4422ab4fd02e5a 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -118,7 +118,11 @@ public class SpigotConfig
@ -8352,4 +8352,4 @@ index b599e098e6d2e6f78b89114e05cb03d716b7c5f4..83eabc34d952bbb13ec4b4bdcf34f647
+ // Paper end
try
{
SpigotConfig.config.save( CONFIG_FILE );
SpigotConfig.config.save( SpigotConfig.CONFIG_FILE );

Datei anzeigen

@ -2152,7 +2152,7 @@ index 762a9392ffac3042356709dddd15bb3516048bed..3544e2dc2522e9d6305d727d56e73490
buf.writeComponent(this.footer);
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 2a7c614df7b9c9405a5dd23e6a888ede7fc86683..794ab78d91cb54008679aecbc8f01edaa6501cab 100644
index 36748baf6030028f083902459797f0719f50e456..b04967ebfc45222e294f932cfd3df3785f8198c6 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -190,6 +190,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot
@ -2249,7 +2249,7 @@ index 2a7c614df7b9c9405a5dd23e6a888ede7fc86683..794ab78d91cb54008679aecbc8f01eda
public boolean logIPs() {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 084339c7da80ce21ab8405e20b76af87dbbbe8ce..f7674978f032f020887546f593024c1442719127 100644
index a10f3b9b07692333a2d243bc5591e6e6a43fdf06..936e3e0563a2443e13eae1e8875080187420cf4e 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -156,6 +156,7 @@ import net.minecraft.world.scores.Score;
@ -2351,7 +2351,7 @@ index 084339c7da80ce21ab8405e20b76af87dbbbe8ce..f7674978f032f020887546f593024c14
this.chatVisibility = clientOptions.chatVisibility();
this.canChatColor = clientOptions.chatColors();
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index e7a9dd7791a0dd200c4d74922c6e5adaa5013669..b9062fe651de34d5b3f9d5f146ae0b4fe29cbfee 100644
index a6eddf98feb254d6694b553c6dc0a92034db269b..0a0a9f1be333911b6de7502a9541063ab9ea0164 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -47,7 +47,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@ -2428,7 +2428,7 @@ index ea26375d6f23b14a8a1cd926fe410713551de99d..ed80d9551cd7cc1ec26a5d5fd7bc185b
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index bbd256d088879f04762fcf628573f1348e4961a8..1c0a14dc1ddfe7806d06af83f9b5de6e42b4b0cc 100644
index 866e515ed6c6b73ca277df8931e24757b616a757..46f2da7f90fd92e6cbd1ae371d04af85ade86ec1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -45,6 +45,7 @@ import net.minecraft.nbt.ListTag;
@ -2500,7 +2500,7 @@ index bbd256d088879f04762fcf628573f1348e4961a8..1c0a14dc1ddfe7806d06af83f9b5de6e
+ // Paper end
+ } else if (false) { // Paper
Player player = this.getCraftPlayer();
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(server));
AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
String originalFormat = event.getFormat(), originalMessage = event.getMessage();
@@ -2044,7 +2053,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
@ -2520,7 +2520,7 @@ index bbd256d088879f04762fcf628573f1348e4961a8..1c0a14dc1ddfe7806d06af83f9b5de6e
@Override
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 7d3a924a56f8a3f5756400e26e67581ebff27445..ef5d73a296982d8b9ac022c5ea755843c2da1c84 100644
index 744ffa9410e3d11344472e64d2e08cb5e8608e30..0d1102e1b98235b8e7124321a65483a5e923d4a5 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -290,7 +290,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@ -2548,20 +2548,20 @@ index 7d3a924a56f8a3f5756400e26e67581ebff27445..ef5d73a296982d8b9ac022c5ea755843
}
}
diff --git a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
index 1cb95db25a20d38faacd99a5805630c1598e9db3..d99b2235038eb1aba8cda474c4aa51e207149ef4 100644
index b23480fab4a7cba922b36cb31d4f77f720bf3aac..7dd3dfd2ccc820d45849a89707239b7dbcaf44c3 100644
--- a/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
@@ -57,7 +57,7 @@ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListene
CraftIconCache icon = server.server.getServerIcon();
ServerListPingEvent() {
- super(connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), server.getMotd(), server.getPlayerList().getMaxPlayers());
+ super(connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), server.server.motd(), server.getPlayerList().getMaxPlayers()); // Paper - Adventure
- super(ServerStatusPacketListenerImpl.this.connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), server.getMotd(), server.getPlayerList().getMaxPlayers());
+ super(ServerStatusPacketListenerImpl.this.connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), server.server.motd(), server.getPlayerList().getMaxPlayers()); // Paper - Adventure
}
@Override
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index fc56906135347e0d5e4b18c39adef6932496d924..b278ecc71399b3c6f30040402a38e6673ff823e8 100644
index 4c64ab1533534a1d5757722c796771b03db6367f..cb8859c37fb8ce46a8fd529ca885456ea86c1c2b 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -270,7 +270,7 @@ public abstract class PlayerList {
@ -2866,7 +2866,7 @@ index 23bdb77690ba15bcbbfb0c70af23336d08ac7752..8f144a357174bbe096ac9b38a5e67a61
}
collection = icons;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index a694a208f7c84f4c2ffa654cdf96942e483eedba..39a3ab010a2960ea99a6cc246edd343994bb523f 100644
index 137aa7963d2d4f8477da1923f3bfdcb8acf2c65e..cbec0bf7822e9cf10b9ab4cc406eb1ea430f071a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -616,8 +616,10 @@ public final class CraftServer implements Server {
@ -2979,7 +2979,7 @@ index a694a208f7c84f4c2ffa654cdf96942e483eedba..39a3ab010a2960ea99a6cc246edd3439
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
}
@@ -2005,6 +2051,17 @@ public final class CraftServer implements Server {
return Thread.currentThread().equals(console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
}
+ // Paper start - Adventure
@ -3051,7 +3051,7 @@ index a694a208f7c84f4c2ffa654cdf96942e483eedba..39a3ab010a2960ea99a6cc246edd3439
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ea49dea83b9e8fa168e2a83451eed1b5977a336e..7efdca87cc2dda12e545d053e9fea271e9f857d1 100644
index 9e1c76fe26a07bc211182b819df611b7b8fd2a13..264cdde172452d0d9df652b0e78b21b6a6561300 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -153,6 +153,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -3122,7 +3122,7 @@ index ea49dea83b9e8fa168e2a83451eed1b5977a336e..7efdca87cc2dda12e545d053e9fea271
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 67d408b79422cf0c4aed6636cfd4ebb9e13e19f9..442beb8675d6d53a92fb6a5b7c2abdda2822e6fe 100644
index 3523f8851472890c97e628e22df883b91ba603fe..9fb74017c655c5abe4388796c4cb0760498e7a99 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -20,6 +20,12 @@ public class Main {
@ -3139,7 +3139,7 @@ index 67d408b79422cf0c4aed6636cfd4ebb9e13e19f9..442beb8675d6d53a92fb6a5b7c2abdda
OptionParser parser = new OptionParser() {
{
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
index 3ddf4cb8d6398bb6b0784c23b4eaae4abfbab47d..57925335811f814fbd6010e58dc0566401cae21d 100644
index e891b8d1c541d32b1e107fbf104655f4a1d1a58d..c4890927419e27fd35e4e373fb09dcb182234fbf 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
@@ -71,6 +71,19 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
@ -3163,7 +3163,7 @@ index 3ddf4cb8d6398bb6b0784c23b4eaae4abfbab47d..57925335811f814fbd6010e58dc05664
public String getCustomName() {
BeaconBlockEntity beacon = this.getSnapshot();
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
index 5a5ebbf8de32b94109efc67a0dd0053f9fb80917..bdd0647d683565088e5cfcd43fb26f4b776db338 100644
index 8d7efe856e79d9245da7dd2c7f807d7e227e2816..7f5d930b6bfaf9a0042f9be4be68f2cc111b304e 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
@@ -39,4 +39,16 @@ public class CraftCommandBlock extends CraftBlockEntityState<CommandBlockEntity>
@ -3232,7 +3232,7 @@ index 459e134e96121e611dd864f66a3f2cb64dbaf61c..ecb6f846cdaa2e9f01853001b1626315
public String getCustomName() {
EnchantmentTableBlockEntity enchant = this.getSnapshot();
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index f0be770664d4fa9bc2b3930cd9b449564873e153..c4fb012488202769ea221d66a8f05cb949b6c815 100644
index 1791d435552b812856f38dc6d8a97182b1a8eb12..94caa0915e1a9ec1c46c7a0380db840901cc8063 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -33,6 +33,23 @@ public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<
@ -3281,7 +3281,7 @@ index f0be770664d4fa9bc2b3930cd9b449564873e153..c4fb012488202769ea221d66a8f05cb9
Component[] components = new Component[4];
diff --git a/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java b/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
index 43f6ac44525048faf0b0cd2c11f9bc36fa0cab5d..4747d77fd5fd12116ef40d897a08c7baca60a399 100644
index d4724c812f8b7322ad59dc0695d01ceb47772dc4..4747d77fd5fd12116ef40d897a08c7baca60a399 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
@@ -12,37 +12,70 @@ import org.jetbrains.annotations.Nullable;
@ -3337,9 +3337,9 @@ index 43f6ac44525048faf0b0cd2c11f9bc36fa0cab5d..4747d77fd5fd12116ef40d897a08c7ba
- // Lazy initialization:
- Component[] messages = this.signText.getMessages(false);
- this.lines = new String[messages.length];
- System.arraycopy(CraftSign.revertComponents(messages), 0, lines, 0, lines.length);
- this.originalLines = new String[lines.length];
- System.arraycopy(lines, 0, originalLines, 0, originalLines.length);
- System.arraycopy(CraftSign.revertComponents(messages), 0, this.lines, 0, this.lines.length);
- this.originalLines = new String[this.lines.length];
- System.arraycopy(this.lines, 0, this.originalLines, 0, this.originalLines.length);
- }
- return this.lines;
+ // Paper start
@ -3372,7 +3372,7 @@ index 43f6ac44525048faf0b0cd2c11f9bc36fa0cab5d..4747d77fd5fd12116ef40d897a08c7ba
public SignText applyLegacyStringToSignSide() {
if (this.lines != null) {
- for (int i = 0; i < lines.length; i++) {
- for (int i = 0; i < this.lines.length; i++) {
- String line = (this.lines[i] == null) ? "" : this.lines[i];
- if (line.equals(this.originalLines[i])) {
+ // Paper start
@ -3390,7 +3390,7 @@ index 43f6ac44525048faf0b0cd2c11f9bc36fa0cab5d..4747d77fd5fd12116ef40d897a08c7ba
return this.signText;
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
index 3de88112bdb08d6bd0d28f20582c4090bfd8dbfe..87f2cea36d852c81fdb0a1bc21162d41377ab2e7 100644
index 59771cbfefeba8b582cd16dcf72c4ec177781a54..ab4142dfb23fc3bcf225f487f81bfdce035d8778 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
@@ -45,6 +45,18 @@ public class CraftBlockCommandSender extends ServerCommandSender implements Bloc
@ -3443,7 +3443,7 @@ index f3cb4102ab223f379f60dac317df7da1fab812a8..324e6d1a4fadd3e557e4ba05f04e6a58
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
index d545a3fa3d7728f9d4761175fc0acaa7a6fe3b01..ad731c5f76f19394866a121c64d4169ea8fb8cd7 100644
index e3c7fa50fad3077a297d2412de9d26d53371808c..5b7d230103f421fb939072e1526854f715430e51 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
@@ -39,6 +39,13 @@ public class CraftRemoteConsoleCommandSender extends ServerCommandSender impleme
@ -3510,7 +3510,7 @@ index 8107ed0d248ff2a1cf8e556b7610a68f6c197691..eaff8df6c8c12c64e005a68a02e2e35e
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
index f6c614bb1184f9c79121f64a2a030bf3f094b671..e8334e2264510f5101e80b4f130e7ae1442560d7 100644
index 07de73a43d6db344299442b35e17c6832b8e5a25..9ae78a0fe829c7487a945a801dbbca2375da1cbb 100644
--- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
+++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
@@ -189,6 +189,12 @@ public class CraftEnchantment extends Enchantment {
@ -3527,7 +3527,7 @@ index f6c614bb1184f9c79121f64a2a030bf3f094b671..e8334e2264510f5101e80b4f130e7ae1
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
return this.target;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 2a55bbd728aea55a6ca0f6a7d856d1e3a3f1e1a3..1557a28769cfe875b4c81ed503b2c1815caf8d90 100644
index 145542a29cc7df606328a106dd044db956b2c8ff..8be1e47f7cd6940b0ba213a2da0cc8334b256fc3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -206,6 +206,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -3590,7 +3590,7 @@ index 2a55bbd728aea55a6ca0f6a7d856d1e3a3f1e1a3..1557a28769cfe875b4c81ed503b2c181
@Override
public boolean isPermissionSet(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index 92ce36e3420e778ed39706e86b06389c4b13697f..b9578f7d0f61d15bee1f99181bf932cdbb0e611c 100644
index 454094dd30a119d5540a2af7c8fb8034573d7887..2bc97adea45672cdb5c8891a9fa461b2a81ff4e6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -320,9 +320,12 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@ -3624,7 +3624,7 @@ index 92ce36e3420e778ed39706e86b06389c4b13697f..b9578f7d0f61d15bee1f99181bf932cd
player.initMenu(container);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
index 10fa80df3ae2406f34af669f89d087b15ad1d71b..66fb6aeb49b7e93d2a4d9b5ce7f1a7d68f571cf5 100644
index 61759e8179d0f6342abf0c0294e5a024928db8d9..92e21126a9347f1ee2279ab09bb6abf2344ad2e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
@@ -59,6 +59,13 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
@ -3642,7 +3642,7 @@ index 10fa80df3ae2406f34af669f89d087b15ad1d71b..66fb6aeb49b7e93d2a4d9b5ce7f1a7d6
public boolean isOp() {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6c75e58ccb778d5f292c23743944b04bf3d2967e..d78b466e0e97557da78424c09ba1b61947c64dcd 100644
index 4cc709edc8de43639fd8d6b54d160b023a7e50b7..d7260f96da9974c721a8b49c1f9b0f1ee56c6ce1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -296,14 +296,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -3656,7 +3656,7 @@ index 6c75e58ccb778d5f292c23743944b04bf3d2967e..d78b466e0e97557da78424c09ba1b619
@Override
public void setDisplayName(final String name) {
+ this.getHandle().adventure$displayName = name != null ? net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().deserialize(name) : net.kyori.adventure.text.Component.text(this.getName()); // Paper
this.getHandle().displayName = name == null ? getName() : name;
this.getHandle().displayName = name == null ? this.getName() : name;
}
+ // Paper start
@ -3684,7 +3684,7 @@ index 6c75e58ccb778d5f292c23743944b04bf3d2967e..d78b466e0e97557da78424c09ba1b619
+ // Paper end
@Override
public String getPlayerListName() {
return this.getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
return this.getHandle().listName == null ? this.getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
@@ -322,42 +347,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
}
}
@ -3696,14 +3696,14 @@ index 6c75e58ccb778d5f292c23743944b04bf3d2967e..d78b466e0e97557da78424c09ba1b619
@Override
public String getPlayerListHeader() {
- return (this.playerListHeader == null) ? null : CraftChatMessage.fromComponent(playerListHeader);
+ return (this.playerListHeader == null) ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(playerListHeader);
- return (this.playerListHeader == null) ? null : CraftChatMessage.fromComponent(this.playerListHeader);
+ return (this.playerListHeader == null) ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.playerListHeader);
}
@Override
public String getPlayerListFooter() {
- return (this.playerListFooter == null) ? null : CraftChatMessage.fromComponent(playerListFooter);
+ return (this.playerListFooter == null) ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(playerListFooter); // Paper - Adventure
- return (this.playerListFooter == null) ? null : CraftChatMessage.fromComponent(this.playerListFooter);
+ return (this.playerListFooter == null) ? null : net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer.legacySection().serialize(this.playerListFooter); // Paper - Adventure
}
@Override
@ -4137,7 +4137,7 @@ index 5725b0281ac53a2354b233223259d6784353bc6e..9ef939b76d06874b856e0c850addb364
@Override
public int getLineWidth() {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 789469a9bae1c486180b19a32739334b4e0a37bc..73c6bbb854db86a58285466699358eeec4e603a0 100644
index bd21d57ea4a51ffa14c3650a67b12bed7f6b2f1f..a3cef5eea75fb868dadda191c61c119086cc7638 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -879,9 +879,9 @@ public class CraftEventFactory {
@ -4162,7 +4162,7 @@ index 789469a9bae1c486180b19a32739334b4e0a37bc..73c6bbb854db86a58285466699358eee
return event;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
index bfaa48cfda08c2716f61032b71d38285a9f715e8..1b526fff47e5a3d9a5325c73966dd2bf3dbbdc19 100644
index d32a20caeaf54e2db3c926f36b7efffba2a613b5..1b4b397c08d7c05f5a066274a00a6ec80601624a 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
@@ -72,6 +72,13 @@ public class CraftContainer extends AbstractContainerMenu {
@ -4178,7 +4178,7 @@ index bfaa48cfda08c2716f61032b71d38285a9f715e8..1b526fff47e5a3d9a5325c73966dd2bf
+
@Override
public String getTitle() {
return title;
return this.title;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
index c9cc23757a9fcc58d30b2915d4c5cfbc7d1c767a..fc0e1212022d1aa3506699b60ef338196eb54eba 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
@ -4346,7 +4346,7 @@ index 9e05a8515c5f6f340182e91150fcad8bbf80a22b..adf22ce4f0bcd3bd57dc2030c6c92d3d
@Override
public CraftMerchant getCraftMerchant() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index bd4524fd987877a287680cfa5744ce12045ebfbd..5d72d2c6fcab478121eb9b4216cf79532b58299e 100644
index 7753018d4e36091d25badc030ed8a3c9e431a369..5e01357208fe52c1d270c68cb19029ea0f4057bb 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -2,8 +2,9 @@ package org.bukkit.craftbukkit.inventory;
@ -4519,7 +4519,7 @@ index bd4524fd987877a287680cfa5744ce12045ebfbd..5d72d2c6fcab478121eb9b4216cf7953
if (this.hasTitle()) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
index 507fa96a3fb904b74429df5756c9a6378ec8c5b7..5c6eb9b6f3ca4fc6534fe023fe78be5c9f97e1a9 100644
index cc588fb207062829637adad79129ca91950496cb..8b27ca7606869798486c3afd03e86205c9864018 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
@@ -1,6 +1,6 @@
@ -4562,7 +4562,7 @@ index 507fa96a3fb904b74429df5756c9a6378ec8c5b7..5c6eb9b6f3ca4fc6534fe023fe78be5c
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 0cb3806b57c5a381b7f1fc04dcb7cfbf74fb5ef4..d1b2ff690580edb4e42cce6607afb189f28fb09a 100644
index 491bb97e478d8eac29d4682d0f54eb70c748151c..3d5abdf6986457e39fb216d8f5e257c9df880078 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -750,6 +750,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@ -4583,7 +4583,7 @@ index 0cb3806b57c5a381b7f1fc04dcb7cfbf74fb5ef4..d1b2ff690580edb4e42cce6607afb189
+
@Override
public String getDisplayName() {
return CraftChatMessage.fromJSONComponent(displayName);
return CraftChatMessage.fromJSONComponent(this.displayName);
@@ -785,6 +797,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return this.lore != null && !this.lore.isEmpty();
}
@ -4635,7 +4635,7 @@ index ed4415f6dd588c08c922efd5beebb3b124beb9d6..78a7ac47f20e84ccd67ff44d0bc7a2f2
return new CraftInventoryCustom(owner, size, title);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
index e69d5635d1c81a3bed54d2cb1b0316efb522ab5d..d09fc01a20e8426f4094899060c70e011ff65887 100644
index 163172fefcbe422972355b70f2ab2a4fb68ccb5c..25d1f24b6051851b905dfdbd4c5e30e6a80bc459 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
@@ -44,6 +44,12 @@ public final class CraftInventoryCreator {
@ -4734,20 +4734,20 @@ index 1980240d3dc0331ddf2ff56e163e2bfbd3b231ab..7a7f3f53aef601f124d474d9890e23d8
public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) {
// BrewingStand does not extend TileEntityLootable
diff --git a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
index 2bdbd99abc4f7c3ec6a27e3000b63f908554735c..2d2bf5c37709b8e747fbfa2db5ce86f258e86224 100644
index efb8f84534565efd37e3f934d2cb8527771db338..15e9dd8844f893de5e8372b847c9e8295d6f69ca 100644
--- a/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
+++ b/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
@@ -42,7 +42,7 @@ public class CraftMapRenderer extends MapRenderer {
}
MapDecoration decoration = worldMap.decorations.get(key);
MapDecoration decoration = this.worldMap.decorations.get(key);
- cursors.addCursor(decoration.x(), decoration.y(), (byte) (decoration.rot() & 15), decoration.type().getIcon(), true, CraftChatMessage.fromComponent(decoration.name()));
+ cursors.addCursor(decoration.x(), decoration.y(), (byte) (decoration.rot() & 15), decoration.type().getIcon(), true, decoration.name() == null ? null : io.papermc.paper.adventure.PaperAdventure.asAdventure(decoration.name())); // Paper
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
index 4f498569462a8812bbe77b57f9a2f15e8735a90a..be3e1c4765ba891462e36ce5b6e35f16e3ec189a 100644
index 17d9ef64feef6907681e09a570fb04727ea0b83b..5a9adade82970d8101b946596370d104721ac086 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
@@ -31,6 +31,21 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
@ -4828,7 +4828,7 @@ index e9cdca6d5fac186ef18167e183518ecade7b4471..3f09420ba9268ac1dc5440c073974437
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index 5540a766bc7edf8985058e29cc419c2c6b1d4428..baff11728120fda1740d5e15163760f50fe1cd1d 100644
index 4d586e1375ed8782939c9d480479e0dd981f8cbc..c0362c54d0d097ad6cd4616b3ab194e51258da1e 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -26,6 +26,63 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
@ -4896,7 +4896,7 @@ index 5540a766bc7edf8985058e29cc419c2c6b1d4428..baff11728120fda1740d5e15163760f5
@Override
public String getDisplayName() {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
index 78ea79b66cc9e90402ef5cdc2e5e04e0c74b1c26..4fede2161792ba3e7cdf0cc5a1f533188becc6f7 100644
index 0be5b600b5701f6132b52b8928dc5926b52201f3..19a102792fab30f8f6a7364d0a9b4063d76f1489 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
@@ -291,6 +291,7 @@ public final class CraftChatMessage {
@ -4969,23 +4969,23 @@ index 62c66e3179b9557cdba46242df0fb15bce7e7710..73a37638abacdffbff8274291a64ea6c
public boolean isLazy() {
return this.reference == null;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java b/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
index 75bc9ea10d80270217e4c75da98257a217b20097..673ab940fb53d42f6b6dbfe048d0281c4f508b0d 100644
index 0ab4c7eaffe69b314423732dd529aaeafc476e08..8a44e7260518bda87c6d0eeade98d5b81a04c3b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
@@ -16,9 +16,15 @@ public class LazyPlayerSet extends LazyHashSet<Player> {
@@ -16,9 +16,14 @@ public class LazyPlayerSet extends LazyHashSet<Player> {
}
@Override
- HashSet<Player> makeReference() {
+ protected HashSet<Player> makeReference() { // Paper - protected
Preconditions.checkState(reference == null, "Reference already created!");
List<ServerPlayer> players = this.server.getPlayerList().players;
Preconditions.checkState(this.reference == null, "Reference already created!");
- List<ServerPlayer> players = this.server.getPlayerList().players;
+ // Paper start
+ return makePlayerSet(this.server);
+ }
+ public static HashSet<Player> makePlayerSet(final MinecraftServer server) {
+ // Paper end
+ List<ServerPlayer> players = server.getPlayerList().players;
+ // Paper end
HashSet<Player> reference = new HashSet<Player>(players.size());
for (ServerPlayer player : players) {
reference.add(player.getBukkitEntity());

Datei anzeigen

@ -6994,7 +6994,7 @@ index 9cfdd5d8c1650d9c9bdfbc07980239e507ff942d..ae0b713870976d4b1e469a90cef9b2e2
Bootstrap.validate();
Util.startTimerHackThread();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f75e17f3b475fcdaa2aa83829df647a09b863071..bf4a82c183ad0aa148c6c14615d2d2606a8befb3 100644
index 8461cf5f99144edce646909a41208f702f1e2aff..e17ad4a7f7adcf7d54bcfa56dbb109fc5611574a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -274,7 +274,8 @@ public final class CraftServer implements Server {
@ -7013,7 +7013,7 @@ index f75e17f3b475fcdaa2aa83829df647a09b863071..bf4a82c183ad0aa148c6c14615d2d260
public void loadPlugins() {
- this.pluginManager.registerInterface(JavaPluginLoader.class);
-
- File pluginFolder = (File) console.options.valueOf("plugins");
- File pluginFolder = (File) this.console.options.valueOf("plugins");
-
- if (pluginFolder.exists()) {
- Plugin[] plugins = this.pluginManager.loadPlugins(pluginFolder);

Datei anzeigen

@ -732,7 +732,7 @@ index 6f1501e13e29ce25919c23213df53248c4b454d7..047fc7206131e0f36ab45d04e98b7a23
} catch (Exception exception) {
if (exception instanceof ReportedException) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 794ab78d91cb54008679aecbc8f01edaa6501cab..0eb3a55cbf2ed2c3f5e809ee60aba3767f7aa01b 100644
index b04967ebfc45222e294f932cfd3df3785f8198c6..7abd42e34ce14618f4987933cdd230879b6ac804 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -185,7 +185,7 @@ import org.bukkit.craftbukkit.Main;
@ -924,7 +924,7 @@ index 188ac9b2879d339a268f6c100c23f1dce90c195a..d10abd28c522612934aada8124e5bb67
i = this.context.runTopCommand(customfunction1, source);
} finally {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index ff3f00cf1d5180f83b16acac5676aa22cd967c8a..5aa21689e308842fe5b64689265ba45a299f7ad5 100644
index bf37590324fc900b1ae0cb49a0f8eaf6af81e93f..71e1f83e871f27f3de3afdbbeb432a9135d51f8b 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -58,8 +58,9 @@ import org.apache.logging.log4j.Level;
@ -966,13 +966,10 @@ index ff3f00cf1d5180f83b16acac5676aa22cd967c8a..5aa21689e308842fe5b64689265ba45a
this.executeBlocking(() -> {
CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
@@ -684,9 +687,40 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -684,9 +687,39 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
if (event.isCancelled()) {
return;
}
- ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
- server.dispatchServerCommand(event.getSender(), serverCommand);
+
+ // Paper start
+ command.set(event.getCommand());
+ if (event.getCommand().toLowerCase().startsWith("timings") && event.getCommand().toLowerCase().matches("timings (report|paste|get|merged|seperate)")) {
@ -987,8 +984,8 @@ index ff3f00cf1d5180f83b16acac5676aa22cd967c8a..5aa21689e308842fe5b64689265ba45a
+ co.aikar.timings.Timings.generateReport(new co.aikar.timings.TimingsReportListener(sender, waitable));
+ } else {
+ // Paper end
+ ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
+ server.dispatchServerCommand(event.getSender(), serverCommand);
ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
this.server.dispatchServerCommand(event.getSender(), serverCommand);
+ } // Paper
});
+ // Paper start
@ -1010,7 +1007,7 @@ index ff3f00cf1d5180f83b16acac5676aa22cd967c8a..5aa21689e308842fe5b64689265ba45a
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index 10132390dd356461f696971b34df3eeed05c572e..4dc04c16453174dde2c6bfad711ec9dec01c8f30 100644
index 770f6a08c613093577172385549df8040ded627b..c1bb511cc25ca97282ee02d2b207e2940279c190 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -1,8 +1,10 @@
@ -1067,14 +1064,14 @@ index 10132390dd356461f696971b34df3eeed05c572e..4dc04c16453174dde2c6bfad711ec9de
}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index f402341b95c7752a2706edd502098696f786f4ef..b1fd6118132ba38f60d2a2b15c09231fa29be8fa 100644
index 4ff18d9995d5d26bde4dbe2ec31c77c2d1515227..c2db2aad2498f0be2e904d5869a9b0bd3411618c 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -415,13 +415,15 @@ public class ServerChunkCache extends ChunkSource {
}
gameprofilerfiller.incrementCounter("getChunkCacheMiss");
- level.timings.syncChunkLoadTimer.startTiming(); // Spigot
- this.level.timings.syncChunkLoadTimer.startTiming(); // Spigot
CompletableFuture<Either<ChunkAccess, ChunkHolder.ChunkLoadingFailure>> completablefuture = this.getChunkFutureMainThread(x, z, leastStatus, create);
ServerChunkCache.MainThreadExecutor chunkproviderserver_b = this.mainThreadProcessor;
@ -1082,7 +1079,7 @@ index f402341b95c7752a2706edd502098696f786f4ef..b1fd6118132ba38f60d2a2b15c09231f
+ if (!completablefuture.isDone()) { // Paper
+ this.level.timings.syncChunkLoad.startTiming(); // Paper
chunkproviderserver_b.managedBlock(completablefuture::isDone);
- level.timings.syncChunkLoadTimer.stopTiming(); // Spigot
- this.level.timings.syncChunkLoadTimer.stopTiming(); // Spigot
+ this.level.timings.syncChunkLoad.stopTiming(); // Paper
+ } // Paper
ichunkaccess = (ChunkAccess) ((Either) completablefuture.join()).map((ichunkaccess1) -> {
@ -1109,7 +1106,7 @@ index f402341b95c7752a2706edd502098696f786f4ef..b1fd6118132ba38f60d2a2b15c09231f
this.level.timings.doChunkUnload.startTiming(); // Spigot
@@ -688,13 +694,16 @@ public class ServerChunkCache extends ChunkSource {
boolean flag1 = level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && worlddata.getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
gameprofilerfiller.push("naturalSpawnCount");
+ this.level.timings.countNaturalMobs.startTiming(); // Paper - timings
@ -1159,7 +1156,7 @@ index f402341b95c7752a2706edd502098696f786f4ef..b1fd6118132ba38f60d2a2b15c09231f
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index e2eff46cae9771931b2e0dfee5e73fd4842e3ab5..988a17cd0b960a07795d999dd125eae3a63d4227 100644
index 3c00b7519b37c5026e80e76a4b4ced2a3a0166f6..e48172c1da6beb7ff5ba3486647b126325b826a7 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1,6 +1,8 @@
@ -1183,8 +1180,8 @@ index e2eff46cae9771931b2e0dfee5e73fd4842e3ab5..988a17cd0b960a07795d999dd125eae3
this.updateSkyBrightness();
this.tickTime();
gameprofilerfiller.popPush("tickPending");
- timings.doTickPending.startTiming(); // Spigot
+ timings.scheduledBlocks.startTiming(); // Paper
- this.timings.doTickPending.startTiming(); // Spigot
+ this.timings.scheduledBlocks.startTiming(); // Paper
if (!this.isDebug()) {
j = this.getGameTime();
gameprofilerfiller.push("blockTicks");
@ -1192,8 +1189,8 @@ index e2eff46cae9771931b2e0dfee5e73fd4842e3ab5..988a17cd0b960a07795d999dd125eae3
this.fluidTicks.tick(j, 65536, this::tickFluid);
gameprofilerfiller.pop();
}
- timings.doTickPending.stopTiming(); // Spigot
+ timings.scheduledBlocks.stopTiming(); // Paper
- this.timings.doTickPending.stopTiming(); // Spigot
+ this.timings.scheduledBlocks.stopTiming(); // Paper
gameprofilerfiller.popPush("raid");
+ this.timings.raids.startTiming(); // Paper - timings
@ -1204,7 +1201,7 @@ index e2eff46cae9771931b2e0dfee5e73fd4842e3ab5..988a17cd0b960a07795d999dd125eae3
this.getChunkSource().tick(shouldKeepTicking, true);
+ this.timings.chunkProviderTick.stopTiming(); // Paper - timings
gameprofilerfiller.popPush("blockEvents");
timings.doSounds.startTiming(); // Spigot
this.timings.doSounds.startTiming(); // Spigot
this.runBlockEvents();
@@ -625,6 +630,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
}
@ -1258,7 +1255,7 @@ index e2eff46cae9771931b2e0dfee5e73fd4842e3ab5..988a17cd0b960a07795d999dd125eae3
@@ -999,6 +1014,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
if (!savingDisabled) {
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
+ try (co.aikar.timings.Timing ignored = timings.worldSave.startTiming()) { // Paper
if (progressListener != null) {
progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
@ -1275,7 +1272,7 @@ index e2eff46cae9771931b2e0dfee5e73fd4842e3ab5..988a17cd0b960a07795d999dd125eae3
this.entityManager.saveAll();
} else {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 1c0a14dc1ddfe7806d06af83f9b5de6e42b4b0cc..688f974d9e4f9728dfb1a41e083cf3247743cd22 100644
index 46f2da7f90fd92e6cbd1ae371d04af85ade86ec1..ddd7238458804de3a82018ac7f170007f4f195aa 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -320,7 +320,6 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -1322,7 +1319,7 @@ index 1c0a14dc1ddfe7806d06af83f9b5de6e42b4b0cc..688f974d9e4f9728dfb1a41e083cf324
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index b278ecc71399b3c6f30040402a38e6673ff823e8..5583b4db7813aeb88359243233d213474c48f402 100644
index cb8859c37fb8ce46a8fd529ca885456ea86c1c2b..8f7bc04fc32e3b9c0625d795b09ea7f2e950fc05 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1,5 +1,6 @@
@ -1346,7 +1343,7 @@ index b278ecc71399b3c6f30040402a38e6673ff823e8..5583b4db7813aeb88359243233d21347
public UserWhiteList getWhiteList() {
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 6c5000ff3dbb7517d095e9fb2cdf555212b2c090..8b3763ba7f5648c41c5bf8a72e5c801d5483e6e0 100644
index 9a29dea3c02cbca89faaa1cd9b750f1a2694d100..5f3c9fcd7f34098a4136646fb373441f77175bb3 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -134,7 +134,6 @@ import org.bukkit.craftbukkit.event.CraftPortalEvent;
@ -1424,7 +1421,7 @@ index fe7180dfc7ddaac8d60422c072d2e172d669cf57..cea1a8eaae8dfc36efd09e3ac57a7062
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index e472679f23d2b9e727fec6f322f84fabbe0d02be..de73a18438462b478af813a7a709964506b41174 100644
index 8fa96e6875b1d5dd66ef536d76648170b912c919..f6cfed5ac40726475d1c121d0095c105f9426ae7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -140,7 +140,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -1505,7 +1502,7 @@ index e472679f23d2b9e727fec6f322f84fabbe0d02be..de73a18438462b478af813a7a7099645
if (!this.level().isClientSide && this.isSensitiveToWater() && this.isInWaterRainOrBubble()) {
this.hurt(this.damageSources().drown(), 1.0F);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 003e2064f64115d1f5c48ac97e16100d4c10c5d7..d87f02c748fe2e5b4ea251f6691e8907a152cb6d 100644
index 384cb02b124dac42521767b0aff481a1b12c0eab..43b631634ff225fa007af552f51f00150892185b 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -88,7 +88,6 @@ import org.bukkit.Bukkit;
@ -1530,17 +1527,17 @@ index 003e2064f64115d1f5c48ac97e16100d4c10c5d7..d87f02c748fe2e5b4ea251f6691e8907
});
// CraftBukkit end
- this.timings = new SpigotTimings.WorldTimingsHandler(this); // Spigot - code below can generate new world and access timings
+ timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
+ this.timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
}
@@ -714,15 +713,14 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
timings.tileEntityTick.stopTiming(); // Spigot
this.timings.tileEntityTick.stopTiming(); // Spigot
this.tickingBlockEntities = false;
+ co.aikar.timings.TimingHistory.tileEntityTicks += this.blockEntityTickers.size(); // Paper
gameprofilerfiller.pop();
spigotConfig.currentPrimedTnt = 0; // Spigot
this.spigotConfig.currentPrimedTnt = 0; // Spigot
}
public <T extends Entity> void guardEntityTick(Consumer<T> tickConsumer, T entity) {
@ -1590,7 +1587,7 @@ index c02fa35cefc9194d1838abbe4f2dc2b226a41e41..b300d12e9e00519028b53aca9c3fb01f
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
public CraftPersistentDataContainer persistentDataContainer;
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index b32e1bba27c91e81b7382072c4d8230db695066c..1e434faaf56f7d1501367c4371131a8da30c0421 100644
index 17d36b53ec8efbc60b0648764f7195003e40fdcc..93348550f1632f7fc567eb5b42cd03d78532e383 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -682,6 +682,7 @@ public class LevelChunk extends ChunkAccess {
@ -1636,7 +1633,7 @@ index 0eb09ce5c850d85ffd7229d27cf06b3e0edda11b..cc1d7626a82881c4410d65c6a33dadae
};
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 15fa1f1bd2bdd007667e574775b14f0c73f1bb52..200c4f394002b7a7592f7fe6fdf885f396cf23eb 100644
index e17ad4a7f7adcf7d54bcfa56dbb109fc5611574a..dc7762af207bbbac133f74ae5e0783e5bc075a51 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -376,7 +376,7 @@ public final class CraftServer implements Server {
@ -1850,7 +1847,7 @@ index b0ffa23faf62629043dfd613315eaf9c5fcc2cfe..00000000000000000000000000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d78b466e0e97557da78424c09ba1b61947c64dcd..55bd1f3958ac058709077a34016187466824e98e 100644
index d7260f96da9974c721a8b49c1f9b0f1ee56c6ce1..929e17d45db1a107f628907d1d3eea17ba968e7e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2568,6 +2568,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -1869,7 +1866,7 @@ index d78b466e0e97557da78424c09ba1b61947c64dcd..55bd1f3958ac058709077a3401618746
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 4d94c3a19f98f78476ecc403f410d75a6ea57c2d..fcbf32a233c240dd45f75ee736bd102ce9f79332 100644
index e359668d9f4fceae13bf6c36842db9f2b2817c9b..0806f97007f4729dab859855fdae91c088671864 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -1,5 +1,6 @@
@ -1945,7 +1942,7 @@ index 4d94c3a19f98f78476ecc403f410d75a6ea57c2d..fcbf32a233c240dd45f75ee736bd102c
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index b89846e0f645c79afec018dae1d64a1bda043ed9..3f45bab0e9f7b3697e6d9d1092a1e6e579f7066f 100644
index d56abf283f38548faa790c57045033f7ade6f958..ea26d9464644b5217879b8c21b4da28e57708dcb 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -1,12 +1,15 @@
@ -2081,7 +2078,7 @@ index 1c70aa4475bb43aba2f66eedabd4d1f5c5ae3409..0a2a6697118833d45ffe95252cee8011
* This helper class represents the different NBT Tags.
* <p>
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 7cdfd82fdef19d5732ebc2126e2c377b441de596..ebd48f9977553174b14bdc7429c07d8352f5a297 100644
index 0c7c97f27853843ec714e47f5b570f9d09bbba14..e01ef22189ce80429eb0054e416547577fd3cc5d 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -27,7 +27,7 @@ import net.minecraft.world.entity.projectile.ThrownTrident;
@ -2115,7 +2112,7 @@ index 7cdfd82fdef19d5732ebc2126e2c377b441de596..ebd48f9977553174b14bdc7429c07d83
final int animalActivationRange = world.spigotConfig.animalActivationRange;
@@ -134,7 +134,7 @@ public class ActivationRange
world.getEntities().get(maxBB, ActivationRange::activateEntity);
world.getEntities().get(ActivationRange.maxBB, ActivationRange::activateEntity);
}
- SpigotTimings.entityActivationCheckTimer.stopTiming();
+ MinecraftTimings.entityActivationCheckTimer.stopTiming();

Datei anzeigen

@ -16652,7 +16652,7 @@ index ae0b713870976d4b1e469a90cef9b2e282dbcaab..646cd39c46d86899f23c8179c0790e32
DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::new);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0eb3a55cbf2ed2c3f5e809ee60aba3767f7aa01b..151259cc254d4e796e6af810e37eaa30b832daa3 100644
index 7abd42e34ce14618f4987933cdd230879b6ac804..27ab6d2749b89cc5d3fd4e22603daee95634be71 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -294,7 +294,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -16767,7 +16767,7 @@ index 0eb3a55cbf2ed2c3f5e809ee60aba3767f7aa01b..151259cc254d4e796e6af810e37eaa30
try {
if (!this.initServer()) {
@@ -968,6 +951,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
Arrays.fill( recentTps, 20 );
Arrays.fill( this.recentTps, 20 );
long curTime, tickSection = Util.getMillis(), tickCount = 1;
while (this.running) {
+ // Paper start - rewrite chunk system
@ -16801,7 +16801,7 @@ index 0eb3a55cbf2ed2c3f5e809ee60aba3767f7aa01b..151259cc254d4e796e6af810e37eaa30
public boolean isDebugging() {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 5aa21689e308842fe5b64689265ba45a299f7ad5..71da1294cf3b09e53e3e846d59b3bf27a8dca618 100644
index 71e1f83e871f27f3de3afdbbeb432a9135d51f8b..4d81f9789a018463fdec503d795b0ffc7ccb94d6 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -399,7 +399,34 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -17518,7 +17518,7 @@ index 807a6bb1026dac2c4cd0a50afe06fd62ce23558b..2b998bdbe49bf8211b755e0eb7c1bf13
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index b47e30e9ebe0d6a930e01aaf67c138fc345fb11e..e2510ee3f0cb93eae2452bec642855cd6c0c2974 100644
index 1fcfff903a9423512f1fc6c997b67597e4e2831d..e580df88baadfd943756b1e440c7253a287fa0e9 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -118,10 +118,7 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
@ -19101,7 +19101,7 @@ index f3c9a3dbb6f0e6f825b7477c89ed72ed52845419..942042863f0105769c15b865d4d98a09
+ */ // Paper - rewrite chunk system
}
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index b1fd6118132ba38f60d2a2b15c09231fa29be8fa..65d447df49d8c4a27de9ae7f9e298bf705c688bc 100644
index c2db2aad2498f0be2e904d5869a9b0bd3411618c..b2367f3836689f3aa27b1b4905219e07e6173c93 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -141,108 +141,7 @@ public class ServerChunkCache extends ChunkSource {
@ -19524,7 +19524,7 @@ index b1fd6118132ba38f60d2a2b15c09231fa29be8fa..65d447df49d8c4a27de9ae7f9e298bf7
- return super.pollTask();
}
- } finally {
- chunkMap.callbackExecutor.run();
- ServerChunkCache.this.chunkMap.callbackExecutor.run();
- }
- // CraftBukkit end
+ return super.pollTask() | ServerChunkCache.this.level.chunkTaskScheduler.executeMainThreadTask(); // Paper - rewrite chunk system
@ -19532,7 +19532,7 @@ index b1fd6118132ba38f60d2a2b15c09231fa29be8fa..65d447df49d8c4a27de9ae7f9e298bf7
}
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 988a17cd0b960a07795d999dd125eae3a63d4227..0261baddef54c47f7b32f4e2a31ba0172e676d38 100644
index e48172c1da6beb7ff5ba3486647b126325b826a7..faf0d1e2330b85262cb615cdda360822e246df27 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -194,7 +194,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -20103,7 +20103,7 @@ index 988a17cd0b960a07795d999dd125eae3a63d4227..0261baddef54c47f7b32f4e2a31ba017
@Override
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index f7674978f032f020887546f593024c1442719127..80105ed5ab45552d86b2302586de7511dbe729d2 100644
index 936e3e0563a2443e13eae1e8875080187420cf4e..d7c4ce86956c0461603e8d569e9bebe39f07c8a1 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -257,6 +257,50 @@ public class ServerPlayer extends Player {
@ -20474,7 +20474,7 @@ index c509a1318bcef38fd4927e38b6ee9846853e2d15..5de5209e04d631bd6a50e28e8d3abebf
this.desiredChunksPerTick = Double.isNaN((double)desiredBatchSize) ? 0.01F : Mth.clamp(desiredBatchSize, 0.01F, 64.0F);
if (this.unacknowledgedBatches == 0) {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 688f974d9e4f9728dfb1a41e083cf3247743cd22..ea53b30fb9b9e0b2b9751b7a2675259fe85c66e4 100644
index ddd7238458804de3a82018ac7f170007f4f195aa..c69060ee036c25cf99da5e488697ed95fd01fed1 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -695,6 +695,13 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -20492,7 +20492,7 @@ index 688f974d9e4f9728dfb1a41e083cf3247743cd22..ea53b30fb9b9e0b2b9751b7a2675259f
StringReader stringreader = new StringReader(packet.getCommand());
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 5583b4db7813aeb88359243233d213474c48f402..71e097d0944bbfdf9dbde2f867870ff483a8d2d4 100644
index 8f7bc04fc32e3b9c0625d795b09ea7f2e950fc05..afaa046ff1adf717ef8356cc276a55d63abc0aba 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -251,7 +251,7 @@ public abstract class PlayerList {
@ -20643,7 +20643,7 @@ index 495b52bfab14478f8285cc5471335a41244c199e..e16ef1b7c0bfe6d6194c09f6787a50fd
if (flag1) {
++this.converted;
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8b3763ba7f5648c41c5bf8a72e5c801d5483e6e0..0e79e92014dd56fc2ba98ce6050463627a0cde9f 100644
index 5f3c9fcd7f34098a4136646fb373441f77175bb3..a7cb0c3b13e4a7c449aca85fd8ddffefba45f879 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -327,6 +327,58 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -21056,7 +21056,7 @@ index b6a3c75b84d9f768afee33aa0f226207b307c1c0..2ec2b1d9d987c7f31c685aec3d3c87f4
<T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate);
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index d87f02c748fe2e5b4ea251f6691e8907a152cb6d..5988c0847af4e8f0094328e91f736f25d567db60 100644
index 43b631634ff225fa007af552f51f00150892185b..ec31a60fae419fb610f216bd42558e6aa57c2e19 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -453,6 +453,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -21313,7 +21313,7 @@ index 846ae3fd184a1d63b743aa25e045604576697c96..a907b79fd8291a0e92db138f37239d17
public int getIndex() {
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index f75d37091018d5544099861e2fe7d3fd04870750..9da26705d41931e77bff0e6a4d73bb9263e6989e 100644
index 42f29413d18b0df039736a87e4e5c1d15700f916..c2663fadd2c714b25fe411777ca9be957c3545df 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -83,6 +83,7 @@ public class LevelChunk extends ChunkAccess {
@ -22586,24 +22586,24 @@ index 9f6c2e5b5d9e8d714a47c770e255d06c0ef7c190..ac807277a6b26d140ea9873d17c7aa4f
for(SavedTick<T> savedTick : this.pendingTicks) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index c8c3c8b82a013f4903d3fff4613753d84c4eb770..54448802a7db5734159c381226a50e7be4ec8368 100644
index b1aeb021e53a233bfb0439d38f1a889ed6fc301d..7687a81bfa420e8377308fea3d6738141bc945d3 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -113,7 +113,7 @@ public class CraftChunk implements Chunk {
@Override
public boolean isEntitiesLoaded() {
- return this.getCraftWorld().getHandle().entityManager.areEntitiesLoaded(ChunkPos.asLong(x, z));
- return this.getCraftWorld().getHandle().entityManager.areEntitiesLoaded(ChunkPos.asLong(this.x, this.z));
+ return this.getCraftWorld().getHandle().areEntitiesLoaded(io.papermc.paper.util.CoordinateUtils.getChunkKey(this.x, this.z)); // Paper - rewrite chunk system
}
@Override
@@ -122,51 +122,7 @@ public class CraftChunk implements Chunk {
this.getWorld().getChunkAt(x, z); // Transient load for this tick
this.getWorld().getChunkAt(this.x, this.z); // Transient load for this tick
}
- PersistentEntitySectionManager<net.minecraft.world.entity.Entity> entityManager = this.getCraftWorld().getHandle().entityManager;
- long pair = ChunkPos.asLong(x, z);
- long pair = ChunkPos.asLong(this.x, this.z);
-
- if (entityManager.areEntitiesLoaded(pair)) {
- return entityManager.getEntities(new ChunkPos(this.x, this.z)).stream()
@ -22647,12 +22647,12 @@ index c8c3c8b82a013f4903d3fff4613753d84c4eb770..54448802a7db5734159c381226a50e7b
- return entityManager.getEntities(new ChunkPos(this.x, this.z)).stream()
- .map(net.minecraft.world.entity.Entity::getBukkitEntity)
- .filter(Objects::nonNull).toArray(Entity[]::new);
+ return getCraftWorld().getHandle().getChunkEntities(this.x, this.z); // Paper - rewrite chunk system
+ return this.getCraftWorld().getHandle().getChunkEntities(this.x, this.z); // Paper - rewrite chunk system
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 200c4f394002b7a7592f7fe6fdf885f396cf23eb..e4bc9b3b7097c1fc3cc15698744a995b15a2b98e 100644
index dc7762af207bbbac133f74ae5e0783e5bc075a51..c3cf8b9d2b5707d36310da2c3b5132af4b83508a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1161,7 +1161,7 @@ public final class CraftServer implements Server {
@ -22677,13 +22677,13 @@ index 200c4f394002b7a7592f7fe6fdf885f396cf23eb..e4bc9b3b7097c1fc3cc15698744a995b
@Override
public boolean isPrimaryThread() {
- return Thread.currentThread().equals(console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
- return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
+ return io.papermc.paper.util.TickThread.isTickThread(); // Paper - rewrite chunk system
}
// Paper start - Adventure
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 7efdca87cc2dda12e545d053e9fea271e9f857d1..c0eef4c85729de69fa9bea2e1851e17fb9fdb882 100644
index 264cdde172452d0d9df652b0e78b21b6a6561300..e8f3373985ba8d3af6fc93a5f0ba0f0a04f7fc6f 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -323,10 +323,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -22749,13 +22749,13 @@ index 7efdca87cc2dda12e545d053e9fea271e9f857d1..c0eef4c85729de69fa9bea2e1851e17f
// Spigot start
@Override
public int getViewDistance() {
- return world.spigotConfig.viewDistance;
- return this.world.spigotConfig.viewDistance;
+ return this.getHandle().playerChunkLoader.getAPIViewDistance(); // Paper - replace player chunk loader
}
@Override
public int getSimulationDistance() {
- return world.spigotConfig.simulationDistance;
- return this.world.spigotConfig.simulationDistance;
+ return this.getHandle().playerChunkLoader.getAPITickDistance(); // Paper - replace player chunk loader
}
// Spigot end
@ -22802,7 +22802,7 @@ index 7efdca87cc2dda12e545d053e9fea271e9f857d1..c0eef4c85729de69fa9bea2e1851e17f
// Spigot start
private final org.bukkit.World.Spigot spigot = new org.bukkit.World.Spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 55bd1f3958ac058709077a34016187466824e98e..fb623fed603d235693b86e3a9f3f685187d6fb4e 100644
index 929e17d45db1a107f628907d1d3eea17ba968e7e..fe4b5fe105b9054763fc4440bdb892b69128cb2b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -197,6 +197,48 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -22940,16 +22940,16 @@ index 629178347039893fb9de710810fe8112499bb91c..d5861dfa771c4eb217e082e3c832c3a6
+ // Paper end
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index ebd48f9977553174b14bdc7429c07d8352f5a297..6606a118e7bff01aa51440aea7540ec9feec6cc5 100644
index e01ef22189ce80429eb0054e416547577fd3cc5d..47e7fd7baf3ec6ed3ec9b5e6d73ed8611c2b1ce1 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -132,7 +132,13 @@ public class ActivationRange
ActivationType.ANIMAL.boundingBox = player.getBoundingBox().inflate( animalActivationRange, 256, animalActivationRange );
ActivationType.MONSTER.boundingBox = player.getBoundingBox().inflate( monsterActivationRange, 256, monsterActivationRange );
- world.getEntities().get(maxBB, ActivationRange::activateEntity);
- world.getEntities().get(ActivationRange.maxBB, ActivationRange::activateEntity);
+ // Paper start
+ java.util.List<Entity> entities = world.getEntities((Entity)null, maxBB, null);
+ java.util.List<Entity> entities = world.getEntities((Entity)null, ActivationRange.maxBB, null);
+ for (int i = 0; i < entities.size(); i++) {
+ Entity entity = entities.get(i);
+ ActivationRange.activateEntity(entity);
@ -22972,7 +22972,7 @@ index 78669fa035b7537ff7e533cf32aaf2995625424f..05e94702e42b8f5c35d2a112c486d579
throw new IllegalStateException( "Asynchronous " + reason + "!" );
}
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 335120afc88a8fc1543c2e6df516fd728e3ab032..f1194eb6fdfba60959e00080d0562f2820d13b27 100644
index c4bf7053d83d207caca0e13e19f5c1afa7062de3..7621bf889ef765ed57af221edf95b07346f4ae43 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -8,7 +8,7 @@ import java.util.logging.Logger;

Datei anzeigen

@ -5,14 +5,14 @@ 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 5988c0847af4e8f0094328e91f736f25d567db60..fb78a91d1ab77f909823422c6d4e2ef7ed10c9c3 100644
index ec31a60fae419fb610f216bd42558e6aa57c2e19..1e57df43ea47f18cc151dc8ad5fd6f18d3615462 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -261,6 +261,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
});
// CraftBukkit end
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
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
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
}

Datei anzeigen

@ -12,7 +12,7 @@ Previous implementation did not calculate TPS correctly.
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index ce626187e7ffda51a54225fa6e43b817c6c19db8..086be61bfc8a43076b502bbf00e9f2d2785495d3 100644
index 6155d6e3c361bb4a0381e7065a7b603b783a47a6..d13a0f5a3b95b0d0ca80c760f757087c88eceaeb 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -277,7 +277,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -94,7 +94,7 @@ index ce626187e7ffda51a54225fa6e43b817c6c19db8..086be61bfc8a43076b502bbf00e9f2d2
@@ -949,7 +1000,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
// Spigot start
Arrays.fill( recentTps, 20 );
Arrays.fill( this.recentTps, 20 );
- long curTime, tickSection = Util.getMillis(), tickCount = 1;
+ long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
+ lastTick = start - TICK_TIME; // Paper
@ -145,7 +145,7 @@ index ce626187e7ffda51a54225fa6e43b817c6c19db8..086be61bfc8a43076b502bbf00e9f2d2
this.startMetricsRecordingTick();
this.profiler.push("tick");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 53168d866c59d38c83e9c532109bb2b4371459d2..733b2dec7eb1bf7d1fa392750b2872076b23f3ab 100644
index e2f17636045abf56c04567d8cd7f0dfcdeee0f7e..2aa305814e2207cd80cf4630fda8e1adf456db54 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2478,6 +2478,17 @@ public final class CraftServer implements Server {
@ -167,7 +167,7 @@ index 53168d866c59d38c83e9c532109bb2b4371459d2..733b2dec7eb1bf7d1fa392750b287207
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
{
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
index 4ab81a99f906e3f28e026d0e50b5b943c1bdcfb5..bf970bf3356a914459c2d6db93537ce2d32c7e18 100644
index d9ec48be0fdd2bfea938aa29e36b0f6ffa839ab2..9eb2823cc8f83bad2626fc77578b0162d9ed5782 100644
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
@@ -15,6 +15,12 @@ public class TicksPerSecondCommand extends Command

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 10a99aff9632db578d19683675ba12242ae6970b..77668e9534f6d68755020cbae09aae5d47d10fa1 100644
index 61ec0ed91457e4b04a72010199be520c9d4a9488..b5a8d2505fa41c68abb1400a4269f833537b6ebe 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -214,7 +214,7 @@ public class ServerPlayer extends Player {
@ -27,7 +27,7 @@ index 10a99aff9632db578d19683675ba12242ae6970b..77668e9534f6d68755020cbae09aae5d
this.chunkTrackingView = ChunkTrackingView.EMPTY;
this.respawnDimension = Level.OVERWORLD;
@@ -1862,9 +1862,10 @@ public class ServerPlayer extends Player {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
this.server.server.getPluginManager().callEvent(event);
}
- if (!this.language.equals(clientOptions.language())) {
@ -39,7 +39,7 @@ index 10a99aff9632db578d19683675ba12242ae6970b..77668e9534f6d68755020cbae09aae5d
// CraftBukkit end
this.language = clientOptions.language();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f31df6901597891e269fa4e64ac7714561a2e8a7..944f6b53d1ed9e55900dd2d09c6e4b386ccbd3f2 100644
index c06f9da7d33c8d86fdcdd1f293f28e66f63e4de1..850ea32a2ebc192a89c9feec5dbc83f3f7314bfc 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2247,7 +2247,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -5,7 +5,7 @@ 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 da553430864689c426ad2c1dd74ad7d1134ffbae..78041052d7ab2e6b60405ce7e02468458650db22 100644
index 30a3e2586a1e75c5f146f8d19c53cabe28f61925..c2dd635cba209962d24b43fbf0ee0e9d9e82fee0 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -694,9 +694,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -17,5 +17,5 @@ index da553430864689c426ad2c1dd74ad7d1134ffbae..78041052d7ab2e6b60405ce7e0246845
- this.tileTickPosition++, tilesThisCycle++) {
+ 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(tileTickPosition);
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
// Spigot start

Datei anzeigen

@ -18,14 +18,14 @@ index 2e343d108714bd136ab8e7b20acbf241166177de..382cdfd7d7dceeeffed1cdc34b9e475a
if (random.nextInt(10) == 0 && flag && pos.getY() < 40) {
return checkMobSpawnRules(type, world, spawnReason, pos, random);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 54448802a7db5734159c381226a50e7be4ec8368..9363bcb40963bcbc39a26313260a41eef34981c1 100644
index 7687a81bfa420e8377308fea3d6738141bc945d3..df02963faaf8f514f4175d394e67d2df10c8a3ea 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -171,7 +171,7 @@ public class CraftChunk implements Chunk {
@Override
public boolean isSlimeChunk() {
// 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
- return WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0;
- return WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), this.worldServer.spigotConfig.slimeSeed).nextInt(10) == 0;
+ return this.worldServer.paperConfig().entities.spawning.allChunksAreSlimeChunks || WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), worldServer.spigotConfig.slimeSeed).nextInt(10) == 0; // Paper
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index afb8f7c86558f9f72858d0e490c174d24bfcc670..25ffb95d7d4a5b34577b1e343516996630a14705 100644
index eb7eb3fdb2f677c5d6d7503d2809f61e48900205..26428b73e23e71872e148f041c18c741ee05f4c8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -301,6 +301,7 @@ public final class CraftServer implements Server {
@ -17,7 +17,7 @@ index afb8f7c86558f9f72858d0e490c174d24bfcc670..25ffb95d7d4a5b34577b1e3435169966
static {
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 210024c91eccd074a238e7a7834bbfb8c1b61b34..b4780e2a244b4cd8ab827bd844a01c3360f46b03 100644
index 21f670644815474102da3fd1047f63a7a13adfa6..59d076f4e25735f4c6815dfe27904a82eefc1756 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -470,10 +470,40 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -30,7 +30,7 @@ index 210024c91eccd074a238e7a7834bbfb8c1b61b34..b4780e2a244b4cd8ab827bd844a01c33
+ }
+ // Paper end
this.entity.setDeltaMovement(CraftVector.toNMS(velocity));
entity.hurtMarked = true;
this.entity.hurtMarked = true;
}
+ // Paper start
@ -62,7 +62,7 @@ index 210024c91eccd074a238e7a7834bbfb8c1b61b34..b4780e2a244b4cd8ab827bd844a01c33
public double getHeight() {
return this.getHandle().getBbHeight();
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index 11d7ede26b46d0bf9cced65e8c3bcc41c8b66dbf..3ad14bf0697e682a2e777baa8faeb323d127fb13 100644
index cacbde8ac27a70b5e3bcd76ad90bc667abee3817..b5a2cbc21165e80820d6f7e2690e6e18de54c420 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -80,7 +80,19 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa

Datei anzeigen

@ -16,15 +16,15 @@ The wanted destination was on top of the emerald block however the player ended
This only is the case if the player is teleporting between worlds.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e5b4aa1edb3f48b7356dbf25d7aba4ab6053ba03..648c5fd5fe3b2f07b6b5ada7e0d48999db9a6392 100644
index 30b1148e057e43db4dcc441dd07d8e527aae6f6f..cea98186e229617e973125fb5bcae965205d3d99 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1162,7 +1162,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
entity.connection.teleport(to);
} else {
// The respawn reason should never be used if the passed location is non null.
- server.getHandle().respawn(entity, toWorld, true, to, true, null);
+ server.getHandle().respawn(entity, toWorld, true, to, !toWorld.paperConfig().environment.disableTeleportationSuffocationCheck, null); // Paper
- this.server.getHandle().respawn(entity, toWorld, true, to, true, null);
+ this.server.getHandle().respawn(entity, toWorld, true, to, !toWorld.paperConfig().environment.disableTeleportationSuffocationCheck, null); // Paper
}
return true;
}

Datei anzeigen

@ -70,7 +70,7 @@ index 1b2c0fda262ca6d5bd2ce22bc2e934803bd6f602..cae548dbb5a3027e2de0bfbe38918ec7
public boolean isEnchanted() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 40aad6a209fbded448e3db21207a85d9f2875e71..4dcbd1ed61070c12adf5871a595875ca60110c5d 100644
index 8eb170bd71c7158dcd1b90f9c8d46a13a2202509..f42f6f5fb7a2398c183eb9fa1a964a7680b687b8 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -188,28 +188,11 @@ public final class CraftItemStack extends ItemStack {
@ -111,7 +111,7 @@ index 40aad6a209fbded448e3db21207a85d9f2875e71..4dcbd1ed61070c12adf5871a595875ca
if (this.handle == null) {
return 0;
}
- return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.getRaw(ench), handle);
- return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.getRaw(ench), this.handle);
+ // Paper start - replace to allow custom enchantments
+ final ListTag enchantments = this.handle.getEnchantmentTags();
+ for (int i = 0; i < enchantments.size(); i++) {
@ -187,7 +187,7 @@ index 40aad6a209fbded448e3db21207a85d9f2875e71..4dcbd1ed61070c12adf5871a595875ca
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 087080e4df07d87b55b42436cffc2f772d883db3..edcb2ab754b99cdd82ee69b3f61ba9046593955f 100644
index 3d5abdf6986457e39fb216d8f5e257c9df880078..57bd07e7aa9d09e843bf33f4c6c2c610aca5401e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
@ -256,7 +256,7 @@ index 087080e4df07d87b55b42436cffc2f772d883db3..edcb2ab754b99cdd82ee69b3f61ba904
+ EnchantmentMap enchantments = new EnchantmentMap(); // Paper
for (int i = 0; i < ench.size(); i++) {
String id = ((CompoundTag) ench.get(i)).getString(ENCHANTMENTS_ID.NBT);
String id = ((CompoundTag) ench.get(i)).getString(CraftMetaItem.ENCHANTMENTS_ID.NBT);
@@ -550,13 +553,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
}
}
@ -277,7 +277,7 @@ index 087080e4df07d87b55b42436cffc2f772d883db3..edcb2ab754b99cdd82ee69b3f61ba904
@Override
public Map<Enchantment, Integer> getEnchants() {
- return this.hasEnchants() ? ImmutableMap.copyOf(enchantments) : ImmutableMap.<Enchantment, Integer>of();
- return this.hasEnchants() ? ImmutableMap.copyOf(this.enchantments) : ImmutableMap.<Enchantment, Integer>of();
+ return this.hasEnchants() ? ImmutableSortedMap.copyOfSorted(this.enchantments) : ImmutableMap.<Enchantment, Integer>of(); // Paper
}

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
index a12d23b03d64aacaf1f231039333aec94245a89a..81bfce0374f281069f963c24040163cd968e3958 100644
index 4a649a2006f907c9b7542843ec6938d9375ca645..0d9658b1c6b5912a34058c0ce53b8e7f8c28afac 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
@@ -89,9 +89,44 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
@ -53,5 +53,5 @@ index a12d23b03d64aacaf1f231039333aec94245a89a..81bfce0374f281069f963c24040163cd
+ // Paper end
+ // if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) {
connection.hostname = split[0];
connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());
this.connection.hostname = split[0];
this.connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());

Datei anzeigen

@ -504,7 +504,7 @@ index 0000000000000000000000000000000000000000..9cfa5d36a6991067a3866e0d437749fa
+ }
+}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index fc39c3742e852bc9f4131b1ade62c32b318bdb02..f3db63ddb175f82b6eafee48686065050437fc92 100644
index 3e8f8ead702daa15451fb7259a960a9f3033828f..6240ad60358bf8ba9891ca1d40af2d2a7d10130d 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -235,6 +235,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -516,7 +516,7 @@ index fc39c3742e852bc9f4131b1ade62c32b318bdb02..f3db63ddb175f82b6eafee4868606505
public CraftEntity getBukkitEntity() {
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
index 0ec2db500e4a0230a91286a709b8d444d1b529f4..272095d7a09ab41227d741172735f66fd2798ce1 100644
index 442736878291fbdc62572b2c83f384413408326f..00187fbbeddfc17e1b6887f8bf0f50da23938470 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
@@ -32,6 +32,20 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
@ -556,7 +556,7 @@ index 0ec2db500e4a0230a91286a709b8d444d1b529f4..272095d7a09ab41227d741172735f66f
}
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
index d88a6501917306eab57f46cb0d10dc03164a94da..e88c39d405fc7068db64ad34a03dec8d559e749e 100644
index 11d9d4861aee68cd97d36ee2ff7597b7a6c81294..d70c1206df96b03c031399049a65e6a765d80347 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
@@ -65,12 +65,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
@ -709,7 +709,7 @@ index 111494c30a2b7d8464237a92cf5c98f7f4cca19d..e11618247ad889fa8fadbb2c7addd0de
if (player != null) {
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
index 750192aa5e4969fbd6d4d77e2d2a812b1f9e84f3..69af0368dcef1b449c77c9bdaa554fce90163df9 100644
index 86076a9d2a3b1044c96518cbaeee66d60a8a22c6..c268513bc5719d80e1c3d73de53b85ec7f852fa9 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
@@ -64,7 +64,7 @@ public class CraftBrushableBlock extends CraftBlockEntityState<BrushableBlockEnt
@ -719,10 +719,10 @@ index 750192aa5e4969fbd6d4d77e2d2a812b1f9e84f3..69af0368dcef1b449c77c9bdaa554fce
- private void setLootTable(LootTable table, long seed) {
+ public void setLootTable(LootTable table, long seed) { // Paper - make public since it overrides a public method
ResourceLocation key = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
getSnapshot().setLootTable(key, seed);
this.getSnapshot().setLootTable(key, seed);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
index 0ddc3f6601257aeea0216bd5da21dd5a2c58206a..51b5edd8adf029041da69a33da0423da8f6803c8 100644
index 58bd3c4b328b5e792c9ed8dfcdfa0f5ddcc83092..b742d9d231bf79ed53d3fe4deaa81e64c6801c4c 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
@@ -12,8 +12,9 @@ import org.bukkit.craftbukkit.CraftWorld;
@ -737,7 +737,7 @@ index 0ddc3f6601257aeea0216bd5da21dd5a2c58206a..51b5edd8adf029041da69a33da0423da
public CraftChest(World world, ChestBlockEntity tileEntity) {
super(world, tileEntity);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
index 179cda9d16063d2f06c7d58e11673f5aaab1044b..5b9ccbd767630abfee648a4653f33d8ac625bd0c 100644
index 2803e34bd29fd7a965093b507f11b5ee83bc5f09..f6942cb3ef1f9ef03708d4bc932ea9aeb1c13894 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
@@ -9,7 +9,7 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
@ -750,7 +750,7 @@ index 179cda9d16063d2f06c7d58e11673f5aaab1044b..5b9ccbd767630abfee648a4653f33d8a
public CraftLootable(World world, T tileEntity) {
super(world, tileEntity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
index 9ba61f791c0ca9b283c0f1f30f12600c4e49a4cb..c332e8504b96a4437325b5a64430c97c5afb6b4b 100644
index cc3f70fafea2d5c3a878cfe3e0a2db39ae713bf6..f1844d697b91e61878ade5b922cf2a3a538365c7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
@@ -10,8 +10,7 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
@ -786,7 +786,7 @@ index fd42f0b20132d08039ca7735d31a61806a6b07dc..b1a708de6790bbe336202b13ab862ced
public CraftMinecartChest(CraftServer server, MinecartChest entity) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
index ec3ab12442b7371e16059b902f71e573f0bc9816..3ba7e8ef1035e1de2c195b6919fe57aee398af51 100644
index 39427b4f284e9402663be2b160ccb5f03f8b91da..17f5684cba9d3ed22d9925d1951520cc4751dfe2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
@@ -6,7 +6,7 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index ef5d73a296982d8b9ac022c5ea755843c2da1c84..490af173c265d03904396e9336c95520fcd16c48 100644
index 0d1102e1b98235b8e7124321a65483a5e923d4a5..7a9094e69684c2d963411525a09872024c6f62e3 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -139,8 +139,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@ -20,7 +20,7 @@ index ef5d73a296982d8b9ac022c5ea755843c2da1c84..490af173c265d03904396e9336c95520
public void run() {
try {
@@ -150,7 +150,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex);
ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex);
}
}
- }.start();

Datei anzeigen

@ -8,7 +8,7 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index 4814601e549b0b96e83ed64ee094ddaa825565de..16468dfd657501f6fd5eefa4c32682e24eaba22d 100644
index cd57a7f3fdedd396d3b8dc4d195eb27bb32969eb..61bc50ef899d2867d4f3c762b71012b27d74e7f6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -427,7 +427,7 @@ public class ServerPlayerGameMode {
@ -21,7 +21,7 @@ index 4814601e549b0b96e83ed64ee094ddaa825565de..16468dfd657501f6fd5eefa4c32682e2
return true;
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index 9dffdfe5bbd0517e9a2c6a6770eea07b43ef9b33..6de7fcccb6da757185a38b79b3a22821b1186201 100644
index f25466e132cb6b0012dc336877fdf17b88a12ddc..9d1cce3fb02bb2c3ff71055fbafc974b6b98625a 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -39,13 +39,67 @@ public class ExperienceOrb extends Entity {
@ -133,7 +133,7 @@ index 9dffdfe5bbd0517e9a2c6a6770eea07b43ef9b33..6de7fcccb6da757185a38b79b3a22821
@Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index a820cdc5cf39bd5021e118bf9efdc8a8c92c722b..402fa40908a82a55686c6dc02266093384e7a4e4 100644
index c178a564156562d1dd2c0a30eec3040cb8b4c2d1..3d99e7ea6109261dc5d8de610791ec08dde180b4 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1792,7 +1792,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -179,7 +179,7 @@ index b5b93396166202cbe5a4456794fd394de932262a..be105a4460e9bf2ef4b72a307fa31291
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index 1bf6126b38dd127bb72b174b049fb3b396db713c..0d4b86411d2d064b04334b508b1cb65695afaebd 100644
index 408642708961ecb3a1363f84bb9e0496bdde7827..65592c6bd1874e08037e0e5287b370e3924aea3f 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -909,7 +909,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
@ -205,7 +205,7 @@ index 6dba24f47ca76a432a836178af178c2d52631eee..ed1f6e77d5fc9b6f5f52b1a10275783b
}
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index 1a787bd4bdbbf7c78f4bf6bd7e2f36540fec7d50..8bfb2f94226e6b623def141a7af79d0f46d7d445 100644
index 4406d9622c6a5f817b7fbd1b448b8c3095c617b2..f68aef2298c3b2994c46d34b0888f988af9190dc 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -673,7 +673,7 @@ public class EnderDragon extends Mob implements Enemy {
@ -240,7 +240,7 @@ index b70ee1dff0442de32a9e20ad54b246d5eae45e58..b3127238cea62c47d710abab44f65701
}
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
index eb15d694ad8c24b659feba53e6992661ba1a9b76..5ea5f424c55f60bf63d3a4d3fe51362939f42f4c 100644
index d4d1cad7963a5adcc8c32e1bc02104eb70514331..0321b4bb622930bfe57661b0e6b893d7635668fb 100644
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
@@ -207,7 +207,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
@ -279,7 +279,7 @@ index 2191af62f4202413738542d738456ca71febdbf4..5b3059460d4b18d984483d655526d832
}
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
index c858b987cb6f92cc6fa705bbe1ae11a720eb242c..2c263447aa8853f18d1c1d476b49a47f6e9ca2ad 100644
index 8d09c134058e55a23df4e23d965a7a783aed701e..45242f0ed5a0f98953df5f27fb76874d2d9e3473 100644
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
@@ -97,7 +97,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
@ -337,7 +337,7 @@ index 8beb4670fffa2df0a9bd64ebb8810b25ce670f16..134b138abdf17fae340226ecac3868ad
entity = net.minecraft.world.entity.EntityType.LIGHTNING_BOLT.create(world);
entity.moveTo(location.getX(), location.getY(), location.getZ());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index 4907d61b0254919e137c4f92e0dbeb2d61a906f6..26c795983515580b30b5ef8c701faa95ab1aea8e 100644
index 9231511af4cba747594000364f0b8fceeeab4819..5a7d314ec0562e472f5dc45924a7b24841cff126 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@@ -18,6 +18,18 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {
@ -358,4 +358,4 @@ index 4907d61b0254919e137c4f92e0dbeb2d61a906f6..26c795983515580b30b5ef8c701faa95
+
@Override
public net.minecraft.world.entity.ExperienceOrb getHandle() {
return (net.minecraft.world.entity.ExperienceOrb) entity;
return (net.minecraft.world.entity.ExperienceOrb) this.entity;

Datei anzeigen

@ -252,7 +252,7 @@ index c3631efda9c7fa531a8a9f18fbee7b5f8655382b..769f6489632302627fa1730cc08e77f5
}
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 092f76d1d248e04c3fa5fa346373ec1f2600ee5c..ee27251b9decc00a0094611cf79644bd83bce5c7 100644
index 182ae975a0a9bf4ade6932d1bb1a376f77af130a..73155c8cb02a6156c1e48f9c75f512441f8b85a1 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -164,7 +164,7 @@ import com.mojang.datafixers.util.Pair;
@ -311,7 +311,7 @@ index 092f76d1d248e04c3fa5fa346373ec1f2600ee5c..ee27251b9decc00a0094611cf79644bd
public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index f17e1621b498e70c8787dfe96dd819dc6e4b621f..5a3f0a6e3f663718993cf3679ffc96c4af140e4d 100644
index d6816b8402f601e474a156b7e4a8c335624083aa..b916f11cb3799aecf1edd9c2002f4c631754e89f 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -98,6 +98,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -321,7 +321,7 @@ index f17e1621b498e70c8787dfe96dd819dc6e4b621f..5a3f0a6e3f663718993cf3679ffc96c4
+ // Paper start - Use TerminalConsoleAppender
+ new com.destroystokyo.paper.console.PaperConsole(DedicatedServer.this).start();
+ /*
jline.console.ConsoleReader bufferedreader = reader;
jline.console.ConsoleReader bufferedreader = DedicatedServer.this.reader;
// MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
@@ -129,7 +132,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -375,7 +375,7 @@ index 75083eeb9b413e6dd5375007360dce6857a08fff..d292fdb165436f0b9b46b32110f5e09a
if (!SwingUtilities.isEventDispatchThread()) {
SwingUtilities.invokeLater(() -> {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index aba09b0606602b4081ceb235cc168554c3ab638b..7a3f339528808c84a5833a127786c9d88423fe18 100644
index 6dad42086e598c86a27358e12c5b72a0a79b38ee..daabc5739b7bf6b1cbeb497fe0e9b7ed6ed30975 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -162,8 +162,7 @@ public abstract class PlayerList {
@ -389,7 +389,7 @@ index aba09b0606602b4081ceb235cc168554c3ab638b..7a3f339528808c84a5833a127786c9d8
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 584d12cfd6875034dfe9ca0bdcd821e36c2a397b..4a699d50d1174923991cbd0e4b7d37d1e4e76a90 100644
index 4a157159ba7baf9ee3ea09880ba45e055802bfcc..0b529c373c098d2e48c4485dd189a51f2a846c81 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -44,7 +44,6 @@ import java.util.logging.Level;
@ -407,7 +407,7 @@ index 584d12cfd6875034dfe9ca0bdcd821e36c2a397b..4a699d50d1174923991cbd0e4b7d37d1
+ // Paper start - JLine update
+ /*
public ConsoleReader getReader() {
return console.reader;
return this.console.reader;
}
+ */
+ // Paper end
@ -415,7 +415,7 @@ index 584d12cfd6875034dfe9ca0bdcd821e36c2a397b..4a699d50d1174923991cbd0e4b7d37d1
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 6f2135690892f23e80648d4f9237cea34ec19740..960885c891c98859e8ef375d0796c8b53fcf562c 100644
index 89cb1612232adc9fa336176ea0585ce6577459fb..ae93a3b7a3dc30ed3bd852242e276aa4e4368b40 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
@ -464,7 +464,7 @@ index 6f2135690892f23e80648d4f9237cea34ec19740..960885c891c98859e8ef375d0796c8b5
net.minecraft.server.Main.main(options);
} catch (Throwable t) {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
index 76fb1ecd47cb86b50486effe8cc7fe4abf8e311c..21f889ddec72b40f5954eec07417e08d192b4661 100644
index bcf1c36d07b79520a39643d3a01020a67b1c9ef2..217e7e3b9db04c7fc5f6518f39cc9d3488f9128d 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
@@ -5,15 +5,13 @@ import java.util.EnumMap;
@ -493,7 +493,7 @@ index 76fb1ecd47cb86b50486effe8cc7fe4abf8e311c..21f889ddec72b40f5954eec07417e08d
+ }*/ // Paper
}
diff --git a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
index 0b4c62387c1093652ac15b64a8703249de4cf088..b996fde481cebbbcce80a6c267591136db7cc0bc 100644
index 0b4c62387c1093652ac15b64a8703249de4cf088..d24acf28f5ed023acc550bcf877e4b9800ec8c9f 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
@@ -4,50 +4,73 @@ import java.util.Collections;
@ -533,12 +533,12 @@ index 0b4c62387c1093652ac15b64a8703249de4cf088..b996fde481cebbbcce80a6c267591136
@Override
protected List<String> evaluate() {
- List<String> offers = ConsoleCommandCompleter.this.server.getCommandMap().tabComplete(ConsoleCommandCompleter.this.server.getConsoleSender(), buffer);
+ List<String> offers = server.getCommandMap().tabComplete(server.getConsoleSender(), buffer); // Paper - fix remap
+ List<String> offers = server.getCommandMap().tabComplete(server.getConsoleSender(), buffer); // Paper - Remove "this."
- TabCompleteEvent tabEvent = new TabCompleteEvent(ConsoleCommandCompleter.this.server.getConsoleSender(), buffer, (offers == null) ? Collections.EMPTY_LIST : offers);
- ConsoleCommandCompleter.this.server.getPluginManager().callEvent(tabEvent);
+ TabCompleteEvent tabEvent = new TabCompleteEvent(server.getConsoleSender(), buffer, (offers == null) ? Collections.EMPTY_LIST : offers); // Paper - fix remap
+ server.getPluginManager().callEvent(tabEvent); // Paper - fix remap
+ TabCompleteEvent tabEvent = new TabCompleteEvent(server.getConsoleSender(), buffer, (offers == null) ? Collections.EMPTY_LIST : offers); // Paper - Remove "this."
+ server.getPluginManager().callEvent(tabEvent); // Paper - Remove "this."
return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions();
}
@ -583,14 +583,14 @@ index 0b4c62387c1093652ac15b64a8703249de4cf088..b996fde481cebbbcce80a6c267591136
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index 19c44daaa407b7c1c7a7ffe56fef8c8814c6d5b2..c6e8441e299f477ddb22c1ce2618710763978f1a 100644
index 8390f5b5b957b5435efece26507a89756d0a7b3c..c6e8441e299f477ddb22c1ce2618710763978f1a 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -16,7 +16,7 @@ public class ServerShutdownThread extends Thread {
this.server.close();
} finally {
try {
- server.reader.getTerminal().restore();
- this.server.reader.getTerminal().restore();
+ net.minecrell.terminalconsole.TerminalConsoleAppender.close(); // Paper - Use TerminalConsoleAppender
} catch (Exception e) {
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix MC-117075: TE 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 7cfcbc1e38f5e9145c827dfe26299277a3f14cee..22dab285bbcea77d04a8625b025f054c625cadd4 100644
index 407607babfb200152bb0e5c6d56bb66c82217077..3f88b1caf5f99499adeaa8ba24e2c9d8647ea7d5 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -805,6 +805,8 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -16,7 +16,7 @@ index 7cfcbc1e38f5e9145c827dfe26299277a3f14cee..22dab285bbcea77d04a8625b025f054c
+ toRemove.add(null);
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(tileTickPosition);
TickingBlockEntity tickingblockentity = (TickingBlockEntity) this.blockEntityTickers.get(this.tileTickPosition);
@@ -812,7 +814,6 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
if (tickingblockentity == null) {
this.getCraftServer().getLogger().severe("Spigot has detected a null entity and has removed it, preventing a crash");
@ -38,5 +38,5 @@ index 7cfcbc1e38f5e9145c827dfe26299277a3f14cee..22dab285bbcea77d04a8625b025f054c
}
+ this.blockEntityTickers.removeAll(toRemove);
timings.tileEntityTick.stopTiming(); // Spigot
this.timings.tileEntityTick.stopTiming(); // Spigot
this.tickingBlockEntities = false;

Datei anzeigen

@ -51,7 +51,7 @@ index 63acd109a79ed752a05df3d4f1b99309297c2055..d156f7cc71050f13b2feca00c52ca6b6
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index b7adb6acf4eca6aad0c9a48223ab47528ef7ce04..8a62231dffcff0260c1c15bd3115b27922c03239 100644
index 1f5962457a15cae2162ce3899e0e7f167a854d11..9aa8c6c11d5aee83627cb91258c16844f791cd26 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -327,6 +327,13 @@ public class CraftBlock implements Block {
@ -69,7 +69,7 @@ index b7adb6acf4eca6aad0c9a48223ab47528ef7ce04..8a62231dffcff0260c1c15bd3115b279
public Biome getBiome() {
return this.getWorld().getBiome(this.getX(), this.getY(), this.getZ());
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index 0476f01b5594497a448968c6cbc28fed87cd602c..b52a34ded5a9697f3107a730a9817df3044dedba 100644
index 22af1b41eec06d660dbe47c463014bcdd96fc5b6..f046f507a095e0cb8f839b9b4b06add3a671486b 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -17,15 +17,26 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
@ -93,7 +93,7 @@ index 0476f01b5594497a448968c6cbc28fed87cd602c..b52a34ded5a9697f3107a730a9817df3
+ }
// copy tile entity data:
- this.snapshot = this.createSnapshot(tileEntity);
- this.load(snapshot);
- this.load(this.snapshot);
+ if (this.snapshot != null) {
+ this.load(this.snapshot);
+ }
@ -114,7 +114,7 @@ index 0476f01b5594497a448968c6cbc28fed87cd602c..b52a34ded5a9697f3107a730a9817df3
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
index a69a03a7954b03a0aeca7a74d89756dd38ca6faf..17e1131c79ad140c0803a914621ce7924f0f2a6d 100644
index 8561c16da0dccc55c89c7796cbe4f8792d01194f..c9ef19bdeeb130561659ff8161bf4e196cf4f53f 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
@@ -379,15 +379,30 @@ public final class CraftBlockStates {
@ -149,7 +149,7 @@ index a69a03a7954b03a0aeca7a74d89756dd38ca6faf..17e1131c79ad140c0803a914621ce792
public static BlockState getBlockState(Material material, @Nullable CompoundTag blockEntityTag) {
diff --git a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
index 759e95434a1f18ec0b829a29071ab62a42550279..1c33e3456c410dac3ac2f0caef52ee24e00ffca5 100644
index 6377a053e5d407fdae061e796657711828c5586e..ae5091433fd605c46b9c57f07114923918fad506 100644
--- a/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
+++ b/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
@@ -156,4 +156,10 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {

Datei anzeigen

@ -9,11 +9,11 @@ from triggering monster spawns on a server.
Also a highly more effecient way to blanket block spawns in a world
diff --git a/src/main/java/net/minecraft/server/level/ChunkMap.java b/src/main/java/net/minecraft/server/level/ChunkMap.java
index e2510ee3f0cb93eae2452bec642855cd6c0c2974..c483acf248484220aaca2100c84e75f3b46fbd31 100644
index e580df88baadfd943756b1e440c7253a287fa0e9..ea520b828378c268d05425096c6493ca1c7ad385 100644
--- a/src/main/java/net/minecraft/server/level/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/level/ChunkMap.java
@@ -701,7 +701,9 @@ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider
chunkRange = (chunkRange > level.spigotConfig.viewDistance) ? (byte) level.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > this.level.spigotConfig.viewDistance) ? (byte) this.level.spigotConfig.viewDistance : chunkRange;
chunkRange = (chunkRange > 8) ? 8 : chunkRange;
- double blockRange = (reducedRange) ? Math.pow(chunkRange << 4, 2) : 16384.0D;
@ -40,7 +40,7 @@ index e2510ee3f0cb93eae2452bec642855cd6c0c2974..c483acf248484220aaca2100c84e75f3
return true;
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
index 65d447df49d8c4a27de9ae7f9e298bf705c688bc..4649e597b86335b33d9e9227d966dd7ad8208096 100644
index b2367f3836689f3aa27b1b4905219e07e6173c93..821b2c8860c1328e2ecc009deeb533648ce16540 100644
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
@@ -565,6 +565,15 @@ public class ServerChunkCache extends ChunkSource {
@ -60,7 +60,7 @@ index 65d447df49d8c4a27de9ae7f9e298bf705c688bc..4649e597b86335b33d9e9227d966dd7a
while (iterator1.hasNext()) {
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c6c046f3089759214739fc9c3b6f2936e41d1334..b756cf41f0f201824b055f3936ace7ded3bb6023 100644
index 43e454be3f18d092913739bb6a92d5b82059ba59..9b670eb2925caa275cae6f51eb75183a9f5208b0 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1,5 +1,6 @@

Datei anzeigen

@ -7,7 +7,7 @@ This allows you to create already filled textures on Skulls to avoid texture loo
which commonly cause rate limit issues with Mojang API
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
index 34aa42dce4340d80906750369633bfafc8189b88..4b46863cd0fb32cd1423370605f0be9312e77935 100644
index 6c40bb4e06322bcce31561f5cfb9dc53f266f062..ba063a4e52a841a4365efb1cf78415b04b2bcc4c 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
@@ -111,7 +111,22 @@ public class CraftSkull extends CraftBlockEntityState<SkullBlockEntity> implemen
@ -48,7 +48,7 @@ index 34aa42dce4340d80906750369633bfafc8189b88..4b46863cd0fb32cd1423370605f0be93
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index b202f425cbb880079b9e3ec64d077482d7aa5f99..9b9e20014042da4324c9f4babb05d8ba9513f81d 100644
index bb9b20ad96b602fd5643f646eaf4d5f8cffa41ee..6398f31a29fdab0f6539139a09336b10d6d11d95 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -187,6 +187,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@ -97,8 +97,8 @@ index b202f425cbb880079b9e3ec64d077482d7aa5f99..9b9e20014042da4324c9f4babb05d8ba
Builder<String, Object> serialize(Builder<String, Object> builder) {
super.serialize(builder);
if (this.profile != null) {
- return builder.put(SKULL_OWNER.BUKKIT, new CraftPlayerProfile(this.profile));
+ return builder.put(SKULL_OWNER.BUKKIT, new com.destroystokyo.paper.profile.CraftPlayerProfile(this.profile)); // Paper
- return builder.put(CraftMetaSkull.SKULL_OWNER.BUKKIT, new CraftPlayerProfile(this.profile));
+ return builder.put(CraftMetaSkull.SKULL_OWNER.BUKKIT, new com.destroystokyo.paper.profile.CraftPlayerProfile(this.profile)); // Paper
}
NamespacedKey namespacedKeyNB = this.getNoteBlockSound();
if (namespacedKeyNB != null) {

Datei anzeigen

@ -13,7 +13,7 @@ starting point for future additions in this area.
Fixes GH-559
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
index 4017933f2244fca32cf9d39444f3a4f550e8af01..e721517ce7b52a1aa10d039aa9f309eb69db4733 100644
index b77f5832265be5aaf96d95fcac4737919720fa6e..e15723080445b09852512132039ca2cde4936b7e 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
@@ -8,9 +8,22 @@ import org.bukkit.Material;
@ -56,8 +56,8 @@ index 4017933f2244fca32cf9d39444f3a4f550e8af01..e721517ce7b52a1aa10d039aa9f309eb
@@ -29,11 +49,39 @@ public class CraftMetaArmorStand extends CraftMetaItem {
if (tag.contains(ENTITY_TAG.NBT)) {
this.entityTag = tag.getCompound(ENTITY_TAG.NBT).copy();
if (tag.contains(CraftMetaArmorStand.ENTITY_TAG.NBT)) {
this.entityTag = tag.getCompound(CraftMetaArmorStand.ENTITY_TAG.NBT).copy();
+ // Paper start
+ if (entityTag.contains(INVISIBLE.NBT)) {
+ invisible = entityTag.getBoolean(INVISIBLE.NBT);
@ -124,7 +124,7 @@ index 4017933f2244fca32cf9d39444f3a4f550e8af01..e721517ce7b52a1aa10d039aa9f309eb
+ }
+ // Paper end
if (this.entityTag != null) {
tag.put(ENTITY_TAG.NBT, entityTag);
tag.put(CraftMetaArmorStand.ENTITY_TAG.NBT, this.entityTag);
}
@@ -72,7 +145,7 @@ public class CraftMetaArmorStand extends CraftMetaItem {
}
@ -255,7 +255,7 @@ index 4017933f2244fca32cf9d39444f3a4f550e8af01..e721517ce7b52a1aa10d039aa9f309eb
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index edcb2ab754b99cdd82ee69b3f61ba9046593955f..b29b2d3917fbc5c611ebce17fa2f869203c4514e 100644
index 57bd07e7aa9d09e843bf33f4c6c2c610aca5401e..3d749e6d6193878f1b4f288946afcec9461dc8df 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -1463,6 +1463,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {

Datei anzeigen

@ -9,7 +9,7 @@ This can be useful for changing name or skins after a player has logged in.
public-f net.minecraft.world.entity.player.Player gameProfile
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4ba7ed0a4ff52caa21632f69ab087564fb3a5eb7..5b8425b17ea322bb1141b1c94ee3c259d3950ca0 100644
index 293ae8afc5c5aef3ed8de4fa2ce3e66850b8a65b..da4120e6c50605139014b8bf470394253f2b5f73 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1437,7 +1437,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -22,7 +22,7 @@ index 4ba7ed0a4ff52caa21632f69ab087564fb3a5eb7..5b8425b17ea322bb1141b1c94ee3c259
if (Float.isNaN(f)) {
f = 0;
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index 41de3c342f1dae9fc6af1b4938a676d337bcf5fa..f870c20ecce27ebd893107a35e1b8f15e462ff85 100644
index 41ba6f0c88b6205bf33de962c0bc545a0ac40c74..03ff64ad395455f21f4ca30faae17fc6a1dc0501 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -293,11 +293,11 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@ -40,7 +40,7 @@ index 41de3c342f1dae9fc6af1b4938a676d337bcf5fa..f870c20ecce27ebd893107a35e1b8f15
playerName = gameprofile.getName();
uniqueId = gameprofile.getId();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
index 498b14ca0e45b76259450d9a0c8206b1e9f25e70..c1ef6c8c8e5f030e18b6066a509350ee1e195987 100644
index b8fd3837be598e354999b741a1d98dff326b0399..c68b86f42d0f6bd9707ad6c426f34bed556e0035 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
@@ -81,8 +81,8 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
@ -55,11 +55,11 @@ index 498b14ca0e45b76259450d9a0c8206b1e9f25e70..c1ef6c8c8e5f030e18b6066a509350ee
public Server getServer() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9920a3d81c44972cba742d67764b5066362f79aa..e864252e4fcd0927275d6b9009cdde78d3e289eb 100644
index bd6dcea0a94bb4b72c98cf6a4829a2cd39a558cd..c65b82d69fa829f3fdfa0d6c65a2f861c2db9f11 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -271,11 +271,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return server.getPlayer(getUniqueId()) != null;
return this.server.getPlayer(this.getUniqueId()) != null;
}
- @Override
@ -92,7 +92,7 @@ index 9920a3d81c44972cba742d67764b5066362f79aa..e864252e4fcd0927275d6b9009cdde78
}
}
-
- server.getPluginManager().callEvent(new PlayerHideEntityEvent(this, entity));
- this.server.getPluginManager().callEvent(new PlayerHideEntityEvent(this, entity));
}
void resetAndHideEntity(org.bukkit.entity.Entity entity) {
@ -124,7 +124,7 @@ index 9920a3d81c44972cba742d67764b5066362f79aa..e864252e4fcd0927275d6b9009cdde78
ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
@@ -1785,6 +1798,39 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
this.server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
}
+ // Paper start
+ @Override
@ -200,7 +200,7 @@ index 9920a3d81c44972cba742d67764b5066362f79aa..e864252e4fcd0927275d6b9009cdde78
public void onEntityRemove(Entity entity) {
this.invertedVisibilityEntities.remove(entity.getUUID());
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index 44b73939c465398c8cfda5dbea3280392f194add..aba415ab7203a21e916eadb923cb02c03b679f65 100644
index 3b6683e778a35d021d6189bf8ee5719684040665..4b209818a20e76e9d857c4bb822f6b24ec8e9f09 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -338,6 +338,12 @@ public class Commodore

Datei anzeigen

@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
provide an optional flag to disable this check, at your own risk.
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index e864252e4fcd0927275d6b9009cdde78d3e289eb..28a51536bcfcb124fecc61095227cabd8844d4e6 100644
index c65b82d69fa829f3fdfa0d6c65a2f861c2db9f11..676c29c13ae8ece20cb5acaf1a2cf71fc93424bd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -194,6 +194,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -28,4 +28,4 @@ index e864252e4fcd0927275d6b9009cdde78d3e289eb..28a51536bcfcb124fecc61095227cabd
+ Preconditions.checkState(DISABLE_CHANNEL_LIMIT || this.channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel); // Paper - flag to disable channel limit
channel = StandardMessenger.validateAndCorrectChannel(channel);
if (this.channels.add(channel)) {
server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
this.server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));

Datei anzeigen

@ -39,11 +39,11 @@ index a6638e626600e4304a973497a39e3fac52203b16..e68b7a1b03783e4f9de24c5ae8773fc3
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 0b02ba70956ea1352ea8e67957b3789408b67f6b..8320bece16dfa339e33801e43ff2f297bc876001 100644
index b52a761e84e00f2ccac7b1b9db73e70ffa1c681b..f17cc5da4eb4b4e5bcfae8b234358464f6188f4a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -273,6 +273,45 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
}
+ // Paper start
@ -89,7 +89,7 @@ index 0b02ba70956ea1352ea8e67957b3789408b67f6b..8320bece16dfa339e33801e43ff2f297
public boolean isClientSide() {
return this.isClientSide;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 405c541e790c47c8ccdf05c902cc5f8969a759f9..ffa0129a4ad3ed12b2afabaea43544f49b330207 100644
index f531d51d8ffafc65db3885ac6700fbccf47e9965..d9038b215a13c0290b718a41612581dce6e30213 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -1343,6 +1343,14 @@ public class CraftEventFactory {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add TNTPrimeEvent
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index fc0750f9b2257a3dbf0fab2f0cd4bb020e044752..1621a06eff438eccdbc04a2abebd718567c320b3 100644
index 12906de1ee386af4c63d53742042dead280eaaf0..65e1aa3b2d3a8af997ccf8e259ca60e0fd73f34d 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -558,6 +558,11 @@ public class EnderDragon extends Mob implements Enemy {
@ -17,11 +17,11 @@ index fc0750f9b2257a3dbf0fab2f0cd4bb020e044752..1621a06eff438eccdbc04a2abebd7185
+ if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.EXPLOSION, explosionSource.getIndirectSourceEntity().getBukkitEntity()).callEvent())
+ continue;
+ // Paper end
nmsBlock.wasExploded(this.level(), blockposition, explosionSource);
nmsBlock.wasExploded(this.level(), blockposition, this.explosionSource);
this.level().removeBlock(blockposition, false);
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
index 49df94d8a5d1d4020e7e9f5457f117ebaa581b43..945d8b0f58f6a5b2281f136d3afbba3b34e0e6b5 100644
index 3804490e93bb43444ab3236205888792b54f7074..9cda3353c033b3fb4e34a8a0e2cc4085fec9cdaa 100644
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
@@ -295,12 +295,19 @@ public class FireBlock extends BaseFireBlock {

Datei anzeigen

@ -9,7 +9,7 @@ thread dumps at an interval until the point of crash.
This will help diagnose what was going on in that time before the crash.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 52f5c91d71a8fc86d14c3c4c9e258b9cf70ad57b..41bad67b3a6b8ccdcf9467858cb7d9c0e0a03f0e 100644
index beebc3ed13b200a0d6585387bb7e06a6aaa07940..88c1c7d0dd8efddcde6d8d81cb89b09c2f6fee2a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1029,6 +1029,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -17,11 +17,11 @@ index 52f5c91d71a8fc86d14c3c4c9e258b9cf70ad57b..41bad67b3a6b8ccdcf9467858cb7d9c0
// Spigot start
+ org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Arrays.fill( recentTps, 20 );
Arrays.fill( this.recentTps, 20 );
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
lastTick = start - TICK_TIME; // Paper
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 5a3f0a6e3f663718993cf3679ffc96c4af140e4d..cdc020e1787c258ba283d86a25ab153237b0e194 100644
index b916f11cb3799aecf1edd9c2002f4c631754e89f..e3754d916ce38d0e0e8b8dbb623016ee6ebf4800 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -197,6 +197,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -33,7 +33,7 @@ index 5a3f0a6e3f663718993cf3679ffc96c4af140e4d..cdc020e1787c258ba283d86a25ab1532
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics();
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // load version history now
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 14a56b1153e87630065a58a6477573bef1597d12..37ce30dea4c46eeb301b986de5920c16d46990a1 100644
index 2cb21d2eed25074ede3a7be8f3c5e2a97547d356..a2aced2fbe7d9f3cc42d2c4b5bfde2838ab44360 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -917,6 +917,7 @@ public final class CraftServer implements Server {
@ -53,20 +53,20 @@ index 14a56b1153e87630065a58a6477573bef1597d12..37ce30dea4c46eeb301b986de5920c16
@Override
diff --git a/src/main/java/org/spigotmc/SpigotConfig.java b/src/main/java/org/spigotmc/SpigotConfig.java
index ddc5f2d9aa7dda6aff132392927e3d7e3674dbff..3ac48dafe2300ff4cf4591569fec9ce4916503cd 100644
index 99c82b9c82770df22a043d1927a1ad820e95d724..1eafb92fdf3c6ddce5f5f847bd9034287e2d4b84 100644
--- a/src/main/java/org/spigotmc/SpigotConfig.java
+++ b/src/main/java/org/spigotmc/SpigotConfig.java
@@ -229,7 +229,7 @@ public class SpigotConfig
SpigotConfig.restartScript = SpigotConfig.getString( "settings.restart-script", SpigotConfig.restartScript );
SpigotConfig.restartMessage = SpigotConfig.transform( SpigotConfig.getString( "messages.restart", "Server is restarting" ) );
SpigotConfig.commands.put( "restart", new RestartCommand( "restart" ) );
- WatchdogThread.doStart( timeoutTime, restartOnCrash );
+ // WatchdogThread.doStart( timeoutTime, restartOnCrash ); // Paper - moved to after paper config initialization
- WatchdogThread.doStart( SpigotConfig.timeoutTime, SpigotConfig.restartOnCrash );
+ // WatchdogThread.doStart( SpigotConfig.timeoutTime, SpigotConfig.restartOnCrash ); // Paper - moved to after paper config initialization
}
public static boolean bungee;
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index a9897c494b3dc56d900356d74030359832febbaa..b47d043144c499b1499f6b4be5a16a3f75c9fcb8 100644
index e2bafc68e88c733873638ce7695b684d119f55da..230d55820778e84c1c8aa2b013ae0e5e35568ea1 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -14,6 +14,10 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
@ -157,4 +157,4 @@ index a9897c494b3dc56d900356d74030359832febbaa..b47d043144c499b1499f6b4be5a16a3f
+ sleep( 1000 ); // Paper - Reduce check time to every second instead of every ten seconds, more consistent and allows for short timeout
} catch ( InterruptedException ex )
{
interrupt();
this.interrupt();

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Use a Queue for Queueing Commands
Lists are bad as Queues mmmkay.
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index cdc020e1787c258ba283d86a25ab153237b0e194..2ae9b52d43a44b2164034d9162b644daba618d66 100644
index e3754d916ce38d0e0e8b8dbb623016ee6ebf4800..7088e0fc8980dcc547d5703d21c55a26adb5d378 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -69,7 +69,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -36,4 +36,4 @@ index cdc020e1787c258ba283d86a25ab153237b0e194..2ae9b52d43a44b2164034d9162b644da
+ // Paper end
// CraftBukkit start - ServerCommand for preprocessing
ServerCommandEvent event = new ServerCommandEvent(console, servercommand.msg);
ServerCommandEvent event = new ServerCommandEvent(this.console, servercommand.msg);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Ability to get Tile Entities from a chunk without snapshots
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 9363bcb40963bcbc39a26313260a41eef34981c1..6daa3591ba17155718c7ff3260de5180b84bb105 100644
index df02963faaf8f514f4175d394e67d2df10c8a3ea..593cfd68dc0f3679c684b6a1d2036419d4f3bc0c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -127,6 +127,13 @@ public class CraftChunk implements Chunk {
@ -20,7 +20,7 @@ index 9363bcb40963bcbc39a26313260a41eef34981c1..6daa3591ba17155718c7ff3260de5180
+ public BlockState[] getTileEntities(boolean useSnapshot) {
+ // Paper end
if (!this.isLoaded()) {
this.getWorld().getChunkAt(x, z); // Transient load for this tick
this.getWorld().getChunkAt(this.x, this.z); // Transient load for this tick
}
@@ -136,7 +143,29 @@ public class CraftChunk implements Chunk {
BlockState[] entities = new BlockState[chunk.blockEntities.size()];

Datei anzeigen

@ -19,7 +19,7 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 63d0b6a241c9ef2e6f7b13e7354e59083a2ffb0a..ba938eb9844157cccedb5f673a44720538912bc5 100644
index 0f5e616ebb90e187ea38b6489e6f4f5467f1a9c3..de062ef7553a7edff3d0fa6f50a9987bb62b9e09 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -241,6 +241,10 @@ public class ServerPlayer extends Player {
@ -70,7 +70,7 @@ index 63d0b6a241c9ef2e6f7b13e7354e59083a2ffb0a..ba938eb9844157cccedb5f673a447205
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 05595ff2336b25712b59b8ad6b11163dd333e6c0..96e9616f4ceedf95ec94854a0b1d8526a80057f5 100644
index 16fb709582d5311c4b59d72974467eaa1c61a2ab..73b30df698142abf569c232630ec1d953b79ab96 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -260,6 +260,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -243,7 +243,7 @@ index 2b5f5aed31bd235a213f57b9d65b0ea1fae8de08..df0cc02f9bbea857226765c6066a2b94
}
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index 0d4b86411d2d064b04334b508b1cb65695afaebd..df06cad9447982ebe57d07c9967cb68c6dd20ca3 100644
index 65592c6bd1874e08037e0e5287b370e3924aea3f..74c5eec21fe447c525e204b504f40d0d363039bb 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -712,15 +712,25 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
@ -301,7 +301,7 @@ index bb399f775a5530a01f59332848c8ab9b8eceb2b5..14edfe103e61024b569f33de0b6608f3
public void addAdditionalSaveData(CompoundTag nbt) {
super.addAdditionalSaveData(nbt);
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 5176e17e39719def9a97473b87cebf1719653e60..86c08e36779af6f85932c1c346c54594f543db0d 100644
index 1047d9a46314e264ab3f72122aedefd161c7851d..91b9ec5831f439426a853ba9ac7a3f225629b099 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -492,8 +492,10 @@ public class ArmorStand extends LivingEntity {
@ -354,7 +354,7 @@ index 5176e17e39719def9a97473b87cebf1719653e60..86c08e36779af6f85932c1c346c54594
@@ -620,10 +624,10 @@ public class ArmorStand extends LivingEntity {
}
drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
- this.brokenByAnything(damageSource);
+ return this.brokenByAnything(damageSource); // Paper
}
@ -377,7 +377,7 @@ index 5176e17e39719def9a97473b87cebf1719653e60..86c08e36779af6f85932c1c346c54594
@Override
public void kill() {
- org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event
- org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, this.drops); // CraftBukkit - call event
+ // Paper start
+ kill(true);
+ }
@ -385,14 +385,14 @@ index 5176e17e39719def9a97473b87cebf1719653e60..86c08e36779af6f85932c1c346c54594
+ public void kill(boolean callEvent) {
+ if (callEvent) {
+ // Paper end
+ org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event // Paper - make cancellable
+ org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, this.drops); // CraftBukkit - call event // Paper - make cancellable
+ if (event.isCancelled()) return; // Paper - make cancellable
+ } // Paper
this.remove(Entity.RemovalReason.KILLED);
this.gameEvent(GameEvent.ENTITY_DIE);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 9c988b83338c5cf2cbe12aabc729b9184bb3e97d..92e64162181b73e5201e1e3e52db9e372c765a75 100644
index c72dc80c65484d6fac3b37f6be3f8c678df0a432..39bd2e89f218efc8f851b3bbb86677bdd05a315e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -2343,7 +2343,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -412,7 +412,7 @@ index 9c988b83338c5cf2cbe12aabc729b9184bb3e97d..92e64162181b73e5201e1e3e52db9e37
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index ffa0129a4ad3ed12b2afabaea43544f49b330207..87be89a5e2d8b885f6f077433d4a7e402e8c7d49 100644
index d9038b215a13c0290b718a41612581dce6e30213..78fed280b403c8934485aeb617e011faabe331a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -865,9 +865,16 @@ public class CraftEventFactory {

Datei anzeigen

@ -172,7 +172,7 @@ index 539dc45c3c7ffc60cf3fb47ae4df65e604e8627b..eea4c932d909145e7af848cf76e3f49d
public Path(List<Node> nodes, BlockPos target, boolean reachesTarget) {
this.nodes = nodes;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index 2000755ac72a25a5d03f238844c458a804f1c033..ce244e96f674f7886179baced3d1e9b67fedfe73 100644
index a75623fd1b2d36530c55c7a380e68b8dc7e58021..c2acbf533b5f3aebe4837512f694fe25abee65d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -15,8 +15,11 @@ import org.bukkit.loot.LootTable;
@ -188,7 +188,7 @@ index 2000755ac72a25a5d03f238844c458a804f1c033..ce244e96f674f7886179baced3d1e9b6
public void setTarget(LivingEntity target) {
Preconditions.checkState(!this.getHandle().generation, "Cannot set target during world generation");
@@ -57,6 +60,14 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
return (net.minecraft.world.entity.Mob) entity;
return (net.minecraft.world.entity.Mob) this.entity;
}
+ // Paper start

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index b29b2d3917fbc5c611ebce17fa2f869203c4514e..907a584257ff4145b064f835d6396918cff6fa75 100644
index 3d749e6d6193878f1b4f288946afcec9461dc8df..e29134181d5b032311fe163b48fbe53f1298c6fd 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -84,6 +84,12 @@ import org.bukkit.persistence.PersistentDataContainer;
@ -128,7 +128,7 @@ index b29b2d3917fbc5c611ebce17fa2f869203c4514e..907a584257ff4145b064f835d6396918
ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(internal));
@@ -651,6 +727,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
if (this.hasDamage()) {
itemTag.putInt(DAMAGE.NBT, damage);
itemTag.putInt(CraftMetaItem.DAMAGE.NBT, this.damage);
}
+ // Paper start - Implement an API for CanPlaceOn and CanDestroy NBT values
+ if (hasPlaceableKeys()) {
@ -221,7 +221,7 @@ index b29b2d3917fbc5c611ebce17fa2f869203c4514e..907a584257ff4145b064f835d6396918
} catch (CloneNotSupportedException e) {
throw new Error(e);
@@ -1298,6 +1422,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
builder.put(DAMAGE.BUKKIT, damage);
builder.put(CraftMetaItem.DAMAGE.BUKKIT, this.damage);
}
+ // Paper start - Implement an API for CanPlaceOn and CanDestroy NBT values

Datei anzeigen

@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
debugging in an IDE pre-relocate.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index aba415ab7203a21e916eadb923cb02c03b679f65..cfaa85dc3d567bf0110e45fc4e4f24a406b41a45 100644
index 4b209818a20e76e9d857c4bb822f6b24ec8e9f09..12972cf5876da72cc5d097aeedb13c9addd98add 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -7,8 +7,10 @@ import java.io.InputStream;
@ -100,7 +100,7 @@ index aba415ab7203a21e916eadb923cb02c03b679f65..cfaa85dc3d567bf0110e45fc4e4f24a4
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
{
return new MethodVisitor( api, super.visitMethod( access, name, desc, signature, exceptions ) )
return new MethodVisitor( this.api, super.visitMethod( access, name, desc, signature, exceptions ) )
{
+ // Paper start - Plugin rewrites
+ @Override

Datei anzeigen

@ -7,7 +7,7 @@ Subject: [PATCH] Add sun related API
public net.minecraft.world.entity.Mob isSunBurnTick()Z
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 2948cf1b2ca8e342d366077407231a89bbb36667..342bf2941414333ebedaf7d1bd9778a651078ff3 100644
index ce19d3ba9e86440152f01e9fde22361ccd967ebd..73b476c5c2baa0122cb3cbeb76ec8c42674b6421 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -693,6 +693,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -23,9 +23,9 @@ index 2948cf1b2ca8e342d366077407231a89bbb36667..342bf2941414333ebedaf7d1bd9778a6
+
@Override
public long getGameTime() {
return world.levelData.getGameTime();
return this.world.levelData.getGameTime();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index ce244e96f674f7886179baced3d1e9b67fedfe73..522b7cb1db22b02279b004916ad2a14447a6bbed 100644
index c2acbf533b5f3aebe4837512f694fe25abee65d6..74843d1fa344497d35f05d0b04f650edd1e0f3a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -93,4 +93,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {

Datei anzeigen

@ -161,7 +161,7 @@ index 0000000000000000000000000000000000000000..224d4b2cc45b0d02230a76caee9c8857
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
index 1b526fff47e5a3d9a5325c73966dd2bf3dbbdc19..633e6f4922ccaf59979a22885162f42c65bf628a 100644
index 1b4b397c08d7c05f5a066274a00a6ec80601624a..b4bd318d61834d70d666577073f18e4c49ded113 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
@@ -49,7 +49,7 @@ public class CraftContainer extends AbstractContainerMenu {
@ -183,12 +183,12 @@ index 1b526fff47e5a3d9a5325c73966dd2bf3dbbdc19..633e6f4922ccaf59979a22885162f42c
// Paper end
@@ -247,6 +247,10 @@ public class CraftContainer extends AbstractContainerMenu {
this.lastSlots = delegate.lastSlots;
this.slots = delegate.slots;
this.remoteSlots = delegate.remoteSlots;
this.lastSlots = this.delegate.lastSlots;
this.slots = this.delegate.slots;
this.remoteSlots = this.delegate.remoteSlots;
+ // Paper start - copy data slots for InventoryView#set/getProperty
+ this.dataSlots = delegate.dataSlots;
+ this.remoteDataSlots = delegate.remoteDataSlots;
+ this.dataSlots = this.delegate.dataSlots;
+ this.remoteDataSlots = this.delegate.remoteDataSlots;
+ // Paper end
}

Datei anzeigen

@ -5,11 +5,11 @@ Subject: [PATCH] Add Heightmap API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 342bf2941414333ebedaf7d1bd9778a651078ff3..ebc2b01b21d15c52928c62edb88dbd088c8ab460 100644
index 73b476c5c2baa0122cb3cbeb76ec8c42674b6421..8c2f83c8c08b31a6a165ca9aa86a12082ec70ef2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -220,6 +220,29 @@ public class CraftWorld extends CraftRegionAccessor implements World {
return CraftBlock.at(world, new BlockPos(x, y, z));
return CraftBlock.at(this.world, new BlockPos(x, y, z));
}
+ // Paper start - Implement heightmap api

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
This lets you disable it for some worlds and lower it for others.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 679211aed0fc5bdd630369aa9c82aa6aca9059f4..4d3cd4a5dbf7adb482e60dc88ededdaccf558061 100644
index fb2851e94c178f49ee8046176b196c63254907e7..ef6d98d503fdca4322000278de4cf325df56f99d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -722,30 +722,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -63,7 +63,7 @@ index 679211aed0fc5bdd630369aa9c82aa6aca9059f4..4d3cd4a5dbf7adb482e60dc88ededdac
// this.updateMobSpawningFlags();
worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals());
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 440ea09a6645e0c094a9378b6fbacf335ab04d1b..c4ae2f4f1ec9aa39478815f46e0d1d13144acf5b 100644
index 39bfb4660423cd8bdf67a0aca66fe5b0d353aa84..0c27467e481f9226f1092ba82ec566546e74d422 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1859,12 +1859,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -191,20 +191,19 @@ index 4d2348df25410a0b5364eec066880326d6667dad..286aad3205ef8a9e21a47ef07893844f
this.maxCount = i * i;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ebc2b01b21d15c52928c62edb88dbd088c8ab460..fdb3de1dee72a0e90a42a9d39fa021c0b81922ef 100644
index 8c2f83c8c08b31a6a165ca9aa86a12082ec70ef2..d4193c9ec7bef6d8e307c94df034f1a24e8685eb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1351,15 +1351,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setKeepSpawnInMemory(boolean keepLoaded) {
- world.keepSpawnInMemory = keepLoaded;
+ // Paper start - Configurable spawn radius
+ if (keepLoaded == world.keepSpawnInMemory) {
+ if (keepLoaded == this.world.keepSpawnInMemory) {
+ // do nothing, nothing has changed
+ return;
+ }
+ this.world.keepSpawnInMemory = keepLoaded;
this.world.keepSpawnInMemory = keepLoaded;
// Grab the worlds spawn chunk
BlockPos chunkcoordinates = this.world.getSharedSpawnPos();
if (keepLoaded) {

Datei anzeigen

@ -18,7 +18,7 @@ public net.minecraft.world.entity.Entity isInsidePortal
public net.minecraft.world.entity.LivingEntity jumping
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 7c780e464faae69b74d69e40bbeeeccf4c609eab..35e2688f9252fbc12b69519e5e5fbaec5ff82e42 100644
index d832f19c5d8859239e06f4b3317e9ca2df1c9508..82510154e6a0cef509316b1f8c71021cca39a323 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2,7 +2,6 @@ package net.minecraft.server.level;
@ -112,7 +112,7 @@ index 7c780e464faae69b74d69e40bbeeeccf4c609eab..35e2688f9252fbc12b69519e5e5fbaec
} else {
passenger.stopRiding();
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index af707404bfbba0ded894b6bd29c87c07e62b7854..cd8a75a830512014fbc694325ff860265b9b70f9 100644
index 23194db56de5e9b488048386720fdf855729bbd0..cf05d938c4f9c7db44a76e6a736c41a8c9cc8b35 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -390,6 +390,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -348,7 +348,7 @@ index b149e8bcac034bb3fc118a9adcb0de45e18ed5e9..fc35cfc9d045f3e5b6a50af1d0ba83b6
+
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index b1111e644f860f40a944fd43ac900db4615a1c5e..9a6ed3aa55f988ed30669fab2a2513741eda399b 100644
index 0c64e65af843034b26147f62c49c6ab12ac5ddd2..addaa87d68591dced30e304dc3880588a45234d6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -160,6 +160,12 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -380,7 +380,7 @@ index 45f55c79a9d105f732054d61c4cf83eb5db49762..17a6327ab7b26dfab38881bbc0689b0b
}
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8ef078932 100644
index d5374072a97f791964033d107f023b3cc657b343..f76b3f410fcc756bb34a5fac21b1d7088ac7a9ce 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -1,39 +1,52 @@
@ -565,7 +565,7 @@ index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8
+ // Paper end
// Paper start
java.util.List<Entity> entities = world.getEntities((Entity)null, maxBB, null);
java.util.List<Entity> entities = world.getEntities((Entity)null, ActivationRange.maxBB, null);
@@ -172,60 +250,118 @@ public class ActivationRange
* @param entity
* @return
@ -749,7 +749,7 @@ index 305d9772f2af22e8bdf73235cdb15ea01ac2c3b3..50ddcd7ee9c3ffe7549361f942df01b8
isActive = false;
}
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index e873a311e2918e1cb72f190e14d088a3ed540aa8..77698b0555c5930645659b4af061c3f428bf8f65 100644
index 81c76360e8c7389bafd61f38e6782668e8c65d27..50e57486d49694396816122504028e410ebb602d 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -205,14 +205,60 @@ public class SpigotWorldConfig

Datei anzeigen

@ -1100,7 +1100,7 @@ index be89e5b8c1ea7f85aef267a15986affa5fa1fd4b..43472855136f26b282d94fd241853d86
public ClientboundLevelChunkWithLightPacket(FriendlyByteBuf buf) {
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 27386e814ae956dbb9f2025bcb682456d7cd0eaf..1c30b2f5aa49b2e377bea4278215929a0baa172c 100644
index 82510154e6a0cef509316b1f8c71021cca39a323..85a2a237c4f84120d0a148c17b4b602c2c8c55e1 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -566,7 +566,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -1113,7 +1113,7 @@ index 27386e814ae956dbb9f2025bcb682456d7cd0eaf..1c30b2f5aa49b2e377bea4278215929a
this.convertable = convertable_conversionsession;
this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index bdf11a98614c9c12d3112f437651be81d0d9872a..58a1a54b676922ef0862dcab98e7aada5de80311 100644
index 58277908737a1f3da89e5df827e108e2381396ff..f47fcae72d48cd410a4ac3e0a4bd21f42fae7eec 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerInteractEvent;
@ -1151,7 +1151,7 @@ index 5de5209e04d631bd6a50e28e8d3abebf148252c1..19b3f4fa7678a038bf25efc2a8b46dda
DebugPackets.sendPoiPacketsForChunk(world, chunkPos);
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 9a6ed3aa55f988ed30669fab2a2513741eda399b..7a1886585bd00dc8213ce22130b8b6fea52c5cf6 100644
index addaa87d68591dced30e304dc3880588a45234d6..4b0a7ef056ff7dd687d5135ac748ee57d556121e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -175,6 +175,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -1173,8 +1173,8 @@ index 9a6ed3aa55f988ed30669fab2a2513741eda399b..7a1886585bd00dc8213ce22130b8b6fe
this.generator = gen;
@@ -279,6 +280,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
+ this.chunkPacketBlockController = this.paperConfig().anticheat.antiXray.enabled ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
}
@ -1213,7 +1213,7 @@ index 5e8d2e4245757a0889645ea79ee68afb53f7dde4..f7e5e016a7028a9196e689e950805b0d
}
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 43cb8c3240fa058557f67d632a713747c1a19a39..44ef27e5c297055f7a2512ae49d68d50cfcde72a 100644
index d9d2bf31a0e7ad374aa62197c71626a1abfbaf71..4a5491a79281b7cddf5ad5f060567f174b89d14b 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -91,7 +91,7 @@ public class LevelChunk extends ChunkAccess {
@ -1541,7 +1541,7 @@ index 982fb3ef071d6a66f16744717e8e146bef6d9e8c..02beedb84a8bec001270116c6ce496db
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 6daa3591ba17155718c7ff3260de5180b84bb105..40f0fbd5492ccd9cbb622359c17a23041ede7fb6 100644
index 593cfd68dc0f3679c684b6a1d2036419d4f3bc0c..b4b2f961d1e4f8b5b199052efefd96bcbfc3e68b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -53,7 +53,7 @@ public class CraftChunk implements Chunk {
@ -1554,7 +1554,7 @@ index 6daa3591ba17155718c7ff3260de5180b84bb105..40f0fbd5492ccd9cbb622359c17a2304
private static final byte[] EMPTY_LIGHT = new byte[2048];
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e331fc0866ae91b1463879661b04dad16f6117ca..30adaccd8c5a9d9696bede7967f4b9406ffd066e 100644
index 34905e673683620fc5f0158fea3c16049d09f8f2..c70c64c2ae7bed27f39db12bd2329aa600ae2fe5 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2278,7 +2278,7 @@ public final class CraftServer implements Server {
@ -1567,7 +1567,7 @@ index e331fc0866ae91b1463879661b04dad16f6117ca..30adaccd8c5a9d9696bede7967f4b940
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index ed05b94c3ae1f9a45c604d6e5f371edb8d2d9746..098174ddfec746d4212a5ab8e9d353840d3c49c9 100644
index 27ec5d989be1288ea32fa115ce37e4d98dc54892..d352f6882adbf642b61e0f3f18abebbe5fff1a9b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -419,11 +419,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -34,7 +34,7 @@ index 6f9cb55491da718cd6564425748ab3852fda9b68..5fbdc96f29e29dfc092b9e84a988032d
if (world.dimensionType().ultraWarm()) {
world.removeBlock(pos, false);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index ce8f3d66b0f64531e818823761fd1823da4f01d5..e172d05e9e2b8d7844ecff286430f94c1b2fd7db 100644
index b25ebc5f1c54ea3ecc38e96b79e5cca88aafb816..35e264172688be6cf6e82d948f591893d97a43aa 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -451,6 +451,18 @@ public class CraftBlock implements Block {
@ -59,7 +59,7 @@ index ce8f3d66b0f64531e818823761fd1823da4f01d5..e172d05e9e2b8d7844ecff286430f94c
@@ -460,11 +472,35 @@ public class CraftBlock implements Block {
// Modelled off EntityHuman#hasBlock
if (block != Blocks.AIR && (item == null || !iblockdata.requiresCorrectToolForDrops() || nmsItem.isCorrectToolForDrops(iblockdata))) {
net.minecraft.world.level.block.Block.dropResources(iblockdata, this.world.getMinecraftWorld(), position, this.world.getBlockEntity(position), null, nmsItem);
net.minecraft.world.level.block.Block.dropResources(iblockdata, this.world.getMinecraftWorld(), this.position, this.world.getBlockEntity(this.position), null, nmsItem);
+ // Paper start - improve Block#breanNaturally
+ if (triggerEffect) {
+ if (iblockdata.getBlock() instanceof net.minecraft.world.level.block.BaseFireBlock) {
@ -74,7 +74,7 @@ index ce8f3d66b0f64531e818823761fd1823da4f01d5..e172d05e9e2b8d7844ecff286430f94c
}
// SPIGOT-6778: Directly call setBlock instead of setTypeAndData, so that the tile entiy is not removed and custom remove logic is run.
- return this.world.setBlock(position, Blocks.AIR.defaultBlockState(), 3) && result;
- return this.world.setBlock(this.position, Blocks.AIR.defaultBlockState(), 3) && result;
+ // Paper start - improve breakNaturally
+ boolean destroyed = this.world.removeBlock(this.position, false);
+ if (destroyed) {

Datei anzeigen

@ -71,7 +71,7 @@ index d7995cadda8f48bbf642114935311180d3ebde5b..226cba0c1eeedd9e80acd603c46b802c
cause = cause.getCause();
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 951e283d38cb7601049ac6f24385acde514df553..41106a10ca8148dae4129e2a46854d83605839b4 100644
index f700e677d75f911b786a22b4cc9d0a016d99b02f..5f8cf962a4b630223fb93ffea49d1b2151e1604d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -291,7 +291,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -167,7 +167,7 @@ index 951e283d38cb7601049ac6f24385acde514df553..41106a10ca8148dae4129e2a46854d83
+
+ org.spigotmc.WatchdogThread.tick(); // Paper
org.spigotmc.WatchdogThread.hasStarted = true; // Paper
Arrays.fill( recentTps, 20 );
Arrays.fill( this.recentTps, 20 );
long start = System.nanoTime(), curTime, tickSection = start; // Paper - Further improve server tick loop
@@ -1099,6 +1142,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
JvmProfiler.INSTANCE.onServerTick(this.averageTickTime);
@ -239,7 +239,7 @@ index 951e283d38cb7601049ac6f24385acde514df553..41106a10ca8148dae4129e2a46854d83
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 7889a55c8ddf8b1b1b27a8241875c071f6ac0eba..f43e5a83b9220eb23a777fa7490b49aac440bea0 100644
index fe9b15bf452e6420dae90b100b9621454ede9792..378a6665159b3e62062df4ded024bcc1604f5300 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -269,7 +269,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -261,7 +261,7 @@ index 7889a55c8ddf8b1b1b27a8241875c071f6ac0eba..f43e5a83b9220eb23a777fa7490b49aa
}
@Override
@@ -775,7 +776,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@@ -774,7 +775,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@Override
public void stopServer() {
super.stopServer();
@ -271,7 +271,7 @@ index 7889a55c8ddf8b1b1b27a8241875c071f6ac0eba..f43e5a83b9220eb23a777fa7490b49aa
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index abd0acb3aa7a430888d143b58a96c7eac3ba10e3..29f9dc6771029295d9ad3a8e74e90c3abc1ab138 100644
index f894d6549e4abf1001de68c8bc3ea0129e973e18..0267886463facdfda43b2dde7efc62001a9adf97 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -534,7 +534,7 @@ public abstract class PlayerList {
@ -296,7 +296,7 @@ index f5829ae484d93b547a5437b85a9621346384a11b..83701fbfaa56a232593ee8f11a3afb89
}
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 7a1886585bd00dc8213ce22130b8b6fea52c5cf6..52a44510d0499df56d2ebef0963fe8164eda7301 100644
index 4b0a7ef056ff7dd687d5135ac748ee57d556121e..046fa6e5b2013c0872176592dd8cc6681a9b308a 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -904,6 +904,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -308,7 +308,7 @@ index 7a1886585bd00dc8213ce22130b8b6fea52c5cf6..52a44510d0499df56d2ebef0963fe816
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);
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 78004403ca444b2880a663b72c9e15c5b57faedd..9b96d67acfae823598695e7ed5c61a5118bd0e0b 100644
index 12834995b2bab9e82a40feb01f038532961296cf..12af77215bfd6df3b6802a567ac3c013a4cdf06a 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -1177,6 +1177,7 @@ public class LevelChunk extends ChunkAccess {
@ -320,7 +320,7 @@ index 78004403ca444b2880a663b72c9e15c5b57faedd..9b96d67acfae823598695e7ed5c61a51
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 30f752f99ab888fd78ff58c0263372ec899fe7d6..491abe3a2768ec4e8c43d3117177c472c205e7bf 100644
index c137b80cabde11bba39cfac1cee6e9322bac1b25..62aa0381b380ddd583d1ce2e24e04a9a607a89a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -178,6 +178,36 @@ public class Main {
@ -459,7 +459,7 @@ index c6e8441e299f477ddb22c1ce2618710763978f1a..e8e93538dfd71de86515d9405f728db1
}
}
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
index 14eadb0f81dfad072d82d7793cce1a4dd3f2c5f0..29b39dff0aceaa902f701162a42d3f2f881d6d5a 100644
index 051b9e3a5d29a5840d596468e3ddd013bedc8da3..631457374fda492776f4af0515cee2e43a934d2c 100644
--- a/src/main/java/org/spigotmc/RestartCommand.java
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -138,7 +138,7 @@ public class RestartCommand extends Command
@ -472,7 +472,7 @@ index 14eadb0f81dfad072d82d7793cce1a4dd3f2c5f0..29b39dff0aceaa902f701162a42d3f2f
String[] split = restartScript.split( " " );
if ( split.length > 0 && new File( split[0] ).isFile() )
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
index b47d043144c499b1499f6b4be5a16a3f75c9fcb8..a9bd33b58a6a3296b70eaaaea3adbee74724e448 100644
index 230d55820778e84c1c8aa2b013ae0e5e35568ea1..5ca863aa1859922fa359eba32539229db40e5b98 100644
--- a/src/main/java/org/spigotmc/WatchdogThread.java
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
@@ -11,6 +11,7 @@ import org.bukkit.Bukkit;

Datei anzeigen

@ -87,7 +87,7 @@ index 0000000000000000000000000000000000000000..b6f4400df3d8ec7e06a996de54f8cabb
+ }
+}
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index 0bab5208a38e8e7c848e9162396df535eb7e5711..88fcf595c6a28811545715f5e5a225809a977d76 100644
index b94874cc1484190646798c223b19ddba43a107c7..b0d15e7c2c4d9e04c2a473ff68a01fb0463dd30e 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -379,7 +379,7 @@ public class ServerPlayer extends Player {
@ -121,8 +121,8 @@ index 0bab5208a38e8e7c848e9162396df535eb7e5711..88fcf595c6a28811545715f5e5a22580
public void updateOptions(ClientInformation clientOptions) {
+ new com.destroystokyo.paper.event.player.PlayerClientOptionsChangeEvent(getBukkitEntity(), getClientOptionMap(clientOptions.language(), clientOptions.viewDistance(), com.destroystokyo.paper.ClientOption.ChatVisibility.valueOf(clientOptions.chatVisibility().name()), clientOptions.chatColors(), new com.destroystokyo.paper.PaperSkinParts(clientOptions.modelCustomisation()), clientOptions.mainHand() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT, clientOptions.allowsListing(), clientOptions.textFilteringEnabled())).callEvent(); // Paper - settings event
// CraftBukkit start
if (getMainArm() != clientOptions.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
if (this.getMainArm() != clientOptions.mainHand()) {
PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
@@ -1962,6 +1978,11 @@ public class ServerPlayer extends Player {
this.server.server.getPluginManager().callEvent(new com.destroystokyo.paper.event.player.PlayerLocaleChangeEvent(this.getBukkitEntity(), this.language, clientOptions.language())); // Paper
}
@ -136,7 +136,7 @@ index 0bab5208a38e8e7c848e9162396df535eb7e5711..88fcf595c6a28811545715f5e5a22580
this.adventure$locale = net.kyori.adventure.translation.Translator.parseLocale(this.language); // Paper
this.requestedViewDistance = clientOptions.viewDistance();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 94cb3513aeef549da3626ff18c1ea0662252ecb9..f4a15de92c3af88624f337c36fadbea67d339064 100644
index 45f3d75fbb68a3f93fc3ceaa63183ab5f5c7e91c..b92cc9f8d62cc3bfefe42c4c1fb08af4731dd48f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -604,6 +604,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {

Datei anzeigen

@ -16,7 +16,7 @@ So even if something NEW comes up, it would be impossible to drop the
same item twice because the source was destroyed.
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index eed16b541a9c39ed4697e783612e6f7b7ff23b70..1d2dd9b8ae43f22d875cb530130118df247b87dc 100644
index 77a4d6d14e79230cab80439d1fc28f27824ed04d..ad80dfcc0606a635185bf707af6d3b437f489a31 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2457,11 +2457,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -80,7 +80,7 @@ index eed16b541a9c39ed4697e783612e6f7b7ff23b70..1d2dd9b8ae43f22d875cb530130118df
public float getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState, float max) {
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 4edf7a989f12cae065977d1f529e856a7d3a932b..f01a5ba97d391292192100b6cd7fa018cdeb7e05 100644
index 61b9c3ebc97b0a778c3a75a926c0d689f43df823..50c68e48992add57accf7f5479952d17beca577a 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1711,9 +1711,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
@ -113,15 +113,15 @@ index 4edf7a989f12cae065977d1f529e856a7d3a932b..f01a5ba97d391292192100b6cd7fa018
this.drops = new ArrayList<>();
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 86c08e36779af6f85932c1c346c54594f543db0d..7e996a527a632a2b382f5eea6df6be839a7a0ef4 100644
index 91b9ec5831f439426a853ba9ac7a3f225629b099..e4e734e0f4c43c1687c8e3a8bbe15441e0bd8e76 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -637,7 +637,7 @@ public class ArmorStand extends LivingEntity {
for (i = 0; i < this.handItems.size(); ++i) {
itemstack = (ItemStack) this.handItems.get(i);
if (!itemstack.isEmpty()) {
- drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
+ drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); // CraftBukkit - add to drops // Paper - mirror so we can destroy it later - though this call site was safe
- this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
+ this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); // CraftBukkit - add to drops // Paper - mirror so we can destroy it later - though this call site was safe
this.handItems.set(i, ItemStack.EMPTY);
}
}
@ -129,13 +129,13 @@ index 86c08e36779af6f85932c1c346c54594f543db0d..7e996a527a632a2b382f5eea6df6be83
for (i = 0; i < this.armorItems.size(); ++i) {
itemstack = (ItemStack) this.armorItems.get(i);
if (!itemstack.isEmpty()) {
- drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
+ drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); // CraftBukkit - add to drops // Paper - mirror so we can destroy it later - though this call site was safe
- this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
+ this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemstack)); // CraftBukkit - add to drops // Paper - mirror so we can destroy it later - though this call site was safe
this.armorItems.set(i, ItemStack.EMPTY);
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index cb8ac0475c842ba8c70564ed8a9c5d148257262a..4e0b6798754710e9fa598016938f033ae17b8a09 100644
index b29d600772b1bf544e211739c24a5b9b4f0c4270..27443e3261e49d6401d599cee56dbcfebaead812 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -868,6 +868,11 @@ public class CraftEventFactory {

Datei anzeigen

@ -17,7 +17,7 @@ keeping long lived large direct buffers in cache.
Set system properly at server startup if not set already to help protect from this.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 491abe3a2768ec4e8c43d3117177c472c205e7bf..84c9998a01000d5b7d70e5724dd03be1536ba297 100644
index 62aa0381b380ddd583d1ce2e24e04a9a607a89a7..9d7905b7f93d33700045c18b8ccecb7426cb30a7 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -26,6 +26,7 @@ public class Main {
@ -27,4 +27,4 @@ index 491abe3a2768ec4e8c43d3117177c472c205e7bf..84c9998a01000d5b7d70e5724dd03be1
+ if (System.getProperty("jdk.nio.maxCachedBufferSize") == null) System.setProperty("jdk.nio.maxCachedBufferSize", "262144"); // Paper - cap per-thread NIO cache size
OptionParser parser = new OptionParser() {
{
acceptsAll(Main.asList("?", "help"), "Show the help");
this.acceptsAll(Main.asList("?", "help"), "Show the help");

Datei anzeigen

@ -10,7 +10,7 @@ Adds a 5 second grace period for any async tasks to finish and warns
if any are still running after that delay just as reload does.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index a107751a13ccef2729068e9b9822509374d20187..e2b4e7fb68aeaa2a95f3d1dfdd04521746d18a8d 100644
index fdaf757cbbc90841747989add56c13f252f645e5..6b7bacb0ea667c488b09da8c2a8a685d3a86608e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -912,6 +912,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -22,7 +22,7 @@ index a107751a13ccef2729068e9b9822509374d20187..e2b4e7fb68aeaa2a95f3d1dfdd045217
// CraftBukkit end
this.getConnection().stop();
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 70dfd93212fb0cb2c1e5e70e0d46e913be6a85e4..b35b3feafbd25d698d3fea463d4bf65b6a09b590 100644
index dd7305a316c72b55c74c226e2edc4d6a8a2b8d37..92a6b6e838336c086ab5fc534ec8bb2d94e3453a 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1018,6 +1018,31 @@ public final class CraftServer implements Server {
@ -56,4 +56,4 @@ index 70dfd93212fb0cb2c1e5e70e0d46e913be6a85e4..b35b3feafbd25d698d3fea463d4bf65b
+
@Override
public void reloadData() {
ReloadCommand.reload(console);
ReloadCommand.reload(this.console);

Datei anzeigen

@ -8,7 +8,7 @@ makes it so that the server keeps the last difficulty used instead
of restoring the server.properties every single load.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index e2b4e7fb68aeaa2a95f3d1dfdd04521746d18a8d..a106f5f573c9eec1f56fa88f7398ac28d231b5e5 100644
index 6b7bacb0ea667c488b09da8c2a8a685d3a86608e..219e191ff4d590aee9b7a704ba6fe84c3c12f43a 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -782,7 +782,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -63,7 +63,7 @@ index 89be3991ef4fb2deb7276c5409cb571a7fb1f821..9c272f7cf8cbd2bbe147e57f7fabe135
return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
}, true);
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 1f8dcc331505890ba72777b5d0cda2427e0ccfd1..a661f8a83d4e57ca48bbf28dc668f8ff5fd29c91 100644
index 474492c3f02f99e801885a983b9c110a8656c7b5..6d7095a62f30b18bc8fb8dbc5a0f3331980b7140 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -325,7 +325,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -76,7 +76,7 @@ index 1f8dcc331505890ba72777b5d0cda2427e0ccfd1..a661f8a83d4e57ca48bbf28dc668f8ff
@Override
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index d31670aecc2ebe67bf6071c67126ce4142b93053..6de4e9f379fe0cb44f14fe68ae1dee55a73d2d99 100644
index efce67fb84fe0586c586212bb3c02dd06f72371f..463b8cd52df5ca0d3168ef5c095dbc190b5956f4 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -1204,7 +1204,7 @@ public class ServerPlayer extends Player {
@ -89,7 +89,7 @@ index d31670aecc2ebe67bf6071c67126ce4142b93053..6de4e9f379fe0cb44f14fe68ae1dee55
playerlist.sendPlayerPermissionLevel(this);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b664a4ae7b10ce3ea83186a6112c0db0cbd6112a..c3844274b185decd92d021e7c7343adb56052cc6 100644
index 919a45d3a77330b9e2780fd7f2e96f5a4917b228..5cf42146e1885fe1427ac7a248e2ba6dc1b4128b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -3161,7 +3161,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -102,11 +102,11 @@ index b664a4ae7b10ce3ea83186a6112c0db0cbd6112a..c3844274b185decd92d021e7c7343adb
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b35b3feafbd25d698d3fea463d4bf65b6a09b590..7494c8762f7ea9828a7dfc71dc2965838bbd8a0f 100644
index 92a6b6e838336c086ab5fc534ec8bb2d94e3453a..23faeac3cf5a78ea869744d582fbe631a3d6dc44 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -957,8 +957,8 @@ public final class CraftServer implements Server {
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
this.console.paperConfigurations.reloadConfigs(this.console);
for (ServerLevel world : this.console.getAllLevels()) {
- world.serverLevelData.setDifficulty(config.difficulty);
@ -117,7 +117,7 @@ index b35b3feafbd25d698d3fea463d4bf65b6a09b590..7494c8762f7ea9828a7dfc71dc296583
for (SpawnCategory spawnCategory : SpawnCategory.values()) {
if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0f2166ce8facfdc8d51a580ca0c5107b7fbe67c2..689a0ca651e51b0207afc7346c891f363d1ec1aa 100644
index d352f6882adbf642b61e0f3f18abebbe5fff1a9b..2a5eea1bce3ed7af358c2dc9456d57e3168b2249 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1151,7 +1151,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -22,7 +22,7 @@ wants it to collect even faster, they can restore that setting back to 1 instead
Not adding it to .getType() though to keep behavior consistent with vanilla for performance reasons.
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 90d713ec27c260b9845473b886abd22644abd125..b1761300567e0e36ed17caed76f2aaa0ddb949d3 100644
index 23faeac3cf5a78ea869744d582fbe631a3d6dc44..b1162c638a87714ba9e54a24f10f229d303123bd 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -384,7 +384,7 @@ public final class CraftServer implements Server {
@ -42,9 +42,9 @@ index 90d713ec27c260b9845473b886abd22644abd125..b1761300567e0e36ed17caed76f2aaa0
+ TicketType.PLUGIN.timeout = Math.min(20, configuration.getInt("chunk-gc.period-in-ticks")); // Paper - cap plugin loads to 1 second
this.minimumAPI = this.configuration.getString("settings.minimum-api");
this.printSaveWarning = false;
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index bae5f6cf00c8cccfb6284b5e3dbfc8b26a724a71..a42d9425576e00318d3eb6431b56005397a90baa 100644
index 2a5eea1bce3ed7af358c2dc9456d57e3168b2249..6af214882a4208864b1e80231023b9a0644041fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -280,7 +280,13 @@ public class CraftWorld extends CraftRegionAccessor implements World {

Datei anzeigen

@ -30,15 +30,15 @@ index d4dba8c733c7560e5108b8d239b52e593f8debec..ea48f1119a940056c37d1d203437bfbf
public CraftAttributeMap(AttributeMap handle) {
this.handle = handle;
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 907a584257ff4145b064f835d6396918cff6fa75..5b370696759d6b7269d89d747520f1c41e5dbe2c 100644
index e29134181d5b032311fe163b48fbe53f1298c6fd..33772b435557caed9e024547f101fc0b16668b8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -484,7 +484,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
- String attributeName = entry.getString(ATTRIBUTES_IDENTIFIER.NBT);
+ String attributeName = CraftAttributeMap.convertIfNeeded(entry.getString(ATTRIBUTES_IDENTIFIER.NBT)); // Paper
- String attributeName = entry.getString(CraftMetaItem.ATTRIBUTES_IDENTIFIER.NBT);
+ String attributeName = CraftAttributeMap.convertIfNeeded(entry.getString(CraftMetaItem.ATTRIBUTES_IDENTIFIER.NBT)); // Paper
if (attributeName == null || attributeName.isEmpty()) {
continue;
}

Datei anzeigen

@ -5,11 +5,11 @@ Subject: [PATCH] Support components in ItemMeta
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 5b370696759d6b7269d89d747520f1c41e5dbe2c..03639ba2ad9c91a96e6fd46f023c101a63b760e8 100644
index 33772b435557caed9e024547f101fc0b16668b8f..0766b991079bfda1558cc17b75ff3dd06c1ad725 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -878,11 +878,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
return CraftChatMessage.fromJSONComponent(displayName);
return CraftChatMessage.fromJSONComponent(this.displayName);
}
+ // Paper start

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix SpawnChangeEvent not firing for all use-cases
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 5826536978724b54080d7d4ee61aa79800d57800..197ef343cb2d7a072852dc36964d54d5b9e72529 100644
index 0ff614ea19ff5420c506fe402caf230b1e0a3a36..e6694cb87031cb273ba53ac991d4c79b1f5c1ced 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1996,9 +1996,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -21,7 +21,7 @@ index 5826536978724b54080d7d4ee61aa79800d57800..197ef343cb2d7a072852dc36964d54d5
// if this keepSpawnInMemory is false a plugin has already removed our tickets, do not re-add
this.removeTicketsForSpawn(this.paperConfig().spawn.keepSpawnLoadedRange * 16, prevSpawn);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 38d8a8306acb43e9a8bc69bd3990be8e53536e0d..e0c3a5cf44a66d3df31871da57460bb648c8770b 100644
index 6af214882a4208864b1e80231023b9a0644041fb..56710af63bf432ab38c3a39ad3b734371bb429d7 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -260,12 +260,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -29,9 +29,9 @@ index 38d8a8306acb43e9a8bc69bd3990be8e53536e0d..e0c3a5cf44a66d3df31871da57460bb6
public boolean setSpawnLocation(int x, int y, int z, float angle) {
try {
- Location previousLocation = this.getSpawnLocation();
- world.levelData.setSpawn(new BlockPos(x, y, z), angle);
- this.world.levelData.setSpawn(new BlockPos(x, y, z), angle);
+ // Location previousLocation = this.getSpawnLocation(); // Paper - moved to nms.ServerLevel
+ world.setDefaultSpawnPos(new BlockPos(x, y, z), angle); // Paper - use ServerLevel#setDefaultSpawnPos
+ this.world.setDefaultSpawnPos(new BlockPos(x, y, z), angle); // Paper - use ServerLevel#setDefaultSpawnPos
+ // Paper start - move to nms.ServerLevel
// Notify anyone who's listening.

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 197ef343cb2d7a072852dc36964d54d5b9e72529..4ad4faf17dcedefc7add11af180d744a5c2f31a8 100644
index e6694cb87031cb273ba53ac991d4c79b1f5c1ced..fe376f3224ed4083d0bfc20911fc059d7b32e2c9 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1509,6 +1509,12 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -23,21 +23,21 @@ index 197ef343cb2d7a072852dc36964d54d5b9e72529..4ad4faf17dcedefc7add11af180d744a
if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
return false;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index cf47536a2e37d53406fc9cb3f09095e034af8e15..c256423e9dc9d1837b847da44fb2920c58842c8b 100644
index 345bae8d145abd8357f4b71f4977e5850b980ff4..40ac674da09a5d28c3b691d8979b228b9c6a8a84 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -436,10 +436,12 @@ public class ServerPlayerGameMode {
// return true; // CraftBukkit
}
// CraftBukkit start
+ java.util.List<net.minecraft.world.entity.item.ItemEntity> itemsToDrop = level.captureDrops; // Paper - store current list
+ level.captureDrops = null; // Paper - Remove this earlier so that we can actually drop stuff
+ java.util.List<net.minecraft.world.entity.item.ItemEntity> itemsToDrop = this.level.captureDrops; // Paper - store current list
+ this.level.captureDrops = null; // Paper - Remove this earlier so that we can actually drop stuff
if (event.isDropItems()) {
- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, state, this.player, level.captureDrops);
- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, state, this.player, this.level.captureDrops);
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, state, this.player, itemsToDrop); // Paper - use stored ref
}
- level.captureDrops = null;
+ //world.captureDrops = null; // Paper - move up
- this.level.captureDrops = null;
+ //this.level.captureDrops = null; // Paper - move up
// Drop event experience
if (flag && event != null) {

Datei anzeigen

@ -39,7 +39,7 @@ index 3f09420ba9268ac1dc5440c0739744370c0de319..052389310826ee6b97cf27dfd952e010
return new CraftObjective(this, objective);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
index d5c15dd1287e0d5348dc9f7c622850705fcd4ac9..8f20fa2bfbe037fbaa9f4c4c3341a3d9b9a711b5 100644
index ea838766d1a7620c3722876bfb819b731db11638..f06f011375b9be307a858ccb6579f74942b1d325 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
@@ -30,6 +30,7 @@ public final class CraftScoreboardManager implements ScoreboardManager {
@ -48,7 +48,7 @@ index d5c15dd1287e0d5348dc9f7c622850705fcd4ac9..8f20fa2bfbe037fbaa9f4c4c3341a3d9
this.mainScoreboard = new CraftScoreboard(scoreboardServer);
+ mainScoreboard.registeredGlobally = true; // Paper
this.server = minecraftserver;
this.scoreboards.add(mainScoreboard);
this.scoreboards.add(this.mainScoreboard);
}
@@ -43,10 +44,22 @@ public final class CraftScoreboardManager implements ScoreboardManager {
public CraftScoreboard getNewScoreboard() {

Datei anzeigen

@ -28,7 +28,7 @@ index da878e180c6b94f98dc82c6e8395f63ecc9b2c1e..a9b0f5950b6f97ea4c2a1075946b9200
super(block, propertyMap, codec);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
index 89be1b21c918c5b81ec29fc460fa57d413fb498f..26223227f467c65f62d62a5cba6403979f62c753 100644
index 089f2a4780a0e3515c032d08a1bb2ea375ebdce1..30f6d74e867869b0070de83fe988672a74580043 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
@@ -98,7 +98,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
@ -41,20 +41,20 @@ index 89be1b21c918c5b81ec29fc460fa57d413fb498f..26223227f467c65f62d62a5cba640397
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 5a1b0f2352016497099c68c5bcd09a43ebe8bf3a..ef1e77729b12a9ee0b13fa283f8200cc0c3968ce 100644
index 8313d6de11427a4340ac9fc4f3a04070a5c80cd8..848f089e559e4feb67dea9148291f70460da9e9d 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -219,7 +219,7 @@ public class CraftBlock implements Block {
@Override
public Material getType() {
- return CraftMagicNumbers.getMaterial(this.world.getBlockState(position).getBlock());
- return CraftMagicNumbers.getMaterial(this.world.getBlockState(this.position).getBlock());
+ return this.world.getBlockState(this.position).getBukkitMaterial(); // Paper - optimise getType calls
}
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index 3fa5e395faf68c80f4f35afcb83003538e153af1..eb895090384b6ce0943e8286a3aae55506f4310a 100644
index a193583f596c0a587cd0c2d6eac994226ee4fde0..aca63719790429d3d7c7c59a1931a98221c70fc0 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -170,7 +170,7 @@ public class CraftBlockState implements BlockState {

Datei anzeigen

@ -91,7 +91,7 @@ index 1d755d04515f20dbd69931084b4cc894e52d35c9..4f7457578ab3118d10e0d5dfc23d79c9
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
index 335d65c22efc2b8fd53476e3efd6e74fce5609cf..c48f67f4202e32d9793b462609bd3b95c9765bbd 100644
index c015b34d2b13a759783da7c0c06dd0563d35fc88..5741a233fb1dd8ad0f83a09b44476a4b88e6aa16 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
@@ -18,11 +18,19 @@ public class CraftMerchantRecipe extends MerchantRecipe {
@ -125,7 +125,7 @@ index 335d65c22efc2b8fd53476e3efd6e74fce5609cf..c48f67f4202e32d9793b462609bd3b95
);
this.setSpecialPrice(specialPrice);
@@ -108,6 +117,18 @@ public class CraftMerchantRecipe extends MerchantRecipe {
handle.priceMultiplier = priceMultiplier;
this.handle.priceMultiplier = priceMultiplier;
}
+ // Paper start
@ -141,7 +141,7 @@ index 335d65c22efc2b8fd53476e3efd6e74fce5609cf..c48f67f4202e32d9793b462609bd3b95
+ // Paper end
+
public net.minecraft.world.item.trading.MerchantOffer toMinecraft() {
List<ItemStack> ingredients = getIngredients();
List<ItemStack> ingredients = this.getIngredients();
Preconditions.checkState(!ingredients.isEmpty(), "No offered ingredients");
@@ -122,7 +143,7 @@ public class CraftMerchantRecipe extends MerchantRecipe {
if (recipe instanceof CraftMerchantRecipe) {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Implement API to get Material from Boats and Minecarts
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
index ff83b62207652903334e3c2631f22a6456788fe2..d7d54df20984352d84ffb9f7b7da583c34587b85 100644
index f332bd4e6f663147c9ef6ce03d926feb74b55e93..d161cbf9c83cd78593864850b98f688da2c85aa5 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
@@ -79,6 +79,13 @@ public class CraftBoat extends CraftVehicle implements Boat {
@ -23,7 +23,7 @@ index ff83b62207652903334e3c2631f22a6456788fe2..d7d54df20984352d84ffb9f7b7da583c
public Status getStatus() {
return CraftBoat.boatStatusFromNms(this.getHandle().status);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
index 053112d7411caa6f439bd344e74aff8c844d93ac..067fcc1f44d59dd675a9cc5485234c87366ffe10 100644
index ee010d53f8c671d17d68f3f43dca9978e23ac8ab..8920af5a0dfe737c1f38d906b53e6a278456d2aa 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
@@ -1,8 +1,10 @@
@ -59,4 +59,4 @@ index 053112d7411caa6f439bd344e74aff8c844d93ac..067fcc1f44d59dd675a9cc5485234c87
+
@Override
public AbstractMinecart getHandle() {
return (AbstractMinecart) entity;
return (AbstractMinecart) this.entity;

Datei anzeigen

@ -11,7 +11,7 @@ Subject: [PATCH] Fix interact event not being called sometimes
Co-authored-by: Moulberry <james.jenour@protonmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index a32e63f4ffff849aa13daf831b1e436c1112dde2..63535d38c0f7a7fbf19a1e91747f6989d0f72a60 100644
index 059d2521bb2b86ccafd4b51a014bc6822692d854..95cc9134244eb226480969674201cd234a055964 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1733,7 +1733,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -24,13 +24,13 @@ index a32e63f4ffff849aa13daf831b1e436c1112dde2..63535d38c0f7a7fbf19a1e91747f6989
}
}
@@ -2295,13 +2295,20 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
double d3 = player.gameMode.getGameModeForPlayer() == GameType.CREATIVE ? 5.0D : 4.5D;
double d3 = this.player.gameMode.getGameModeForPlayer() == GameType.CREATIVE ? 5.0D : 4.5D;
// SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time
// SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities
- org.bukkit.util.RayTraceResult result = this.player.level().getWorld().rayTrace(origin, origin.getDirection(), d3, org.bukkit.FluidCollisionMode.NEVER, false, 0.1, entity -> {
+ org.bukkit.util.RayTraceResult result = this.player.level().getWorld().rayTrace(origin, origin.getDirection(), d3, org.bukkit.FluidCollisionMode.NEVER, false, 0.0, entity -> { // Paper - change raySize from 0.1 to 0.0
Entity handle = ((CraftEntity) entity).getHandle();
return entity != this.player.getBukkitEntity() && this.player.getBukkitEntity().canSee(entity) && !handle.isSpectator() && handle.isPickable() && !handle.isPassengerOfSameVehicle(player);
return entity != this.player.getBukkitEntity() && this.player.getBukkitEntity().canSee(entity) && !handle.isSpectator() && handle.isPickable() && !handle.isPassengerOfSameVehicle(this.player);
});
if (result == null) {
CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_AIR, this.player.getInventory().getSelected(), InteractionHand.MAIN_HAND);

Datei anzeigen

@ -20,7 +20,7 @@ index 93f44ca0c8388935baaa41f9b0ebb6de2f6906bb..53b62be779bbb31723c4953221d8b5f2
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index dac43bcd9dc796ffec983013291530f3bc541a26..e57af8c8f4a1ddfcf9689c8d721b2e2dc887f0be 100644
index 98fe64fcab9d0f8497794ccb8df563be782798d9..44d74515165f1ebce5fb5c875ba9c4a53eab9980 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1139,9 +1139,15 @@ public final class CraftServer implements Server {
@ -49,7 +49,7 @@ index dac43bcd9dc796ffec983013291530f3bc541a26..e57af8c8f4a1ddfcf9689c8d721b2e2d
+ worldKey = ResourceKey.create(Registries.DIMENSION, new net.minecraft.resources.ResourceLocation(creator.key().getNamespace().toLowerCase(java.util.Locale.ENGLISH), creator.key().getKey().toLowerCase(java.util.Locale.ENGLISH))); // Paper
}
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, this.console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
@@ -1321,6 +1327,15 @@ public final class CraftServer implements Server {
return null;
}

Datei anzeigen

@ -5,15 +5,15 @@ Subject: [PATCH] Don't ignore result of PlayerEditBookEvent
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index c6f983b66fa1c61f8d0a7d7806937dced4ea72c1..d45c8e234332978154f1fafad6ed5edf927f6103 100644
index a4f10823242f412ccfece093ed0986512131c4ba..b84cc507ee467e61e90a31da1ca8568f0d947f6b 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1186,7 +1186,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
}
itemstack.addTagElement("pages", nbttaglist);
- CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack); // CraftBukkit
+ this.player.getInventory().setItem(slot, CraftEventFactory.handleEditBookEvent(player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
- CraftEventFactory.handleEditBookEvent(this.player, slot, handItem, itemstack); // CraftBukkit
+ this.player.getInventory().setItem(slot, CraftEventFactory.handleEditBookEvent(this.player, slot, handItem, itemstack)); // CraftBukkit // Paper - Don't ignore result (see other callsite for handleEditBookEvent)
}
@Override

Datei anzeigen

@ -8,7 +8,7 @@ Paper.bypassHostCheck
Seriously, fix your firewalls. -.-
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
index 65ee0a7183abb0a4b1f36d2ef9631c00b52eb99e..f72a63d654bf5b7edebfc5afdced0b204d70966d 100644
index 2ee5c884571228a353120f658f1a2d39373ea4ca..bb8ba0ba5c70f321d4fd195f14cfb4d75ec0e42f 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
@@ -30,6 +30,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
@ -25,6 +25,6 @@ index 65ee0a7183abb0a4b1f36d2ef9631c00b52eb99e..f72a63d654bf5b7edebfc5afdced0b20
// if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
- if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) {
+ if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
connection.hostname = split[0];
connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());
connection.spoofedUUID = com.mojang.util.UndashedUuid.fromStringLenient( split[2] );
this.connection.hostname = split[0];
this.connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());
this.connection.spoofedUUID = com.mojang.util.UndashedUuid.fromStringLenient( split[2] );

Datei anzeigen

@ -275,7 +275,7 @@ index 0ea4b588ae7426c59a47ec30e39c878c5fe3df85..963e9887bda7bbcd9555fcbb17d63362
Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, dimensionOptionsRegistry, eraseCache);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 6fbe95fea9faa830cde4ff8a8031d148223023e5..171ee674689042ec571c15bfde529bede7056f07 100644
index 992aa1fa85f0b0240d317773be5086e64889996a..1400fd3f8eb38c15e85221b5805080e1d792215f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -540,11 +540,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -306,7 +306,7 @@ index 6fbe95fea9faa830cde4ff8a8031d148223023e5..171ee674689042ec571c15bfde529bed
if (dimensionKey == LevelStem.OVERWORLD) {
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 1577b7317b85708d39d4171321df785a8107bdb2..51dc136b9a5006382de4b12275a9c2f299d5d1f9 100644
index e22214b99472b23ffc95c011b19bdb59e2d9bb40..b3833da06ec8882f09b01fc596eafe519f0873c1 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -184,6 +184,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
@ -360,15 +360,15 @@ index b850dba2b0fa5bc762b170ed7083cf8904761f17..7dee0f7d49f3492c92fceff7750e6962
return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()));
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 87374f4f81affc7ae72d7178f4c414026518a5f6..ab1c96a6d7e0d3f8bb651936256e9a66badf3355 100644
index 2bc30c803b311ac57323b4531556e4f5effb4437..6a860029247e1575329975060fb9c2d7e8c9f033 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1216,9 +1216,7 @@ public final class CraftServer implements Server {
worlddata.checkName(name);
worlddata.setModdedInfo(this.console.getServerModName(), this.console.getModdedStatus().shouldReportAsModified());
- if (console.options.has("forceUpgrade")) {
- net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), console.options.has("eraseCache"), () -> true, iregistry);
- if (this.console.options.has("forceUpgrade")) {
- net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), this.console.options.has("eraseCache"), () -> true, iregistry);
- }
+ // Paper - move down
@ -379,9 +379,9 @@ index 87374f4f81affc7ae72d7178f4c414026518a5f6..ab1c96a6d7e0d3f8bb651936256e9a66
}
+ // Paper start - fix and optimise world upgrading
+ if (console.options.has("forceUpgrade")) {
+ if (this.console.options.has("forceUpgrade")) {
+ net.minecraft.server.Main.convertWorldButItWorks(
+ actualDimension, worldSession, DataFixers.getDataFixer(), worlddimension.generator().getTypeNameForDataFixer(), console.options.has("eraseCache")
+ actualDimension, worldSession, DataFixers.getDataFixer(), worlddimension.generator().getTypeNameForDataFixer(), this.console.options.has("eraseCache")
+ );
+ }
+ // Paper end - fix and optimise world upgrading

Datei anzeigen

@ -11,7 +11,7 @@ Tested-by: Mariell Hoversholm <proximyst@proximyst.com>
Reviewed-by: Mariell Hoversholm <proximyst@proximyst.com>
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index f598c87dac7a2f852eb8a3948b5ba1a299e85492..b9a4447e790f34fd8f88f353bf0e24a18a298ee6 100644
index 3c751c98de1d5a9b41ebd832be0ae317d4ac9362..51c924f051c25cac8172b0ddab83f3b7a69adfe6 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -219,6 +219,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
@ -93,7 +93,7 @@ index 6641fd04821240b1bbeff1bd8d996a8f2fff8385..5f625acf04ddb56e3596d086252f9bfc
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index f8b5122ed55574260391206b99f165fa1515bb02..c4f43ce78f6cf28deee2dbf2bfd942e6b7976a52 100644
index ef66cd1bac6f80120c14c884d4de5036a3d1d9cc..24e3f3ee7f8af6ec9d61afd8e80e0909ee48c8f0 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2460,6 +2460,11 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -109,7 +109,7 @@ index f8b5122ed55574260391206b99f165fa1515bb02..c4f43ce78f6cf28deee2dbf2bfd942e6
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
index f72a63d654bf5b7edebfc5afdced0b204d70966d..ae6efc0b8fe1787300a4c6d223dfe48df861ecc6 100644
index bb8ba0ba5c70f321d4fd195f14cfb4d75ec0e42f..0b3d6b309ea653d44bcfcd6dd418f692e040c87b 100644
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
@@ -45,6 +45,7 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
@ -133,11 +133,11 @@ index f72a63d654bf5b7edebfc5afdced0b204d70966d..ae6efc0b8fe1787300a4c6d223dfe48d
// if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
if ( ( split.length == 3 || split.length == 4 ) && ( ServerHandshakePacketListenerImpl.BYPASS_HOSTCHECK || ServerHandshakePacketListenerImpl.HOST_PATTERN.matcher( split[1] ).matches() ) ) { // Paper
+ // Paper start - Unix domain socket support
+ java.net.SocketAddress socketAddress = connection.getRemoteAddress();
connection.hostname = split[0];
- connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());
+ connection.address = new java.net.InetSocketAddress(split[1], socketAddress instanceof java.net.InetSocketAddress ? ((java.net.InetSocketAddress) socketAddress).getPort() : 0);
+ java.net.SocketAddress socketAddress = this.connection.getRemoteAddress();
this.connection.hostname = split[0];
- this.connection.address = new java.net.InetSocketAddress(split[1], ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getPort());
+ this.connection.address = new java.net.InetSocketAddress(split[1], socketAddress instanceof java.net.InetSocketAddress ? ((java.net.InetSocketAddress) socketAddress).getPort() : 0);
+ // Paper end
connection.spoofedUUID = com.mojang.util.UndashedUuid.fromStringLenient( split[2] );
this.connection.spoofedUUID = com.mojang.util.UndashedUuid.fromStringLenient( split[2] );
} else
{

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add cause to Weather/ThunderChangeEvents
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 0f59f5da41f3ab18148a7b44b0872632f03ad078..508b18f5e7dd6240a680e73be639d0cf9e4e5d07 100644
index f6ee996e6d85e1ab886ffc941a4a8cc05857e4e0..61b8ec1ba224551f6898f3e2abbb67992dbb7001 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -666,8 +666,8 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -48,7 +48,7 @@ index 0f59f5da41f3ab18148a7b44b0872632f03ad078..508b18f5e7dd6240a680e73be639d0cf
// If we stop due to everyone sleeping we should reset the weather duration to some other random value.
// Not that everyone ever manages to get the whole server to sleep at the same time....
diff --git a/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java b/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java
index 14b8011c8874e05647eb1636ee1eed5d90da8200..7bfc5bbfcf67e5bbf57e99e648ff5bed4d6b477f 100644
index 8f661e3080f8145c1e78ff7bd84d77707eef6d9e..6357ac8640fdf9f47a94ad69e77a67f60ddf101f 100644
--- a/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java
+++ b/src/main/java/net/minecraft/world/level/storage/PrimaryLevelData.java
@@ -394,6 +394,11 @@ public class PrimaryLevelData implements ServerLevelData, WorldData {
@ -95,15 +95,15 @@ index 14b8011c8874e05647eb1636ee1eed5d90da8200..7bfc5bbfcf67e5bbf57e99e648ff5bed
if (weather.isCancelled()) {
return;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 784001a514b2400b07f64f7d60ec0926891b7b51..a08d724c327b8f3eb819f72713b7fe4be18c1940 100644
index def1c8a46d686f8be5837c76c15b7463dec553ce..a50a9f239ef27807d876aca9b18fbbb1dfbb14fa 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1187,7 +1187,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@Override
public void setStorm(boolean hasStorm) {
- world.levelData.setRaining(hasStorm);
+ world.serverLevelData.setRaining(hasStorm, org.bukkit.event.weather.WeatherChangeEvent.Cause.PLUGIN); // Paper
- this.world.levelData.setRaining(hasStorm);
+ this.world.serverLevelData.setRaining(hasStorm, org.bukkit.event.weather.WeatherChangeEvent.Cause.PLUGIN); // Paper
this.setWeatherDuration(0); // Reset weather duration (legacy behaviour)
this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
}
@ -111,8 +111,8 @@ index 784001a514b2400b07f64f7d60ec0926891b7b51..a08d724c327b8f3eb819f72713b7fe4b
@Override
public void setThundering(boolean thundering) {
- world.serverLevelData.setThundering(thundering);
+ world.serverLevelData.setThundering(thundering, org.bukkit.event.weather.ThunderChangeEvent.Cause.PLUGIN); // Paper
- this.world.serverLevelData.setThundering(thundering);
+ this.world.serverLevelData.setThundering(thundering, org.bukkit.event.weather.ThunderChangeEvent.Cause.PLUGIN); // Paper
this.setThunderDuration(0); // Reset weather duration (legacy behaviour)
this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
}

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] More Lidded Block API
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java
index d1046001f0c994174e5ead9e9bf423e61f4ae5c7..3ee3bbb2231d8fcdd6ff9610ec38d40ac5dd219d 100644
index 08a84f66478d765080367a1c1acd77908ce605a8..7a09fde1a6fbd460548b43ff52301c51d8f5afbc 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java
@@ -67,4 +67,11 @@ public class CraftBarrel extends CraftLootable<BarrelBlockEntity> implements Bar
@ -21,7 +21,7 @@ index d1046001f0c994174e5ead9e9bf423e61f4ae5c7..3ee3bbb2231d8fcdd6ff9610ec38d40a
+ // Paper end - More Lidded Block API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
index 51b5edd8adf029041da69a33da0423da8f6803c8..09dc268cf5a6ba675ed198e03f252c944f4f7117 100644
index b742d9d231bf79ed53d3fe4deaa81e64c6801c4c..b5d9e750965b21c27ec4aa12b0997176adbad527 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
@@ -87,4 +87,11 @@ public class CraftChest extends CraftLootable<ChestBlockEntity> implements Chest
@ -37,7 +37,7 @@ index 51b5edd8adf029041da69a33da0423da8f6803c8..09dc268cf5a6ba675ed198e03f252c94
+ // Paper end - More Lidded Block API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java
index aeaf0dc35ffa230664f7e6a45e1881fa093fdac6..89f95b39a4e655ed6999e3de2f0d928ba9bace70 100644
index 79fafa30e4f09dc375cc3fcb1d95a9ab6c8fb9f4..872a579460ebe8d6085188a6be9c9eb9b8d4bfa2 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java
@@ -45,4 +45,11 @@ public class CraftEnderChest extends CraftBlockEntityState<EnderChestBlockEntity
@ -53,17 +53,17 @@ index aeaf0dc35ffa230664f7e6a45e1881fa093fdac6..89f95b39a4e655ed6999e3de2f0d928b
+ // Paper end - More Lidded Block API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
index 823b9f42b20724a0780af03ffef3d0271d660a95..97e34bef95bc839c136db2cff39eaf66566c90b9 100644
index e9c72d58596c528909bbfbccb97b85d36aca7703..3ccab14646c385b10dd310e2f7640fd2249f5371 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
@@ -59,7 +59,7 @@ public class CraftShulkerBox extends CraftLootable<ShulkerBoxBlockEntity> implem
if (getTileEntity().opened && getWorldHandle() instanceof net.minecraft.world.level.Level) {
net.minecraft.world.level.Level world = getTileEntity().getLevel();
world.blockEvent(getPosition(), getTileEntity().getBlockState().getBlock(), 1, 0);
- world.playSound(null, getPosition(), SoundEvents.SHULKER_BOX_OPEN, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
+ world.playSound(null, getPosition(), SoundEvents.SHULKER_BOX_CLOSE, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F); // Paper - More Lidded Block API (Wrong sound)
if (this.getTileEntity().opened && this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
net.minecraft.world.level.Level world = this.getTileEntity().getLevel();
world.blockEvent(this.getPosition(), this.getTileEntity().getBlockState().getBlock(), 1, 0);
- world.playSound(null, this.getPosition(), SoundEvents.SHULKER_BOX_OPEN, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
+ world.playSound(null, this.getPosition(), SoundEvents.SHULKER_BOX_CLOSE, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F); // Paper - More Lidded Block API (Wrong sound)
}
getTileEntity().opened = false;
this.getTileEntity().opened = false;
}
@@ -68,4 +68,11 @@ public class CraftShulkerBox extends CraftLootable<ShulkerBoxBlockEntity> implem
public CraftShulkerBox copy() {

Datei anzeigen

@ -36,7 +36,7 @@ index b5f54ee82905e3e6ab5bfde35ab625f5feeb1393..c0a80824a0307ea673805015119cc834
public boolean shouldDisconnect() {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 171ee674689042ec571c15bfde529bede7056f07..7e4f3b7a5790292b3b8439fb4696d9d6cfec0167 100644
index 1400fd3f8eb38c15e85221b5805080e1d792215f..d74313b58b660f3c03b8a6db4f80b6b073b6b795 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -2151,7 +2151,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -88,7 +88,7 @@ index c68bac4727f6b2ca95fc8c438303097af14286f2..bb629ec263959c8268de88ca807bddb6
return Component.translatable("commands.kick.success", serverPlayer.getDisplayName(), reason);
}, true);
diff --git a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
index 95d37df1b51453722d47eb07e2e0247f308fa171..125a9d1ae394db4b0d5418756d50e32feca83344 100644
index d660041805bcd1bb97cf347d8b1cfe5c65469f56..a0328cfbe4184a2c1dc895e96fa3fefbdc52bf09 100644
--- a/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
@@ -94,7 +94,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
@ -107,7 +107,7 @@ index 95d37df1b51453722d47eb07e2e0247f308fa171..125a9d1ae394db4b0d5418756d50e32f
- this.disconnect("Invalid payload REGISTER!");
+ this.disconnect("Invalid payload REGISTER!", org.bukkit.event.player.PlayerKickEvent.Cause.INVALID_PAYLOAD); // Paper - kick event cause
}
} else if (identifier.equals(CUSTOM_UNREGISTER)) {
} else if (identifier.equals(ServerCommonPacketListenerImpl.CUSTOM_UNREGISTER)) {
try {
@@ -140,7 +140,7 @@ public abstract class ServerCommonPacketListenerImpl implements ServerCommonPack
}
@ -197,7 +197,7 @@ index 95d37df1b51453722d47eb07e2e0247f308fa171..125a9d1ae394db4b0d5418756d50e32f
if (this.cserver.getServer().isRunning()) {
this.cserver.getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4a5c462998d833e5377c79cf5ded843a8cc71d48..9cd00fce9dadd65020de9c48524416d6d3c82bc4 100644
index 24e3f3ee7f8af6ec9d61afd8e80e0909ee48c8f0..7f030cac8b3bc7d2d4b1c32ef5edc360473881f2 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -340,7 +340,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -392,8 +392,8 @@ index 4a5c462998d833e5377c79cf5ded843a8cc71d48..9cd00fce9dadd65020de9c48524416d6
// Spigot Start
if ( entity == this.player && !this.player.isSpectator() )
{
- disconnect( "Cannot interact with self!" );
+ disconnect( "Cannot interact with self!" , org.bukkit.event.player.PlayerKickEvent.Cause.SELF_INTERACTION ); // Paper - kick event cause
- this.disconnect( "Cannot interact with self!" );
+ this.disconnect( "Cannot interact with self!" , org.bukkit.event.player.PlayerKickEvent.Cause.SELF_INTERACTION ); // Paper - kick event cause
return;
}
// Spigot End
@ -434,7 +434,7 @@ index 4a5c462998d833e5377c79cf5ded843a8cc71d48..9cd00fce9dadd65020de9c48524416d6
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 8d7e99a331b21f2efbb60936974395b9c12ad5d6..9a1f1548b7f095946edb105ddfd64932bf64a2df 100644
index 2726c54dc57e584352fde31f1638b0d1416b14ad..0139313fb1b06da9df19317748862700c1b5b6e9 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -665,7 +665,7 @@ public abstract class PlayerList {
@ -488,7 +488,7 @@ index 6724d0a1af13e97bc1d3bd94fd43fef742a0deab..20ba0a0c9eae28658888a77dd2170f62
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 6216a1b2c5fbfeafcce4fee81d7b12a14a8f594b..a068e2ae2e419b8b6a8cc560754613a55717c399 100644
index a4869668643bcfe11c4a0f33d02e4b800da29a48..dad0a07790579bc3d8b018e1c5e281d4fe9633ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -586,7 +586,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -527,7 +527,7 @@ index 6216a1b2c5fbfeafcce4fee81d7b12a14a8f594b..a068e2ae2e419b8b6a8cc560754613a5
if (msg.startsWith("/")) {
this.getHandle().connection.handleCommand(msg);
diff --git a/src/main/java/org/spigotmc/RestartCommand.java b/src/main/java/org/spigotmc/RestartCommand.java
index 29b39dff0aceaa902f701162a42d3f2f881d6d5a..6a8fc3bc43183538f5717c0b34f83b47fd081bad 100644
index 631457374fda492776f4af0515cee2e43a934d2c..da7d5efd76c9ef92e9ce22860fec791890a687be 100644
--- a/src/main/java/org/spigotmc/RestartCommand.java
+++ b/src/main/java/org/spigotmc/RestartCommand.java
@@ -73,7 +73,7 @@ public class RestartCommand extends Command

Datei anzeigen

@ -5,23 +5,23 @@ Subject: [PATCH] Make item validations configurable
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index 5d72d2c6fcab478121eb9b4216cf79532b58299e..88c899e323eb554febe191ac7df678bbdfde08dc 100644
index 5e01357208fe52c1d270c68cb19029ea0f4057bb..6d85237b21650edf1d2dc71abaf0edbe7a8aef6b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -88,11 +88,11 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
super(tag);
if (tag.contains(BOOK_TITLE.NBT)) {
- this.title = limit( tag.getString(BOOK_TITLE.NBT), 8192 ); // Spigot
+ this.title = limit( tag.getString(BOOK_TITLE.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.book.title); // Spigot // Paper - make configurable
if (tag.contains(CraftMetaBook.BOOK_TITLE.NBT)) {
- this.title = limit( tag.getString(CraftMetaBook.BOOK_TITLE.NBT), 8192 ); // Spigot
+ this.title = limit( tag.getString(CraftMetaBook.BOOK_TITLE.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.book.title); // Spigot // Paper - make configurable
}
if (tag.contains(BOOK_AUTHOR.NBT)) {
- this.author = limit( tag.getString(BOOK_AUTHOR.NBT), 8192 ); // Spigot
+ this.author = limit( tag.getString(BOOK_AUTHOR.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.book.author ); // Spigot // Paper - make configurable
if (tag.contains(CraftMetaBook.BOOK_AUTHOR.NBT)) {
- this.author = limit( tag.getString(CraftMetaBook.BOOK_AUTHOR.NBT), 8192 ); // Spigot
+ this.author = limit( tag.getString(CraftMetaBook.BOOK_AUTHOR.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.book.author ); // Spigot // Paper - make configurable
}
if (tag.contains(RESOLVED.NBT)) {
if (tag.contains(CraftMetaBook.RESOLVED.NBT)) {
@@ -120,7 +120,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta {
} else {
page = this.validatePage(page);
@ -32,20 +32,20 @@ index 5d72d2c6fcab478121eb9b4216cf79532b58299e..88c899e323eb554febe191ac7df678bb
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index fa0b8293bb9df1ab344f6d795d3d5ac92f605d3e..f79ea76c0127b7b57ab0511afbed626a3b42fd05 100644
index 0766b991079bfda1558cc17b75ff3dd06c1ad725..f6d2785b05b4c0a4393be706a90d7cc4388399bf 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -361,7 +361,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
CompoundTag display = tag.getCompound(DISPLAY.NBT);
CompoundTag display = tag.getCompound(CraftMetaItem.DISPLAY.NBT);
if (display.contains(NAME.NBT)) {
- this.displayName = limit( display.getString(NAME.NBT), 8192 ); // Spigot
+ this.displayName = limit( display.getString(NAME.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.displayName ); // Spigot // Paper - make configurable
if (display.contains(CraftMetaItem.NAME.NBT)) {
- this.displayName = limit( display.getString(CraftMetaItem.NAME.NBT), 8192 ); // Spigot
+ this.displayName = limit( display.getString(CraftMetaItem.NAME.NBT), io.papermc.paper.configuration.GlobalConfiguration.get().itemValidation.displayName ); // Spigot // Paper - make configurable
}
if (display.contains(LOCNAME.NBT)) {
if (display.contains(CraftMetaItem.LOCNAME.NBT)) {
@@ -372,7 +372,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
ListTag list = display.getList(LORE.NBT, CraftMagicNumbers.NBT.TAG_STRING);
ListTag list = display.getList(CraftMetaItem.LORE.NBT, CraftMagicNumbers.NBT.TAG_STRING);
this.lore = new ArrayList<String>(list.size());
for (int index = 0; index < list.size(); index++) {
- String line = limit( list.getString(index), 8192 ); // Spigot

Datei anzeigen

@ -268,7 +268,7 @@ index c23f05f0d951e0036fe2cf524989747fe236730b..cd59500565a305757872aaf41b03b49f
@Override
diff --git a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
index 5b3da07def02830e4332d7d3a7f7b968e5663c7b..74a4b1cdfe643007e0afd73f8eb0b1fbe29722cf 100644
index 8e72958dec9d4eb35330b72e057733a268e83745..decd59f7104ba26145e2150c3b8e5e0404d31885 100644
--- a/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
+++ b/src/main/java/net/minecraft/world/entity/monster/EnderMan.java
@@ -457,6 +457,16 @@ public class EnderMan extends Monster implements NeutralMob {
@ -306,7 +306,7 @@ index e398a7d5c560b1d94b21fe3241365ef8592d9fc8..c135bc245f59a1af706f98b9d140dee7
protected boolean shouldDespawnInPeaceful() {
return true;
diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
index 4657bfce13ad95edf1964eb361d5679f93ca2ab2..4b2cd6d34ea4081cad86041f57ccda41807d4279 100644
index c043f63ff861ccb0194fc8cf102c27af5bcfe491..d4ac3e566b47cfc8688bcc2ab08385b6de4693f8 100644
--- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
+++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java
@@ -201,6 +201,12 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder {
@ -387,7 +387,7 @@ index c3a26a55f46737a470448c6554d6827b1d6fc89c..c0186224fd64d70770a0e16752d17c08
entity = net.minecraft.world.entity.EntityType.TADPOLE.create(world);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
index 3f1f4d65525562b3117fdc21c8a7f535b12c3c46..90a989c7c9de6f9ba55ab640761915e98320642a 100644
index 264b3fb45c47fbb6be78262838a5c0438860915f..f9cd595ec28f0284d11bae6bfc5bf92d56526ef9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
@@ -114,4 +114,36 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
@ -450,7 +450,7 @@ index 35580198ee9ea566dd2643a707653512c6cd938f..a46b2dfb2f1c0c7c3b55d81fc881e481
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
index f049fd8b8fdfca6e64010741d000a2e3efddc83b..7592ecac3d0893974d9d22ce40c50f1008ab9695 100644
index b0a3531476f5a05ae846b68d825eddc35ebddea9..1bb72f28085f3885bec068b586ec222111044884 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
@@ -27,4 +27,25 @@ public class CraftBat extends CraftAmbient implements Bat {
@ -480,7 +480,7 @@ index f049fd8b8fdfca6e64010741d000a2e3efddc83b..7592ecac3d0893974d9d22ce40c50f10
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
index 86ad6073a130100258908d3f2c93c54e21e998f3..17608e0e8cc5288905d2e42ae1429f7d947511fb 100644
index cfff1be6a4a4936a2dadb2590abc3d33c123d048..3dac93b0ab5d5acf5b33dc4b0efed60319eb657b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
@@ -86,4 +86,42 @@ public class CraftBee extends CraftAnimals implements Bee {
@ -558,7 +558,7 @@ index 94be7d7d88b38d73592a6a76ee9b9b755ba6c588..6c9531c018be29b5794d047b50007fde
+ // Paper End - More cat api
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java
index c2c653e269330b8494eca98e9cf5a4abb79a6933..5e0b611db52452c00bf3cd2fc07dd713f238a581 100644
index 64b75682a936e071353707f7615d6ff512fd617d..96f6e2fd9c6b20d34122abfe5c7fba732502d5a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java
@@ -18,4 +18,26 @@ public class CraftChicken extends CraftAnimals implements Chicken {
@ -602,7 +602,7 @@ index fa0bf7db880063427ba12df1df1c72240fff93e9..63e6b07e3b159c74d9ef17be20b5ab43
public CraftCod(CraftServer server, net.minecraft.world.entity.animal.Cod entity) {
super(server, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
index cb161c3d1a08d9c143201040018664298e98eafe..92eb829161079c4a96447698aee58cc6e7cbd29f 100644
index 21dc209e6f98b6306833b41e2763e746047d5a94..983b9d6ddb58eff297e96e5c8b28ec427efa267d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
@@ -40,6 +40,28 @@ public class CraftEnderman extends CraftMonster implements Enderman {
@ -633,7 +633,7 @@ index cb161c3d1a08d9c143201040018664298e98eafe..92eb829161079c4a96447698aee58cc6
+
@Override
public EnderMan getHandle() {
return (EnderMan) entity;
return (EnderMan) this.entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java
index fc0f0e841dc974d080e1abb9bbafb5165801131f..d657fd2c507a5b215aeab0a5f3e9c2ee892a27c8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java
@ -655,7 +655,7 @@ index fc0f0e841dc974d080e1abb9bbafb5165801131f..d657fd2c507a5b215aeab0a5f3e9c2ee
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index a63fb984e905e51dc100eba30cbd71cac173ae22..2ea8b72ef450b60ec6d7ec10f3f94d2154e06670 100644
index d270d9ca6f1dea0ad4e6a919b58b845eebf3dc87..0a29960fca388dd95710bdba19f37fde6be52073 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -232,10 +232,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -679,7 +679,7 @@ index a63fb984e905e51dc100eba30cbd71cac173ae22..2ea8b72ef450b60ec6d7ec10f3f94d21
else { return new CraftFish(server, (AbstractFish) entity); }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
index 08911b340c45f0b6d4657bfe46f0b153997e4d49..6149067a14b950e727d3387055016a19e55c0fc6 100644
index 17164811bbcf983bef62c47bc99330074762267b..c455deb4fd2a7684bcc01a8212c362a2375c190b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
@@ -113,4 +113,41 @@ public class CraftFox extends CraftAnimals implements Fox {
@ -725,7 +725,7 @@ index 08911b340c45f0b6d4657bfe46f0b153997e4d49..6149067a14b950e727d3387055016a19
+ // Paper end - Add more fox behavior API
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java
index 24938472b7898c4111a1f7244b207fd32fcf6e80..3adcf36c7b4beb0f752f91b7333593a610ec118c 100644
index 2cec61a1bb050c1ef81c5fc3d0afafe9ff29d459..97fa4e1e70203194bd939618b2fad92665af6d59 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java
@@ -28,4 +28,17 @@ public class CraftGhast extends CraftFlying implements Ghast, CraftEnemy {
@ -788,12 +788,12 @@ index 9986ac517e11b076a29a8c8e3f480ec286fa5825..0ad16ee7b33582d214dab41eeee378d5
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
index 3ba7e8ef1035e1de2c195b6919fe57aee398af51..fbabf86510c582e372b0b1ac5585c7287734c985 100644
index 17f5684cba9d3ed22d9925d1951520cc4751dfe2..3a3563a1bdbc0d84d973b3a04b50b78b4bc3d379 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
@@ -33,4 +33,20 @@ public final class CraftMinecartHopper extends CraftMinecartContainer implements
public void setEnabled(boolean enabled) {
((MinecartHopper) getHandle()).setEnabled(enabled);
((MinecartHopper) this.getHandle()).setEnabled(enabled);
}
+ // Paper start
+ @Override
@ -813,7 +813,7 @@ index 3ba7e8ef1035e1de2c195b6919fe57aee398af51..fbabf86510c582e372b0b1ac5585c728
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
index de54d45d1764228bdbfb5a73173b551f25440898..7d9b8968334e536457b29be196545a1f4e312a83 100644
index 77cede9c565a3bc404878c9a4028cadc90f6c010..ade11598bee28fea252e3500aaa1daefc506c175 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
@@ -27,6 +27,28 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow {
@ -955,7 +955,7 @@ index 8b9695de6e3411cbcc2f97e4a4e243ec1d1dd076..03e74b29ebf0f9b9a0dbc6ffc872e22a
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java
index bf216a7b5438a16f1f50fa6d2fb67eebe1408ad3..3c4cbde06c768912332edf57768eabe082e47345 100644
index c7aec6f28e5d3546235b30f6b1112440a76163c5..fe075cfdf3097d6cb768e71b8cc360abb8eaf367 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java
@@ -17,4 +17,16 @@ public class CraftPolarBear extends CraftAnimals implements PolarBear {
@ -976,7 +976,7 @@ index bf216a7b5438a16f1f50fa6d2fb67eebe1408ad3..3c4cbde06c768912332edf57768eabe0
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
index 3c86feb0fea21d37e0c5175776a3d7844272e911..1a1dfb9e5164f9962059ebf11a9c3334a1987153 100644
index be20d5a3d5914683f40dc4a585b08a2f55616580..eb7e2902dc134847711284dd2af8abda7627c7ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
@@ -30,4 +30,15 @@ public class CraftRabbit extends CraftAnimals implements Rabbit {
@ -1049,7 +1049,7 @@ index b8140aa25a25870259b5644091c6643da1e14b54..d4d8ce60098c74508e2de9541bf65349
public CraftSalmon(CraftServer server, net.minecraft.world.entity.animal.Salmon entity) {
super(server, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTadpole.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTadpole.java
index 0e23bb2d8754a4124126803a6bbca22129d32381..730a25ef2fe934f64f65c21e4e007cf1dbab8bf2 100644
index 451a9bfd9b9b6945e224f1bb05c7951ed934b4e3..d7c6a0bbc5671ea8f2488230c94df5146a1e98b9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTadpole.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTadpole.java
@@ -28,4 +28,15 @@ public class CraftTadpole extends CraftFish implements org.bukkit.entity.Tadpole
@ -1101,7 +1101,7 @@ index 2d1fcbbaba2b88f2c19ae7553d89e50b30cf6581..c628594b981f276acae7b9337100d811
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
index 9982d94f19d0f201840653c227f1875c83de0723..d1d932dd27cff00e0ab69443a58715e3cbc1e57c 100644
index e3bde6d1c0e03407af1382a61748470063bb2e18..9e53c30801c700719c78c0fd521fd615c94e02c8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.CraftServer;
@ -1114,7 +1114,7 @@ index 9982d94f19d0f201840653c227f1875c83de0723..d1d932dd27cff00e0ab69443a58715e3
public CraftTropicalFish(CraftServer server, net.minecraft.world.entity.animal.TropicalFish entity) {
super(server, entity);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
index c4f7216c7ca7a49048fcf5240ef2a8f80e843f1c..6079581ba2eef8ac9272d0bbbf77e31f593edf0f 100644
index 1cfbe9c476f4a254edf3edf4b70696bbaba78558..e9ec3455eabc473e104b5342a615a38c1ac25a4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
@@ -29,6 +29,26 @@ public class CraftVex extends CraftMonster implements Vex {
@ -1171,7 +1171,7 @@ index e2a0c11867abee6add8775259c54f2052de7b1ad..fd968881eeec6dc5bdf90decc23a2bfc
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java
index 4a6700d7d2f40cf516054e2e3d09049f1ce4fd17..fd6ac99dae7e54b90f2b0e01430ac6db9410ccd4 100644
index 0e597394a3dd08f022614fc9777302fea581eb55..3cceefa0d6278924a19641a49bdf16bcdacb2233 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java
@@ -49,5 +49,25 @@ public class CraftWanderingTrader extends CraftAbstractVillager implements Wande
@ -1201,7 +1201,7 @@ index 4a6700d7d2f40cf516054e2e3d09049f1ce4fd17..fd6ac99dae7e54b90f2b0e01430ac6db
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
index 360c971f73a85e3841063dee9bc1da2ddfda4dae..46e3cc146a4b109c4baaf94f42d825646abade68 100644
index 794e4fe0a3fbd967f665b2707865c15491370c76..c284eb96a1e330078076cbe61f0f6e2ff4ed89bd 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
@@ -37,6 +37,13 @@ public class CraftWarden extends CraftMonster implements org.bukkit.entity.Warde
@ -1219,7 +1219,7 @@ index 360c971f73a85e3841063dee9bc1da2ddfda4dae..46e3cc146a4b109c4baaf94f42d82564
public void increaseAnger(Entity entity, int increase) {
Preconditions.checkArgument(entity != null, "Entity cannot be null");
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
index 83353863e0c58995d3699d5f812d38cae056f695..5a97c92f9b044d8ab7bd3346ceb464455a09046e 100644
index 1113533d281ed159bb735040fb1f913482debf3a..7a8ce6956db56061af93ba9761f5d1057a90bc49 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
@@ -67,4 +67,36 @@ public class CraftWither extends CraftMonster implements Wither, com.destroystok

Datei anzeigen

@ -32,7 +32,7 @@ index ee6bbe96503e9205349e9a5c411dc60dd952ec9e..e48706e2fefc39fcce3c65f629153fdc
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
index c0c917b928a648206ff6fd53f13fbe3bcb0cdda7..18712bfd46d3852bc1210c8f0dea7e9af3e55b4d 100644
index d4dfc7a0266086b9bf2c3966c6e149453d0583ba..1fb5760681bf0c745f9f3517489a83666a6d6805 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
@@ -32,8 +32,15 @@ public class CraftEnderSignal extends CraftEntity implements EnderSignal {
@ -46,7 +46,7 @@ index c0c917b928a648206ff6fd53f13fbe3bcb0cdda7..18712bfd46d3852bc1210c8f0dea7e9a
+ @Override
+ public void setTargetLocation(Location location, boolean update) {
+ // Paper end
Preconditions.checkArgument(getWorld().equals(location.getWorld()), "Cannot target EnderSignal across worlds");
Preconditions.checkArgument(this.getWorld().equals(location.getWorld()), "Cannot target EnderSignal across worlds");
- this.getHandle().signalTo(CraftLocation.toBlockPosition(location));
+ this.getHandle().signalTo(CraftLocation.toBlockPosition(location), update); // Paper
}

Datei anzeigen

@ -86,7 +86,7 @@ index e0b24c140e04a159a7b8aaef64ab94e19fc03dfd..2f26ef211322398e795cbdc75b565fc7
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
index cd04f4a5d87d423ec878dbbc522f3f7fbc325eb6..c81eb74f901a71419b919afc2fcd59a2937575da 100644
index 8c381e2745e7d5b63e72a60c5541b549f0d1b9bf..8b0e3a92e9893af954bc85adb2566502b65a0fa4 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
@@ -12,12 +12,17 @@ public class CraftSmithingTransformRecipe extends SmithingTransformRecipe implem
@ -112,12 +112,12 @@ index cd04f4a5d87d423ec878dbbc522f3f7fbc325eb6..c81eb74f901a71419b919afc2fcd59a2
public void addToCraftingManager() {
ItemStack result = this.getResult();
- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result))));
+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result), this.willCopyNbt()))); // Paper
- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result))));
+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true), CraftItemStack.asNMSCopy(result), this.willCopyNbt()))); // Paper
}
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
index f1206c4626034b70d462a8a81e7ed4f5dfd9f2f8..6207320f0e39a46e78a96b9c15cfdd29b5c36d6f 100644
index 87f20a4811d082f217638768417c1c0feb84f741..105c72a674e1a8ca4eb6003841f5d933d3a2c275 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
@@ -12,17 +12,22 @@ public class CraftSmithingTrimRecipe extends SmithingTrimRecipe implements Craft
@ -141,7 +141,7 @@ index f1206c4626034b70d462a8a81e7ed4f5dfd9f2f8..6207320f0e39a46e78a96b9c15cfdd29
@Override
public void addToCraftingManager() {
- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true))));
+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(toNMS(this.getTemplate(), true), toNMS(this.getBase(), true), toNMS(this.getAddition(), true), this.willCopyNbt()))); // Paper
- MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true))));
+ MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftNamespacedKey.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMS(this.getTemplate(), true), this.toNMS(this.getBase(), true), this.toNMS(this.getAddition(), true), this.willCopyNbt()))); // Paper
}
}

Datei anzeigen

@ -7,7 +7,7 @@ Subject: [PATCH] Add methods to find targets for lightning strikes
public net.minecraft.server.level.ServerLevel findLightningRod(Lnet/minecraft/core/BlockPos;)Ljava/util/Optional;
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 31d30840ec0acfd0d666163f77c8deb0efced922..a11bd2d9f5b2fb248cc322ea61886050fa2e73a9 100644
index eb4ad9cfd2291b01fd09be2114b56502149fe049..9fd3eca485fc71e5da142f8b6763e44691e3f41c 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -976,6 +976,11 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -31,7 +31,7 @@ index 31d30840ec0acfd0d666163f77c8deb0efced922..a11bd2d9f5b2fb248cc322ea61886050
blockposition1 = blockposition1.above(2);
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 286db6e246d48fb391c609f4e8a0222f1b294cfc..b137d0946b45b1f1a0170177b47fcece406a70dc 100644
index b69c0e32965b3ed5b3e41d7cdee6f07b572d2b7c..bf92ff17e5f084df565b682c8b026dc20f580912 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -699,6 +699,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
@ -57,4 +57,4 @@ index 286db6e246d48fb391c609f4e8a0222f1b294cfc..b137d0946b45b1f1a0170177b47fcece
+
@Override
public boolean generateTree(Location loc, TreeType type) {
return generateTree(loc, CraftWorld.rand, type);
return this.generateTree(loc, CraftWorld.rand, type);

Datei anzeigen

@ -8,7 +8,7 @@ Provides quick access to culprits running far more threads than
they should be
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
index 2f3e2a404f55f09ae4db8261e495275e31228034..6d66f83afbeb650b10669fd7eeb24a315951fa86 100644
index 365b7e7c665bec357fb76d1479bf17da6f603590..b17d40ced3f2d5859c61f1826ead72c5f07abe9f 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
@@ -25,7 +25,10 @@ class CraftAsyncTask extends CraftTask {
@ -20,7 +20,7 @@ index 2f3e2a404f55f09ae4db8261e495275e31228034..6d66f83afbeb650b10669fd7eeb24a31
+ final String nameBefore = thread.getName();
+ thread.setName(nameBefore + " - " + this.getOwner().getName());
+ try { synchronized (this.workers) { // Paper end - name threads according to running plugin
if (getPeriod() == CraftTask.CANCEL) {
if (this.getPeriod() == CraftTask.CANCEL) {
// Never continue running after cancelled.
// Checking this with the lock is important!
@@ -92,6 +95,7 @@ class CraftAsyncTask extends CraftTask {

Datei anzeigen

@ -26,7 +26,7 @@ index d156f7cc71050f13b2feca00c52ca6b64572b60e..e3557f4c8cee7c88b3e352cd246078da
if (state instanceof InventoryHolder) return (InventoryHolder) state;
return null;
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index 2ced6d0b3a839935dfb715f339a9501e9e519cf8..a78f0f94302a2a887b79dafdcbbbc3433c663092 100644
index f7f211b4f08a7f21a183078affd6f875aa30dd50..a8290624d8c5b19506f628d049984d2e59c4423c 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -13,7 +13,7 @@ import org.bukkit.persistence.PersistentDataContainer;
@ -50,7 +50,7 @@ index 2ced6d0b3a839935dfb715f339a9501e9e519cf8..a78f0f94302a2a887b79dafdcbbbc343
// Paper start
@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
index 17e1131c79ad140c0803a914621ce7924f0f2a6d..da4609caecc8183d02c301c7cedbca52ed39323f 100644
index c9ef19bdeeb130561659ff8161bf4e196cf4f53f..e44cd3b8eef25a3e7eedbe8ae597d74585ecd627 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
@@ -19,6 +19,7 @@ import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
@ -370,7 +370,7 @@ index 17e1131c79ad140c0803a914621ce7924f0f2a6d..da4609caecc8183d02c301c7cedbca52
}
private static BlockStateFactory<?> getFactory(Material material) {
return CraftBlockStates.FACTORIES.getOrDefault(material, DEFAULT_FACTORY);
return CraftBlockStates.FACTORIES.getOrDefault(material, CraftBlockStates.DEFAULT_FACTORY);
}
+ // Paper start

Datei anzeigen

@ -18,22 +18,22 @@ index 8d2870c780c4c253f6570c7ef73f6e7c2ccc46ad..0cbb5dd17c5b37ad90ce11a31b644707
}
}
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index e8ca93305e8baaee3e72932b630a2d6907444593..65f36454b08d7527aca0d3e667979fd58f3dcf6f 100644
index f1c0ff296b58aa020b00d6681ecf3cb4db09f561..88c543881c8e7453fffc08e1d5a3226505a8889e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2550,8 +2550,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Refresh the current entity metadata
entity.getEntityData().refresh(player);
entity.getEntityData().refresh(ServerGamePacketListenerImpl.this.player);
// SPIGOT-7136 - Allays
- if (entity instanceof Allay) {
- send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList())));
- ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList())));
+ if (entity instanceof Allay allay) { // Paper
+ send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta
player.containerMenu.sendAllDataToRemote();
+ ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta
ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote();
}
}
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f8738a28fb30c8fdb52ed3e6f8000144129c1f00..4dc9647b9c7206b1e98554d2db0f193b0dce0a94 100644
index 8959e7d6142025937f9fea3fb8dc25410564cec7..9e1a5eb4cc834305e8959bb1552202c3b64fc869 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3196,7 +3196,7 @@ public abstract class LivingEntity extends Entity implements Attackable {

Datei anzeigen

@ -2204,7 +2204,7 @@ index d0a8092bf57a29ab7c00ec0ddf52a9fdb2a33267..392406722b0a040c1d41fdc1154d75d3
private Direction(int id, int idOpposite, int idHorizontal, String name, Direction.AxisDirection direction, Direction.Axis axis, Vec3i vector) {
this.data3d = id;
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index c9eb785457b606d8f7c4fe3f824fd6d0a1d1070e..19f94236df83d73686aded9658a6469b3840c0c3 100644
index 3e591d1d7487da42d1f2a655a3535cfb538c3141..ca7ca9fcd00a70e5d48ce1028e2af4df9be3a9de 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -462,7 +462,7 @@ public class ServerPlayer extends Player {
@ -2226,7 +2226,7 @@ index c9eb785457b606d8f7c4fe3f824fd6d0a1d1070e..19f94236df83d73686aded9658a6469b
}
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 965dd34bd9a23a2fb17e5800af3b294b75b1146a..c493f883940819913f0cecb5e374fe94123df24c 100644
index 87fc2c057667eaf7303f3be474e436e0d4cf109a..f505977aaa48ab25b0a8a630f51e36551cb0fa79 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -892,7 +892,7 @@ public abstract class PlayerList {
@ -2239,7 +2239,7 @@ index 965dd34bd9a23a2fb17e5800af3b294b75b1146a..c493f883940819913f0cecb5e374fe94
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 4b135772f8346103c2e6e1473af95f0bfa9754ef..f91cbf742ee12f29cdebbd0a1481f0ea6db8d50b 100644
index 6474a847f918246b9352f48f8fc55dcf8f125838..b46a1ad08f48a7ed1fdd7775376677c7c4b011d5 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -1177,9 +1177,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
@ -2469,7 +2469,7 @@ index 4b135772f8346103c2e6e1473af95f0bfa9754ef..f91cbf742ee12f29cdebbd0a1481f0ea
}
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 25bf917fae922b34cc639148993bac39a50b4ce5..1c7702a5c888846f93f8f80d3b854a26c11499be 100644
index d972c59ec98e73d7ccd774e0f06c686251ffe4cf..9dcf28bdcb5770a191e62353a60c953731671283 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -353,7 +353,7 @@ public class ArmorStand extends LivingEntity {
@ -2629,12 +2629,12 @@ index a25497eec004add7408a63b1a0f09e3fa443b324..9f892de55ab03367daed4c30cc44c9dd
// Paper start
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 270ce3995229aa79074e981bb45e5480a5e924d4..627758e4f55283c5dcf23d494efb92bfa9f6b005 100644
index 5e7a53d1cae4c94a08fb89d7599d183de21cdfaa..330ce28f128ff2e5ca80f0938ac3ea7b195e9d82 100644
--- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -297,6 +297,10 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
this.chunkPacketBlockController = this.paperConfig().anticheat.antiXray.enabled ? new com.destroystokyo.paper.antixray.ChunkPacketBlockControllerAntiXray(this, executor) : com.destroystokyo.paper.antixray.ChunkPacketBlockController.NO_OPERATION_INSTANCE; // Paper - Anti-Xray
+ // Paper start - optimise collisions
+ this.minSection = io.papermc.paper.util.WorldUtil.getMinSection(this);

Datei anzeigen

@ -6,7 +6,7 @@ Subject: [PATCH] Fix ChunkSnapshot#isSectionEmpty(int) and optimize
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index 40f0fbd5492ccd9cbb622359c17a23041ede7fb6..2d36a132bdf67413b40d3b2dd97f52a741538a6f 100644
index b4b2f961d1e4f8b5b199052efefd96bcbfc3e68b..41981307bc7d5bfce99f902290201ddd377dfc22 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -291,13 +291,17 @@ public class CraftChunk implements Chunk {
@ -30,7 +30,7 @@ index 40f0fbd5492ccd9cbb622359c17a23041ede7fb6..2d36a132bdf67413b40d3b2dd97f52a7
+ // Paper end
LevelLightEngine lightengine = this.worldServer.getLightEngine();
DataLayer skyLightArray = lightengine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(x, chunk.getSectionYFromSectionIndex(i), z)); // SPIGOT-7498: Convert section index
DataLayer skyLightArray = lightengine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(this.x, chunk.getSectionYFromSectionIndex(i), this.z)); // SPIGOT-7498: Convert section index
@@ -316,8 +320,7 @@ public class CraftChunk implements Chunk {
}

Datei anzeigen

@ -5,11 +5,11 @@ Subject: [PATCH] Expose isFuel and canSmelt methods to FurnaceInventory
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java
index 05c29a788c96282fc18066ae253cf0b5be37e95c..e8e53d3c7d8b1bba7d77dc0c76d242eb177ad851 100644
index 29a8cd7667860c4598a556e6ef3af39c731683db..4ce9fd8e4e124600f48f34c6943512f39444cb9b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java
@@ -40,6 +40,20 @@ public class CraftInventoryFurnace extends CraftInventory implements FurnaceInve
setItem(0, stack);
this.setItem(0, stack);
}
+ // Paper start
@ -28,4 +28,4 @@ index 05c29a788c96282fc18066ae253cf0b5be37e95c..e8e53d3c7d8b1bba7d77dc0c76d242eb
+
@Override
public Furnace getHolder() {
return (Furnace) inventory.getOwner();
return (Furnace) this.inventory.getOwner();

Datei anzeigen

@ -70,11 +70,11 @@ index e84332b6f031e83283c1b6e90bb82a6053ff46d7..03d13c2425170a6513ea7442a4a12fc9
public void onObjectiveAdded(Objective objective) {
super.onObjectiveAdded(objective);
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index 4d65d1a0dd52aaeeeef8acf2b0023f27257f60a2..9c3520524cfb903da6a5401760394ec1b49a1825 100644
index f0b59dd4b7c3d857f7aa7c8263c760f7a46c6e34..c25ab8baf2eb66f85a60280e32a134c99f21b40c 100644
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -229,6 +229,21 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
scoreboard.board.addPlayerToTeam(entry, team);
scoreboard.board.addPlayerToTeam(entry, this.team);
}
+ // Paper start

Datei anzeigen

@ -122,11 +122,11 @@ index 0000000000000000000000000000000000000000..e3a5f1ec376319bdfda87fa27ae217bf
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 46944a7f368b8c1da29400a171876b903844377c..6254c962346c243a596ba3ace41a2d5218c86776 100644
index c2ea7afae83b1cbecff86c519b9c6983c083d2a1..0bca5e89bc8df486b44c0921e217d0546a490d4e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2015,6 +2015,13 @@ public final class CraftServer implements Server {
return console.console;
return this.console.console;
}
+ // Paper start
@ -161,7 +161,7 @@ index eaff8df6c8c12c64e005a68a02e2e35ed88f757c..1c638a4b1f2c841928d8b2a7ae43e4eb
if (this instanceof CraftBlockCommandSender) {
if (ServerCommandSender.blockPermInst == null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
index d6a4507f547893bf7f8318723b5f86cc779e47a2..c429e580ac791d181916aea2776c558d576d5b3a 100644
index 13804bb81a13d51d2e9e55d8a477369ba20fc301..3453eccf524d58c25f09b7a9772da703b85f4865 100644
--- a/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
+++ b/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
@@ -83,6 +83,11 @@ public final class VanillaCommandWrapper extends BukkitCommand {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add missing block data mins and maxes
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
index 83f86725c00f0e175cb46c7e27705ca777f413ba..24d16825c10edfed6d22e8e37ddb9fd804b716c4 100644
index 2230160d5e04e979467a56346600436c1e5dd70c..08436bfeba2f35fb11b16c4f71f76e13c0d44b1a 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
@@ -31,6 +31,12 @@ public final class CraftCandle extends org.bukkit.craftbukkit.block.data.CraftBl
@ -22,12 +22,12 @@ index 83f86725c00f0e175cb46c7e27705ca777f413ba..24d16825c10edfed6d22e8e37ddb9fd8
// org.bukkit.craftbukkit.block.data.CraftLightable
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCherryLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCherryLeaves.java
index bd1c7e41f0d21c69b1d1b4d4021d188502d7fee3..82da57f7d288da45062f7d61325caf0e47e6d4f6 100644
index af29ff861eb2c504ef31cc3236adf1e7f6b46049..bc32c5d4c7568ed4392e4bdb5872066846aa62b6 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCherryLeaves.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCherryLeaves.java
@@ -51,4 +51,16 @@ public final class CraftCherryLeaves extends org.bukkit.craftbukkit.block.data.C
public void setWaterlogged(boolean waterlogged) {
set(CraftCherryLeaves.WATERLOGGED, waterlogged);
this.set(CraftCherryLeaves.WATERLOGGED, waterlogged);
}
+
+ // Paper start
@ -43,7 +43,7 @@ index bd1c7e41f0d21c69b1d1b4d4021d188502d7fee3..82da57f7d288da45062f7d61325caf0e
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
index 780b6a29592571f4a730a858734256f69519cca7..ef97e77b25562a8aed35d68d42ced4825d43a29d 100644
index 7ce2e8b733bcd496dcfccb1ddfcb7c5c1b64052e..5ae27fc8f9d18bae949d335ea53e7e70917f0e80 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
@@ -31,4 +31,11 @@ public final class CraftComposter extends org.bukkit.craftbukkit.block.data.Craf
@ -59,7 +59,7 @@ index 780b6a29592571f4a730a858734256f69519cca7..ef97e77b25562a8aed35d68d42ced482
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
index f083cf727e7fd55f0749e85e3d034b5606121110..e40cda2f23d63e9d2029a8c8818103b6eeb6a925 100644
index 70d734fc71a4499bbf569b3908aa5fbbdf19e6a0..1af5fe48c5861077555e6bdeb6312859b7b37eb2 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
@@ -31,4 +31,11 @@ public final class CraftFluids extends org.bukkit.craftbukkit.block.data.CraftBl
@ -75,7 +75,7 @@ index f083cf727e7fd55f0749e85e3d034b5606121110..e40cda2f23d63e9d2029a8c8818103b6
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
index 0d08c81dd8582ef4f259f0e0db88e1b85d79f2a1..5b96ec73bf7bd4d90ce77cfe8ffec82580b20d2b 100644
index bf0d53f65f8a672c385b2e798b109a9662725f9e..c0e0cbceb0b5c36f4ac4672f217027a5898900a6 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
@@ -31,4 +31,11 @@ public final class CraftLayeredCauldron extends org.bukkit.craftbukkit.block.dat
@ -91,12 +91,12 @@ index 0d08c81dd8582ef4f259f0e0db88e1b85d79f2a1..5b96ec73bf7bd4d90ce77cfe8ffec825
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
index 2775bcc7d61806764a121d45621a8928f5e301e7..8cb0f9bf8a2e264e089a0278d5fb4b157844f6e4 100644
index 33d9a950ed678595fe2573e9f89a8d1716040503..ab336b400c1937ff86b681b27b1550e4b7f1ab79 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
@@ -51,4 +51,16 @@ public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBl
public void setWaterlogged(boolean waterlogged) {
set(CraftLeaves.WATERLOGGED, waterlogged);
this.set(CraftLeaves.WATERLOGGED, waterlogged);
}
+
+ // Paper start
@ -112,7 +112,7 @@ index 2775bcc7d61806764a121d45621a8928f5e301e7..8cb0f9bf8a2e264e089a0278d5fb4b15
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
index de882af105fae1166aced908cfe45b826a07f418..0d430382a05dfc0802a2569816c5ec876a053f16 100644
index 49f314b1447212a1a5a7623d2302b5960a44ce6e..8c936a95effa84ba0337d2aaf880cc561591fb33 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
@@ -32,6 +32,13 @@ public final class CraftLight extends org.bukkit.craftbukkit.block.data.CraftBlo
@ -130,12 +130,12 @@ index de882af105fae1166aced908cfe45b826a07f418..0d430382a05dfc0802a2569816c5ec87
private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.LightBlock.class, "waterlogged");
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
index f070c35833b33ad2d7cfa629d8702a95e9bc6d04..5a021dc1931d35cbe235ab399aa98f3c7e93ded3 100644
index 7a1f2fd2f7f8f1b46352fe2c4d0cdf23a88020fd..8b621aaeadcf2cc6e2ccdbab92f4ae2b89a6ca08 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
@@ -51,4 +51,16 @@ public final class CraftMangroveLeaves extends org.bukkit.craftbukkit.block.data
public void setWaterlogged(boolean waterlogged) {
set(CraftMangroveLeaves.WATERLOGGED, waterlogged);
this.set(CraftMangroveLeaves.WATERLOGGED, waterlogged);
}
+
+ // Paper start
@ -151,7 +151,7 @@ index f070c35833b33ad2d7cfa629d8702a95e9bc6d04..5a021dc1931d35cbe235ab399aa98f3c
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java
index c6bd91bdf6bf64701ffc69619174cc3b43b72d88..c6289306f0f933b67ff1f6db63ef976df7aa5438 100644
index 5003386cb1ce9977e517a26c3ec8e80e5fb4fb15..ffce9e3ce33fc5581f46543105f5dd04fe56f8e2 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPowderSnowCauldron.java
@@ -31,4 +31,11 @@ public final class CraftPowderSnowCauldron extends org.bukkit.craftbukkit.block.

Datei anzeigen

@ -7,7 +7,7 @@ Some parts of legacy conversion will need the overworld
to get the legacy structure data storage
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7d944606f7e136aa60a0ea376ef325887bd4e6a8..e7bd891260ad4c95c6161542e6d1412c6e9daea0 100644
index ebf31af53f26d33a745badbfc6fa4e7f84aea87d..9f56553b416df71ec60a3327a58d843be95dded8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -589,9 +589,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@ -15,7 +15,7 @@ index 7d944606f7e136aa60a0ea376ef325887bd4e6a8..e7bd891260ad4c95c6161542e6d1412c
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
+ this.addLevel(world); // Paper - move up
this.initWorld(world, worlddata, worldData, worldoptions);
this.initWorld(world, worlddata, this.worldData, worldoptions);
- this.addLevel(world);
+ // Paper - move up
@ -23,7 +23,7 @@ index 7d944606f7e136aa60a0ea376ef325887bd4e6a8..e7bd891260ad4c95c6161542e6d1412c
if (worlddata.getCustomBossEvents() != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b29ae6ae2a869cba148f5e3be76962182934a577..91bdf2bc934d98513fd6b9b83f8e422763551e91 100644
index 2fd1d5c15a5231b0f889832ff1c57156ef46816d..06f8b950bad67e890086db46d3cb9ec9ecbb0a2c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1253,10 +1253,11 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -24,14 +24,14 @@ index c0186224fd64d70770a0e16752d17c0870121d8f..30a893f7f63961b752e043b81dda20d9
if (Snowball.class.isAssignableFrom(clazz)) {
entity = new net.minecraft.world.entity.projectile.Snowball(world, x, y, z);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 056ced9d7b79b96ed33fe5656609863d9cb76b35..3238c3f152ed09eab935a62e044c48ca21d1cf1c 100644
index b60765a2176d7a290d2c9b09ba101d61ac572b21..b76d59ae107eec1ea52edfb2d08b1a1da7931593 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1397,7 +1397,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
Preconditions.checkArgument(material != null, "Material cannot be null");
Preconditions.checkArgument(material.isBlock(), "Material.%s must be a block", material);
- FallingBlockEntity entity = FallingBlockEntity.fall(world, BlockPos.containing(location.getX(), location.getY(), location.getZ()), CraftMagicNumbers.getBlock(material).defaultBlockState(), SpawnReason.CUSTOM);
- FallingBlockEntity entity = FallingBlockEntity.fall(this.world, BlockPos.containing(location.getX(), location.getY(), location.getZ()), CraftMagicNumbers.getBlock(material).defaultBlockState(), SpawnReason.CUSTOM);
+ // Paper start - restore API behavior for spawning falling blocks
+ FallingBlockEntity entity = new FallingBlockEntity(this.world, location.getX(), location.getY(), location.getZ(), CraftMagicNumbers.getBlock(material).defaultBlockState()); // Paper
+ entity.time = 1;
@ -45,7 +45,7 @@ index 056ced9d7b79b96ed33fe5656609863d9cb76b35..3238c3f152ed09eab935a62e044c48ca
Preconditions.checkArgument(location != null, "Location cannot be null");
Preconditions.checkArgument(data != null, "BlockData cannot be null");
- FallingBlockEntity entity = FallingBlockEntity.fall(world, BlockPos.containing(location.getX(), location.getY(), location.getZ()), ((CraftBlockData) data).getState(), SpawnReason.CUSTOM);
- FallingBlockEntity entity = FallingBlockEntity.fall(this.world, BlockPos.containing(location.getX(), location.getY(), location.getZ()), ((CraftBlockData) data).getState(), SpawnReason.CUSTOM);
+ // Paper start - restore API behavior for spawning falling blocks
+ FallingBlockEntity entity = new FallingBlockEntity(this.world, location.getX(), location.getY(), location.getZ(), ((CraftBlockData) data).getState());
+ entity.time = 1;

Datei anzeigen

@ -115,7 +115,7 @@ index 91c2d0b40d3fca86938cd454e1415a4eea3df7c7..2c376687349825833e6d9a5ca92ce6af
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
index 5056ec1ad51be9209591d34d32d256c350feed63..96a20efc60efef4485eca9ebffed92dc195ed357 100644
index 762c395e45a681a11f3fe9d10e7f0ba310786e80..6d2fe30742f8b41d53dd2cbff120fcc042ea0e0c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
@@ -58,20 +58,7 @@ public class CraftArrow extends AbstractProjectile implements AbstractArrow {
@ -169,7 +169,7 @@ index 5056ec1ad51be9209591d34d32d256c350feed63..96a20efc60efef4485eca9ebffed92dc
public void setNoPhysics(boolean noPhysics) {
this.getHandle().setNoPhysics(noPhysics);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
index 013de344fc9a4b21952fc6177243905982d88486..e04500dcdc5b72cca7ac81b5d12e76822db9c8c5 100644
index 73cb7aa01af3eed71b05b1a539f082b26dcd8d60..2783e218d5e5c24787429237974e196761f4d02b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
@@ -32,20 +32,7 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
@ -195,7 +195,7 @@ index 013de344fc9a4b21952fc6177243905982d88486..e04500dcdc5b72cca7ac81b5d12e7682
@Override
public Vector getDirection() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
index 7417e3d51497fe7e62e108d83ee4b70942972144..68c5af9b67a2834ee6e2f80ceefa19c3a982b8ed 100644
index c9e15a9d82dee935293b2e7e233f5b9b2d822448..13b09465952dca2e95647ddb9753a7fe2db51720 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
@@ -15,24 +15,26 @@ import org.bukkit.inventory.meta.FireworkMeta;
@ -302,7 +302,7 @@ index 7417e3d51497fe7e62e108d83ee4b70942972144..68c5af9b67a2834ee6e2f80ceefa19c3
+ // Paper end - Expose firework item directly + manually setting flight
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
index b32a8d0a942d1a3c4e4b047cda4aa32d03b09875..9de72665c947bb00547cdd7c41a890711f5b2afc 100644
index 6e2f91423371ead9890095cf4b1e2299c4dcba28..ad1aeea80877f2cdb9e8ad9c5b46f95dd76b3335 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
@@ -196,4 +196,15 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
@ -341,7 +341,7 @@ index 70cbc6c668c60e9d608ca7013b72f9b916c05c2d..47633f05b4fab1dcabc2117e7645fe6d
+ // Paper - moved to AbstractProjectile
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
index 9a68f4ef68870d0baab5b6464d6c0a82a8fd105d..fd5beb956f643532e08613366ebd380d7999e79f 100644
index 696fdfa723aa896a67946f862d7c6890f7f7ab17..4f1fa7dec78970bdfc184d3c1f1632dc9d75a574 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
@@ -10,20 +10,7 @@ public abstract class CraftProjectile extends AbstractProjectile implements Proj
@ -367,7 +367,7 @@ index 9a68f4ef68870d0baab5b6464d6c0a82a8fd105d..fd5beb956f643532e08613366ebd380d
@Override
public net.minecraft.world.entity.projectile.Projectile getHandle() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
index 929a429428493093837c8a7a065896873d533f2d..807a498c2a80a5bd5eedf5322c699adebf25872f 100644
index d685d09cae5f862c0004f148298c800736d2139e..636c4481e3afdf20197e502cf221f5d34d18f101 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
@@ -12,20 +12,7 @@ public class CraftShulkerBullet extends AbstractProjectile implements ShulkerBul
@ -434,7 +434,7 @@ index 929a429428493093837c8a7a065896873d533f2d..807a498c2a80a5bd5eedf5322c699ade
public String toString() {
return "CraftShulkerBullet";
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
index 76e64ca4eb60074db23635cb260fc6b56319a5ac..f1a3ed6670fcb4e40000ed5c4f7042a4ca99175c 100644
index 269af20a6d0d100909a0aea0bdba307ea0658f3e..d5f1681a476c8fe2ae128a84910f4bf04063b75a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
@@ -35,11 +35,31 @@ public class CraftThrownPotion extends CraftThrowableProjectile implements Throw
@ -469,7 +469,7 @@ index 76e64ca4eb60074db23635cb260fc6b56319a5ac..f1a3ed6670fcb4e40000ed5c4f7042a4
+ // Paper end
@Override
public net.minecraft.world.entity.projectile.ThrownPotion getHandle() {
return (net.minecraft.world.entity.projectile.ThrownPotion) entity;
return (net.minecraft.world.entity.projectile.ThrownPotion) this.entity;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java
index c628594b981f276acae7b9337100d811f919631b..c8b65210d2416b5a293cb4bcc1b71f56ed365cd7 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java
@ -491,7 +491,7 @@ index c628594b981f276acae7b9337100d811f919631b..c8b65210d2416b5a293cb4bcc1b71f56
// Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index cee7a93cd516ed8f483fd29dfcd6a54f4c37e348..28e6933e5b02d1d2f983968692bffa2b9e572051 100644
index 221a2ccc4bf840aa301931f26c1198b36ec317fe..5f8f601f5711f4e7aa3f3a6ca047fd75264d0d04 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -300,12 +300,20 @@ public final class CraftItemStack extends ItemStack {

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 34934e9b1022facc9ca8a2770a4d8632c08f97a0..d77f5be56ffa1bee3d2b33ffcc5e492ce6b944fa 100644
index 2a4b28e36858397b8be69c4375e205cffa91d35c..1665d99aa45f708939dfc21d17a7b02182c7aefb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1248,7 +1248,7 @@ public final class CraftServer implements Server {
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
ServerLevel internal = (ServerLevel) new ServerLevel(this.console, this.console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(11),
worlddata.isDebugWorld(), j, creator.environment() == Environment.NORMAL ? list : ImmutableList.of(), true, this.console.overworld().getRandomSequences(), creator.environment(), generator, biomeProvider);
- internal.keepSpawnInMemory = creator.keepSpawnInMemory();
+ // internal.keepSpawnInMemory = creator.keepSpawnInMemory(); // Paper - replace

Datei anzeigen

@ -23,7 +23,7 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147
}
});
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index b0d8d28aa4a5cd95671a90e3f9981c532726b8ca..b59ecc3571234a6168f9ba235e5acbfa733c0512 100644
index 38931091d573059d7e265fd86a704b96f48bdc48..8f4d7e1878f34d56de7447ec39c794e1246008bc 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -2552,6 +2552,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
@ -35,13 +35,13 @@ index b0d8d28aa4a5cd95671a90e3f9981c532726b8ca..b59ecc3571234a6168f9ba235e5acbfa
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index 50ddcd7ee9c3ffe7549361f942df01b8ef078932..2f9e5a1adf9d67ffe18d95f2822ca3d2288fb27a 100644
index f76b3f410fcc756bb34a5fac21b1d7088ac7a9ce..59103744ac6beeb12719fdefcda54eeff498229e 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -213,8 +213,14 @@ public class ActivationRange
// Paper start
java.util.List<Entity> entities = world.getEntities((Entity)null, maxBB, null);
java.util.List<Entity> entities = world.getEntities((Entity)null, ActivationRange.maxBB, null);
+ boolean tickMarkers = world.paperConfig().entities.markers.tick; // Paper - configurable marker ticking
for (int i = 0; i < entities.size(); i++) {
Entity entity = entities.get(i);

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] More Teleport API
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b1be147250d3850930e103a2fa2823a6c992f0dd..675467a6552cfc1f951e7c81a9be0d423cae8c44 100644
index 7e388fc82cb4f7a71b36a204c5af827509ab60f3..331d8c69dc4464ff6b44b4b37ecf426ff3514fc3 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1605,11 +1605,17 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -29,7 +29,7 @@ index b1be147250d3850930e103a2fa2823a6c992f0dd..675467a6552cfc1f951e7c81a9be0d42
d0 = to.getX();
d1 = to.getY();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index c924ee182c150feca61deab9b8cc54806a23c49a..6fdde2f766b91833dc2318526f84e96cb26233b4 100644
index b9c69703bb41f7d04f95bef27eb0614c5931c326..706eeebe3ebbecd431c42140e7f351d5f7faf032 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -566,15 +566,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -72,7 +72,7 @@ index c924ee182c150feca61deab9b8cc54806a23c49a..6fdde2f766b91833dc2318526f84e96c
// Let the server handle cross world teleports
if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 86f9950c6188f407b547cb19330444c5e29f5838..0fc4a90383a5b332cad58ec55e30dc363aed16ca 100644
index ed7d6c2303873b39ecabfe78d0950cf698f6f61c..8bdfbe71e2718e0e24b1de048c8e48927fae1e3a 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1212,13 +1212,101 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -211,4 +211,4 @@ index 86f9950c6188f407b547cb19330444c5e29f5838..0fc4a90383a5b332cad58ec55e30dc36
+ entity.connection.internalTeleport(to.getX(), to.getY(), to.getZ(), to.getYaw(), to.getPitch(), relativeArguments); // Paper - Teleport API
} else {
// The respawn reason should never be used if the passed location is non null.
server.getHandle().respawn(entity, toWorld, true, to, !toWorld.paperConfig().environment.disableTeleportationSuffocationCheck, null); // Paper
this.server.getHandle().respawn(entity, toWorld, true, to, !toWorld.paperConfig().environment.disableTeleportationSuffocationCheck, null); // Paper

Datei anzeigen

@ -95,11 +95,11 @@ index 0000000000000000000000000000000000000000..a34381122de53123169927e181df6628
+ }
+}
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 2d06a8f85c5e29688aa0fd4726fd576721535384..dbccbcb9b44e4efacdf53c2d161115cc20b36cff 100644
index 321675996b83fbe34d7e0d690eafe170d7466e17..2b5d82fbf4e7ec32d0c53dd3e8207b1dba708bbd 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.STARTUP);
this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.STARTUP);
// CraftBukkit end
+ // Paper start
@ -123,7 +123,7 @@ index 2d06a8f85c5e29688aa0fd4726fd576721535384..dbccbcb9b44e4efacdf53c2d161115cc
DedicatedServer.LOGGER.warn("While this makes the game possible to play without internet access, it also opens up the ability for hackers to connect with any username they choose.");
}
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index f7ad9f51d4fb45d41c718a97c1fad72504d0c0ad..78810048fde7fd6299cdc99634ba646755e0c41c 100644
index 5ff49a0f2f42b63d606c7d9205c0e63fe39e163f..aac84898d2563bfb45c7d0884d65be2346d2911e 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -62,6 +62,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener,
@ -215,7 +215,7 @@ index f7ad9f51d4fb45d41c718a97c1fad72504d0c0ad..78810048fde7fd6299cdc99634ba6467
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 7441b15d074de921d3dc0f594e491d036b1f6064..34bde8263dd0f3eeae81d896e2d328d276353e7a 100644
index a148d03d746d4580777e1e193c07dad922a080e0..2384ad530ce9c8329e378e7488701df7c2f389fb 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -805,7 +805,7 @@ public final class CraftServer implements Server {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add a consumer parameter to ProjectileSource#launchProjectile
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 26054a3b4e2609cb68751d6e37bce22df94c46b8..8c8431f40e9415b32e43acea4cd91a20d82d8d08 100644
index 9d9b27f21c1d62dac7dd63e8af44601691e656be..f19ebe71b46d31772b486cae5d96535f28c86824 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -509,8 +509,15 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
@ -24,7 +24,7 @@ index 26054a3b4e2609cb68751d6e37bce22df94c46b8..8c8431f40e9415b32e43acea4cd91a20
+ // Paper end - launchProjectile consumer
Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
net.minecraft.world.level.Level world = ((CraftWorld) getWorld()).getHandle();
net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle();
@@ -593,6 +600,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
if (velocity != null) {
((T) launch.getBukkitEntity()).setVelocity(velocity);

Datei anzeigen

@ -5,12 +5,12 @@ Subject: [PATCH] Allow changing bed's 'occupied' property
diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java
index c892c0e37bd4f9b208147e2df16fc9ed024eacf7..71df14b932306aa4c8ea6d4883f6ba053955ec28 100644
index f636a6b69143e88fc3bebd11620083ab6a419d48..e6ff5225fe8253cbaa79ed15b4c12f3735fc7021 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java
@@ -22,4 +22,11 @@ public abstract class CraftBed extends CraftBlockData implements Bed {
public boolean isOccupied() {
return get(CraftBed.OCCUPIED);
return this.get(CraftBed.OCCUPIED);
}
+
+ // Paper start
@ -21,12 +21,12 @@ index c892c0e37bd4f9b208147e2df16fc9ed024eacf7..71df14b932306aa4c8ea6d4883f6ba05
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java
index 66a183fa0af6978dd220a3dde27255ad45e47137..108fbb8ab9142a6f779651f3562a81c6cfaa3c30 100644
index 2ccf3fbe3f991b7a014cff3bcd424e6a81bc310a..e5450d3511389bf3bd6461fb6ec65ea82e4ae9f0 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java
@@ -51,4 +51,11 @@ public final class CraftBed extends org.bukkit.craftbukkit.block.data.CraftBlock
public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
return getValues(CraftBed.FACING, org.bukkit.block.BlockFace.class);
return this.getValues(CraftBed.FACING, org.bukkit.block.BlockFace.class);
}
+
+ // Paper start

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add fire-tick-delay option
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
index 7f88b910dfd0303f69b4fd1c7918a401c1f369f2..4002e0fffb60556e7af1aeff71b4be244f02b0f5 100644
index a3021fbc570ae47eb6b0d4a89388c8ed893aced7..2c7847aebabe14da44b9a42f5ecae77858fb9dd3 100644
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
@@ -165,7 +165,7 @@ public class FireBlock extends BaseFireBlock {
@ -16,7 +16,7 @@ index 7f88b910dfd0303f69b4fd1c7918a401c1f369f2..4002e0fffb60556e7af1aeff71b4be24
+ world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world)); // Paper
if (world.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
if (!state.canSurvive(world, pos)) {
fireExtinguished(world, pos); // CraftBukkit - invalid place location
this.fireExtinguished(world, pos); // CraftBukkit - invalid place location
@@ -366,11 +366,13 @@ public class FireBlock extends BaseFireBlock {
public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext itemActionContext) {
super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, itemActionContext);

Datei anzeigen

@ -82,20 +82,20 @@ index d088479d160dbd2fc90b48a30553be141db8eef2..15add3f4dfd718ec09bb1db4f2222346
public static class DataItem<T> {
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index db5368bf4970c63f21ef1e5fc7428787c90de4dd..9372f2363b13dca1b5ae77a509daaec7fbbf5e4f 100644
index bfa2e9919275a1eb5d83403c5ed88eee245e3194..c4425cd7357049e74e825b824e30b9691ad93196 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2648,7 +2648,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
// Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
- send(new ClientboundAddEntityPacket(entity));
- ServerGamePacketListenerImpl.this.send(new ClientboundAddEntityPacket(entity));
+ entity.getEntityData().resendPossiblyDesyncedEntity(player); // Paper - The entire mob gets deleted, so resend it.
player.containerMenu.sendAllDataToRemote();
ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote();
}
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 255f7ab2560e493770bd99a8404f3c122cfca2ad..a56995333931685eecf6ea90ff1a89d38b4a2336 100644
index ce04374971e679b4883d8a6ebba4c6832b606a65..19a01b59ce3e75a0ed48e8fc7678063576d9a2b0 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -357,7 +357,7 @@ public abstract class PlayerList {
@ -122,7 +122,7 @@ index 37596c7b65f280be00e8e59ae18bd1aceae21080..eca18540aeb0b0d4098477d73b14c78a
}
entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 8733255559e63d8709d2502e58f16decdf1714ae..6759dad436d9e82f9c959e2c183e6e95c37abdcb 100644
index 53bda7a59a3abf6f99a044df5f2c44bedf1af501..dc1cc4db2195d4f346bdc5f39e2e14dba454f13d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -1258,7 +1258,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -139,7 +139,7 @@ index 8733255559e63d8709d2502e58f16decdf1714ae..6759dad436d9e82f9c959e2c183e6e95
private static PermissibleBase getPermissibleBase() {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
index 4dbe8af49fcb4d2c2f517083c013d83f64225b4b..58489a6a34e66cd6fc0d0e28141a3ebc32ac0e05 100644
index 0801bcdee8fcff0d388d302387e4f1d587e0a283..2fcd9b836d42e3549a3b6b921c57a4c103146dff 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
@@ -39,9 +39,11 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 647069b24b16aaa5f9b77a32932d8b072343331c..cb12c626db3bdc021895cbfb3fab749a0ef5079f 100644
index 0cd46c761253c197e94b16a78f15110b35b12c12..a6630c0aefb31b4b07b62219e27ce724325d291c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2112,7 +2112,9 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
@ -16,5 +16,5 @@ index 647069b24b16aaa5f9b77a32932d8b072343331c..cb12c626db3bdc021895cbfb3fab749a
ServerGamePacketListenerImpl.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + command);
+ } // Paper
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(getCraftPlayer(), command, new LazyPlayerSet(server));
PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server));
this.cserver.getPluginManager().callEvent(event);

Datei anzeigen

@ -17,7 +17,7 @@ index e0e80f94a005fb21cce76059f66cf4c7ee0f2bfc..c73b57ffd622ccc2e6c570cf874ed118
entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat
}
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
index e3e06dc0e8dad4a478f3c8a0178cf6feb64b26cb..38ccf1a75b37e7745426706c2ccbe86506b93f51 100644
index 2aab5ba9e90f09e6d679ee0d0d5d5e52c44b677f..a8760f015b9ee3ee408c3b9220266eb76b313ba0 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
@@ -31,6 +31,12 @@ public final class CapturedBlockState extends CraftBlockState {
@ -31,7 +31,7 @@ index e3e06dc0e8dad4a478f3c8a0178cf6feb64b26cb..38ccf1a75b37e7745426706c2ccbe865
+ public void checkTreeBlockHack() {
+ // Paper end
// SPIGOT-5537: Horrible hack to manually add bees given World.captureTreeGeneration does not support tiles
if (this.treeBlock && getType() == Material.BEE_NEST) {
if (this.treeBlock && this.getType() == Material.BEE_NEST) {
WorldGenLevel generatoraccessseed = this.world.getHandle();
@@ -53,7 +59,7 @@ public final class CapturedBlockState extends CraftBlockState {
// End copied block

Datei anzeigen

@ -5,15 +5,15 @@ Subject: [PATCH] Ignore inline definitions of trim material & pattern
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
index 742d4039392403a75882f83bb2f64453898adf76..c92981aedebe934cefa1c96a0328fb91fe17acbc 100644
index 24b87a1566b48be1367970a9ba887a6b3a785bb9..f393e0844889c967d9e83d9a1e73c134fcb6e33b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
@@ -67,7 +67,7 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
if (tag.contains(TRIM.NBT)) {
CompoundTag trimCompound = tag.getCompound(TRIM.NBT);
if (tag.contains(CraftMetaArmor.TRIM.NBT)) {
CompoundTag trimCompound = tag.getCompound(CraftMetaArmor.TRIM.NBT);
- if (trimCompound.contains(TRIM_MATERIAL.NBT) && trimCompound.contains(TRIM_PATTERN.NBT)) {
+ if (trimCompound.contains(TRIM_MATERIAL.NBT, net.minecraft.nbt.Tag.TAG_STRING) && trimCompound.contains(TRIM_PATTERN.NBT, net.minecraft.nbt.Tag.TAG_STRING)) { // Paper - for now, ignore inline definitions of trim material & pattern
TrimMaterial trimMaterial = Registry.TRIM_MATERIAL.get(NamespacedKey.fromString(trimCompound.getString(TRIM_MATERIAL.NBT)));
TrimPattern trimPattern = Registry.TRIM_PATTERN.get(NamespacedKey.fromString(trimCompound.getString(TRIM_PATTERN.NBT)));
- if (trimCompound.contains(CraftMetaArmor.TRIM_MATERIAL.NBT) && trimCompound.contains(CraftMetaArmor.TRIM_PATTERN.NBT)) {
+ if (trimCompound.contains(CraftMetaArmor.TRIM_MATERIAL.NBT, net.minecraft.nbt.Tag.TAG_STRING) && trimCompound.contains(CraftMetaArmor.TRIM_PATTERN.NBT, net.minecraft.nbt.Tag.TAG_STRING)) { // Paper - for now, ignore inline definitions of trim material & pattern
TrimMaterial trimMaterial = Registry.TRIM_MATERIAL.get(NamespacedKey.fromString(trimCompound.getString(CraftMetaArmor.TRIM_MATERIAL.NBT)));
TrimPattern trimPattern = Registry.TRIM_PATTERN.get(NamespacedKey.fromString(trimCompound.getString(CraftMetaArmor.TRIM_PATTERN.NBT)));

Datei anzeigen

@ -5,16 +5,16 @@ Subject: [PATCH] Don't enforce icanhasbukkit default if alias block exists
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 34bde8263dd0f3eeae81d896e2d328d276353e7a..b159ada5e593ee4e8e0059eb5cb554c723231e88 100644
index 2384ad530ce9c8329e378e7488701df7c2f389fb..a2a2260f52032c50d57c2031b41d05f052394866 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -359,7 +359,11 @@ public final class CraftServer implements Server {
}
this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
this.commandsConfiguration.options().copyDefaults(true);
- this.commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8)));
- this.commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8)));
+ // Paper start - don't enforce icanhasbukkit default if alias block exists
+ final YamlConfiguration commandsDefaults = YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8));
+ final YamlConfiguration commandsDefaults = YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8));
+ if (this.commandsConfiguration.contains("aliases")) commandsDefaults.set("aliases", null);
+ this.commandsConfiguration.setDefaults(commandsDefaults);
+ // Paper stop - dont enforce icanhasbukkit default if alias block exists

Datei anzeigen

@ -6,14 +6,14 @@ Subject: [PATCH] Fix sniffer removeExploredLocation
Add support to remove explored location in different world
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
index 1c8b67de03aefe91bf80782fb14fb629a458ecc3..01328768ef2baba2aa7fea7e10b0eb9783497f4b 100644
index 60251107371ef876d29fc9aa578835250715c4bc..555337018fe218ac5a296a5e6a1d82720fee05e1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
@@ -34,12 +34,13 @@ public class CraftSniffer extends CraftAnimals implements Sniffer {
@Override
public void removeExploredLocation(Location location) {
Preconditions.checkArgument(location != null, "location cannot be null");
- if (location.getWorld() != getWorld()) {
- if (location.getWorld() != this.getWorld()) {
- return;
- }

Datei anzeigen

@ -6,15 +6,15 @@ Subject: [PATCH] Suppress Item Meta Validation Checks
In some cases ItemMeta could validate tags in an ItemStack. This suppresses those warnings and ignores reading the value.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
index c92981aedebe934cefa1c96a0328fb91fe17acbc..80138632e5216c71fe7060a59dbb2915e740a3c8 100644
index f393e0844889c967d9e83d9a1e73c134fcb6e33b..f8996ee643a46db301577f6c523f24e973e8f309 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
@@ -68,13 +68,33 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
CompoundTag trimCompound = tag.getCompound(TRIM.NBT);
CompoundTag trimCompound = tag.getCompound(CraftMetaArmor.TRIM.NBT);
if (trimCompound.contains(TRIM_MATERIAL.NBT, net.minecraft.nbt.Tag.TAG_STRING) && trimCompound.contains(TRIM_PATTERN.NBT, net.minecraft.nbt.Tag.TAG_STRING)) { // Paper - for now, ignore inline definitions of trim material & pattern
- TrimMaterial trimMaterial = Registry.TRIM_MATERIAL.get(NamespacedKey.fromString(trimCompound.getString(TRIM_MATERIAL.NBT)));
- TrimPattern trimPattern = Registry.TRIM_PATTERN.get(NamespacedKey.fromString(trimCompound.getString(TRIM_PATTERN.NBT)));
if (trimCompound.contains(CraftMetaArmor.TRIM_MATERIAL.NBT, net.minecraft.nbt.Tag.TAG_STRING) && trimCompound.contains(CraftMetaArmor.TRIM_PATTERN.NBT, net.minecraft.nbt.Tag.TAG_STRING)) { // Paper - for now, ignore inline definitions of trim material & pattern
- TrimMaterial trimMaterial = Registry.TRIM_MATERIAL.get(NamespacedKey.fromString(trimCompound.getString(CraftMetaArmor.TRIM_MATERIAL.NBT)));
- TrimPattern trimPattern = Registry.TRIM_PATTERN.get(NamespacedKey.fromString(trimCompound.getString(CraftMetaArmor.TRIM_PATTERN.NBT)));
+ // Paper start
+ TrimMaterial trimMaterial = getRegistry(Registry.TRIM_MATERIAL, trimCompound.getString(TRIM_MATERIAL.NBT));
+ TrimPattern trimPattern = getRegistry(Registry.TRIM_PATTERN, trimCompound.getString(TRIM_PATTERN.NBT));
@ -47,7 +47,7 @@ index c92981aedebe934cefa1c96a0328fb91fe17acbc..80138632e5216c71fe7060a59dbb2915
CraftMetaArmor(Map<String, Object> map) {
super(map);
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index f79ea76c0127b7b57ab0511afbed626a3b42fd05..3cea851c3f5389a5dd92601dfbef2975b2a5948b 100644
index f6d2785b05b4c0a4393be706a90d7cc4388399bf..2510297df2f6ca80672c1dcbd35c0b1e0ce18ccb 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -489,7 +489,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
@ -67,7 +67,7 @@ index f79ea76c0127b7b57ab0511afbed626a3b42fd05..3cea851c3f5389a5dd92601dfbef2975
continue;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 954768f5f04a583e343b826e832e76cba189af95..c6340b7259242f44a9a681bff2ec46cc633eada3 100644
index 6398f31a29fdab0f6539139a09336b10d6d11d95..7e85f896dc243b2811ea87df759dffa9b6f495b3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -71,11 +71,13 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
@ -75,12 +75,12 @@ index 954768f5f04a583e343b826e832e76cba189af95..c6340b7259242f44a9a681bff2ec46cc
super(tag);
+ try { // Paper - Ignore invalid game profiles
if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
this.setProfile(NbtUtils.readGameProfile(tag.getCompound(SKULL_OWNER.NBT)));
} else if (tag.contains(SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_STRING) && !tag.getString(SKULL_OWNER.NBT).isEmpty()) {
this.setProfile(new GameProfile(Util.NIL_UUID, tag.getString(SKULL_OWNER.NBT)));
if (tag.contains(CraftMetaSkull.SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
this.setProfile(NbtUtils.readGameProfile(tag.getCompound(CraftMetaSkull.SKULL_OWNER.NBT)));
} else if (tag.contains(CraftMetaSkull.SKULL_OWNER.NBT, CraftMagicNumbers.NBT.TAG_STRING) && !tag.getString(CraftMetaSkull.SKULL_OWNER.NBT).isEmpty()) {
this.setProfile(new GameProfile(Util.NIL_UUID, tag.getString(CraftMetaSkull.SKULL_OWNER.NBT)));
}
+ } catch (Exception ignored) {} // Paper
if (tag.contains(BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
CompoundTag nbtTagCompound = tag.getCompound(BLOCK_ENTITY_TAG.NBT).copy();
if (tag.contains(CraftMetaSkull.BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
CompoundTag nbtTagCompound = tag.getCompound(CraftMetaSkull.BLOCK_ENTITY_TAG.NBT).copy();

Datei anzeigen

@ -5,7 +5,7 @@ Subject: [PATCH] Fix BanList API
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
index 3762230eeee47114f683dfa428a8e55cf2f42b48..fda82c7c3b7e28b6d3ed4b28c956a069a975c22c 100644
index 9e01ef76bc6d18ab622fbec729f8bde3aa8d3e41..f9b2d773449fa5d332e0c37454ba6ea731982e85 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
@@ -114,17 +114,17 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
@ -208,7 +208,7 @@ index 172202accf4448a933fcf1ff820316c7910dd7f7..50ee7656580d386db473c054f5c5ec57
return null;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 77ea396950ed23ab5bf953b451b12d5b1eb4c5ec..0ab1bbb44bb483a73dbb4763d785d74a5c6ced3a 100644
index 2981475368094b7749cfec2e5a99ec0947248eee..1be276757f241d17f2d24f35df15c5d9cdaaa10c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1635,23 +1635,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -234,9 +234,9 @@ index 77ea396950ed23ab5bf953b451b12d5b1eb4c5ec..0ab1bbb44bb483a73dbb4763d785d74a
@Override
- public BanEntry<PlayerProfile> ban(String reason, Date expires, String source, boolean kickPlayer) {
- BanEntry<PlayerProfile> banEntry = ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), reason, expires, source);
- BanEntry<PlayerProfile> banEntry = ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), reason, expires, source);
+ public BanEntry<com.destroystokyo.paper.profile.PlayerProfile> ban(String reason, Date expires, String source, boolean kickPlayer) { // Paper - fix ban list API
+ BanEntry<com.destroystokyo.paper.profile.PlayerProfile> banEntry = ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), reason, expires, source); // Paper - fix ban list API
+ BanEntry<com.destroystokyo.paper.profile.PlayerProfile> banEntry = ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), reason, expires, source); // Paper - fix ban list API
if (kickPlayer) {
this.kickPlayer(reason);
}
@ -256,7 +256,7 @@ index 77ea396950ed23ab5bf953b451b12d5b1eb4c5ec..0ab1bbb44bb483a73dbb4763d785d74a
}
diff --git a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
index 2d877acc4cb338193449ae37cafb0cfdc452d6b0..51a6e84198f5b95488e8c757951ba14be4c55625 100644
index 533d143969592f9a4f4d1ea1660474264150f211..c08006a010606fac5d290889a3ad9fdf9008ee72 100644
--- a/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
+++ b/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
@@ -31,7 +31,7 @@ import org.bukkit.profile.PlayerProfile;

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