diff options
author | Bjarne Koll <[email protected]> | 2024-10-25 18:08:28 +0200 |
---|---|---|
committer | Bjarne Koll <[email protected]> | 2024-10-25 18:08:28 +0200 |
commit | 0a8fd78e37d7204c81a62252a412c9c7054092ea (patch) | |
tree | 3fc74fe9a52cc1b65614566d5e81ed7a3c5b46ab | |
parent | bb124f40217e336a6a1575a9b4334762cd796553 (diff) | |
download | Paper-0a8fd78e37d7204c81a62252a412c9c7054092ea.tar.gz Paper-0a8fd78e37d7204c81a62252a412c9c7054092ea.zip |
Compiler issue v5
42 files changed, 97 insertions, 87 deletions
diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch index eb69aa8d12..553c918875 100644 --- a/patches/server/0005-Paper-config-files.patch +++ b/patches/server/0005-Paper-config-files.patch @@ -3140,7 +3140,7 @@ index 0000000000000000000000000000000000000000..36ca88b677e1b55b41c52750948d5b6d +} diff --git a/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryEntrySerializer.java b/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryEntrySerializer.java new file mode 100644 -index 0000000000000000000000000000000000000000..9073c619f14feb7a14bf32a504eb935f6d4cfe2e +index 0000000000000000000000000000000000000000..cb0de1a639578320fd38177a915bfa5d1e9a73bd --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryEntrySerializer.java @@ -0,0 +1,64 @@ @@ -3178,7 +3178,7 @@ index 0000000000000000000000000000000000000000..9073c619f14feb7a14bf32a504eb935f + } + + protected final Registry<R> registry() { -+ return this.registryAccess.registryOrThrow(this.registryKey); ++ return this.registryAccess.lookupOrThrow(this.registryKey); + } + + protected abstract T convertFromResourceKey(ResourceKey<R> key) throws SerializationException; @@ -3210,7 +3210,7 @@ index 0000000000000000000000000000000000000000..9073c619f14feb7a14bf32a504eb935f +} diff --git a/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryHolderSerializer.java b/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryHolderSerializer.java new file mode 100644 -index 0000000000000000000000000000000000000000..eeae35ede747e473ddba4ca1688f2f6cbc35ce7d +index 0000000000000000000000000000000000000000..76f6219eac049afef7ce03cd30d7c3232b5b9b7c --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryHolderSerializer.java @@ -0,0 +1,34 @@ @@ -3240,7 +3240,7 @@ index 0000000000000000000000000000000000000000..eeae35ede747e473ddba4ca1688f2f6c + + @Override + protected Holder<T> convertFromResourceKey(ResourceKey<T> key) throws SerializationException { -+ return this.registry().getHolder(key).orElseThrow(() -> new SerializationException("Missing holder in " + this.registry().key() + " with key " + key)); ++ return this.registry().get(key).orElseThrow(() -> new SerializationException("Missing holder in " + this.registry().key() + " with key " + key)); + } + + @Override @@ -3250,7 +3250,7 @@ index 0000000000000000000000000000000000000000..eeae35ede747e473ddba4ca1688f2f6c +} diff --git a/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryValueSerializer.java b/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryValueSerializer.java new file mode 100644 -index 0000000000000000000000000000000000000000..718377ce91a010a48b2b4a5e59e02ee8a42107a7 +index 0000000000000000000000000000000000000000..6831b7b72c5e1f79eff36019ca2ff56531c26df8 --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/serializer/registry/RegistryValueSerializer.java @@ -0,0 +1,35 @@ @@ -3277,7 +3277,7 @@ index 0000000000000000000000000000000000000000..718377ce91a010a48b2b4a5e59e02ee8 + + @Override + protected T convertFromResourceKey(ResourceKey<T> key) throws SerializationException { -+ final T value = this.registry().get(key); ++ final T value = this.registry().getValue(key); + if (value == null) { + throw new SerializationException("Missing value in " + this.registry() + " with key " + key.location()); + } @@ -3617,7 +3617,7 @@ index 0000000000000000000000000000000000000000..66073f7a6a96405348cc4044ad1e6922 +} diff --git a/src/main/java/io/papermc/paper/configuration/transformation/world/FeatureSeedsGeneration.java b/src/main/java/io/papermc/paper/configuration/transformation/world/FeatureSeedsGeneration.java new file mode 100644 -index 0000000000000000000000000000000000000000..6cdc40cb4a5f94654c874f9dbdb106fa0e4d41f3 +index 0000000000000000000000000000000000000000..cb1f5f65c098470dc8553b015d0f0f29f28ed956 --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/transformation/world/FeatureSeedsGeneration.java @@ -0,0 +1,71 @@ @@ -3668,7 +3668,7 @@ index 0000000000000000000000000000000000000000..6cdc40cb4a5f94654c874f9dbdb106fa + final Reference2LongMap<Holder<ConfiguredFeature<?, ?>>> features = Objects.requireNonNullElseGet(featureNode.get(new TypeToken<Reference2LongMap<Holder<ConfiguredFeature<?, ?>>>>() {}), Reference2LongOpenHashMap::new); + final Random random = new SecureRandom(); + AtomicInteger counter = new AtomicInteger(0); -+ MinecraftServer.getServer().registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE).holders().forEach(holder -> { ++ MinecraftServer.getServer().registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).listElements().forEach(holder -> { + if (features.containsKey(holder)) { + return; + } @@ -3694,7 +3694,7 @@ index 0000000000000000000000000000000000000000..6cdc40cb4a5f94654c874f9dbdb106fa +} diff --git a/src/main/java/io/papermc/paper/configuration/transformation/world/LegacyPaperWorldConfig.java b/src/main/java/io/papermc/paper/configuration/transformation/world/LegacyPaperWorldConfig.java new file mode 100644 -index 0000000000000000000000000000000000000000..3332531d902899a156179ef2e9ec85b2f42c1fd1 +index 0000000000000000000000000000000000000000..77e530830dc8ebc861b2e70f787f9b71524a54d2 --- /dev/null +++ b/src/main/java/io/papermc/paper/configuration/transformation/world/LegacyPaperWorldConfig.java @@ -0,0 +1,322 @@ @@ -3805,7 +3805,7 @@ index 0000000000000000000000000000000000000000..3332531d902899a156179ef2e9ec85b2 + ) + .addVersion(26, ConfigurationTransformation.builder().addAction(path("alt-item-despawn-rate", "items", ConfigurationTransformation.WILDCARD_OBJECT), (path, value) -> { + String itemName = path.get(path.size() - 1).toString(); -+ final Optional<Holder.Reference<Item>> item = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, ResourceLocation.parse(itemName.toLowerCase(Locale.ROOT)))); ++ final Optional<Holder.Reference<Item>> item = BuiltInRegistries.ITEM.get(ResourceKey.create(Registries.ITEM, ResourceLocation.parse(itemName.toLowerCase(Locale.ROOT)))); + if (item.isEmpty()) { + itemName = Material.valueOf(itemName).getKey().getKey(); + } @@ -3837,7 +3837,7 @@ index 0000000000000000000000000000000000000000..3332531d902899a156179ef2e9ec85b2 + Map<String, Integer> rebuild = new HashMap<>(); + value.childrenMap().forEach((key, node) -> { + String itemName = key.toString(); -+ final Optional<Holder.Reference<Item>> itemHolder = BuiltInRegistries.ITEM.getHolder(ResourceKey.create(Registries.ITEM, ResourceLocation.parse(itemName.toLowerCase(Locale.ROOT)))); ++ final Optional<Holder.Reference<Item>> itemHolder = BuiltInRegistries.ITEM.get(ResourceKey.create(Registries.ITEM, ResourceLocation.parse(itemName.toLowerCase(Locale.ROOT)))); + final @Nullable String item; + if (itemHolder.isEmpty()) { + final @Nullable Material bukkitMat = Material.matchMaterial(itemName); diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 812a9e1167..a8d9cacd74 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -14,10 +14,10 @@ Co-authored-by: Jake Potrebic <[email protected]> diff --git a/src/main/java/io/papermc/paper/adventure/AdventureCodecs.java b/src/main/java/io/papermc/paper/adventure/AdventureCodecs.java new file mode 100644 -index 0000000000000000000000000000000000000000..8dcedc5f4d4453fd942787dbcb9c757274ec7715 +index 0000000000000000000000000000000000000000..2c5702a42c4a3d8b37deeb26e1bd7fbdcca3554e --- /dev/null +++ b/src/main/java/io/papermc/paper/adventure/AdventureCodecs.java -@@ -0,0 +1,446 @@ +@@ -0,0 +1,450 @@ +package io.papermc.paper.adventure; + +import com.google.gson.JsonElement; @@ -61,6 +61,7 @@ index 0000000000000000000000000000000000000000..8dcedc5f4d4453fd942787dbcb9c7572 +import net.kyori.adventure.text.format.TextColor; +import net.kyori.adventure.text.format.TextDecoration; +import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer; ++import net.minecraft.commands.arguments.selector.SelectorPattern; +import net.minecraft.core.UUIDUtil; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.nbt.CompoundTag; @@ -146,7 +147,7 @@ index 0000000000000000000000000000000000000000..8dcedc5f4d4453fd942787dbcb9c7572 + @Subst("key") final String typeKey = isi.item.unwrapKey().orElseThrow().location().toString(); + return HoverEvent.ShowItem.showItem(Key.key(typeKey), isi.count, PaperAdventure.asAdventure(isi.getItemStack().getComponentsPatch())); + }, si -> { -+ final Item itemType = BuiltInRegistries.ITEM.get(PaperAdventure.asVanilla(si.item())); ++ final Item itemType = BuiltInRegistries.ITEM.getValue(PaperAdventure.asVanilla(si.item())); + final Map<Key, DataComponentValue> dataComponentsMap = si.dataComponents(); + final ItemStack stack = new ItemStack(BuiltInRegistries.ITEM.wrapAsHolder(itemType), si.count(), PaperAdventure.asVanilla(dataComponentsMap)); + return new net.minecraft.network.chat.HoverEvent.ItemStackInfo(stack); @@ -315,7 +316,10 @@ index 0000000000000000000000000000000000000000..8dcedc5f4d4453fd942787dbcb9c7572 + }); + + static final MapCodec<KeybindComponent> KEYBIND_COMPONENT_MAP_CODEC = KeybindContents.CODEC.xmap(k -> Component.keybind(k.getName()), k -> new KeybindContents(k.keybind())); -+ static final MapCodec<ScoreComponent> SCORE_COMPONENT_INNER_MAP_CODEC = ScoreContents.INNER_CODEC.xmap(s -> Component.score(s.getName(), s.getObjective()), s -> new ScoreContents(s.name(), s.objective())); ++ static final MapCodec<ScoreComponent> SCORE_COMPONENT_INNER_MAP_CODEC = ScoreContents.INNER_CODEC.xmap( ++ s -> Component.score(s.name().map(SelectorPattern::pattern, Function.identity()), s.objective()), ++ s -> new ScoreContents(SelectorPattern.parse(s.name()).<Either<SelectorPattern, String>>map(Either::left).result().orElse(Either.right(s.name())), s.objective()) ++ ); // TODO we might want to ask adventure for a nice way we can avoid parsing and flattening the SelectorPattern on every conversion. + static final MapCodec<ScoreComponent> SCORE_COMPONENT_MAP_CODEC = SCORE_COMPONENT_INNER_MAP_CODEC.fieldOf("score"); + static final MapCodec<SelectorComponent> SELECTOR_COMPONENT_MAP_CODEC = mapCodec((instance) -> { + return instance.group( @@ -1157,7 +1161,7 @@ index 0000000000000000000000000000000000000000..2fd6c3e65354071af71c7d8ebb97b559 +} diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java new file mode 100644 -index 0000000000000000000000000000000000000000..dc4837c577676115f0653acc35f55962a432e425 +index 0000000000000000000000000000000000000000..161bc8c577643094d824ea96fb6974c76e5e77f0 --- /dev/null +++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java @@ -0,0 +1,479 @@ @@ -1580,7 +1584,7 @@ index 0000000000000000000000000000000000000000..dc4837c577676115f0653acc35f55962 + } + final DataComponentPatch.Builder builder = DataComponentPatch.builder(); + map.forEach((key, dataComponentValue) -> { -+ final DataComponentType<?> type = requireNonNull(BuiltInRegistries.DATA_COMPONENT_TYPE.get(asVanilla(key))); ++ final DataComponentType<?> type = requireNonNull(BuiltInRegistries.DATA_COMPONENT_TYPE.getValue(asVanilla(key))); + if (dataComponentValue instanceof DataComponentValue.Removed) { + builder.remove(type); + return; @@ -1839,7 +1843,7 @@ index 0000000000000000000000000000000000000000..8323f135d6bf2e1f12525e05094ffa3f +} diff --git a/src/main/java/io/papermc/paper/adventure/providers/DataComponentValueConverterProviderImpl.java b/src/main/java/io/papermc/paper/adventure/providers/DataComponentValueConverterProviderImpl.java new file mode 100644 -index 0000000000000000000000000000000000000000..6b37c0ebda4a0cfcf9c3b2c3483ffababe622555 +index 0000000000000000000000000000000000000000..ee2076fd098ae2164596f39b88f56b3700ed3687 --- /dev/null +++ b/src/main/java/io/papermc/paper/adventure/providers/DataComponentValueConverterProviderImpl.java @@ -0,0 +1,82 @@ @@ -1895,7 +1899,7 @@ index 0000000000000000000000000000000000000000..6b37c0ebda4a0cfcf9c3b2c3483ffaba + GsonDataComponentValue.class, + PaperAdventure.DataComponentValueImpl.class, + (key, dataComponentValue) -> { -+ final @Nullable DataComponentType<?> type = BuiltInRegistries.DATA_COMPONENT_TYPE.get(PaperAdventure.asVanilla(key)); ++ final @Nullable DataComponentType<?> type = BuiltInRegistries.DATA_COMPONENT_TYPE.getValue(PaperAdventure.asVanilla(key)); + if (type == null) { + throw new IllegalArgumentException("Unknown data component type: " + key); + } @@ -1911,7 +1915,7 @@ index 0000000000000000000000000000000000000000..6b37c0ebda4a0cfcf9c3b2c3483ffaba + DataComponentValue.TagSerializable.class, + PaperAdventure.DataComponentValueImpl.class, + (key, tagSerializable) -> { -+ final @Nullable DataComponentType<?> type = BuiltInRegistries.DATA_COMPONENT_TYPE.get(PaperAdventure.asVanilla(key)); ++ final @Nullable DataComponentType<?> type = BuiltInRegistries.DATA_COMPONENT_TYPE.getValue(PaperAdventure.asVanilla(key)); + if (type == null) { + throw new IllegalArgumentException("Unknown data component type: " + key); + } diff --git a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch index 0f0dfcc8f8..2e40e9d138 100644 --- a/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch +++ b/patches/server/0011-Use-TerminalConsoleAppender-for-console-improvements.patch @@ -216,7 +216,7 @@ index 0000000000000000000000000000000000000000..8f07539a82f449ad217e316a7513a170 + +} diff --git a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java -index dc4837c577676115f0653acc35f55962a432e425..22fe529890f34f66534c01248f654dc911b44c3b 100644 +index 161bc8c577643094d824ea96fb6974c76e5e77f0..cfcaf215c4a901dd2938c7ce41db502c57b42bbf 100644 --- a/src/main/java/io/papermc/paper/adventure/PaperAdventure.java +++ b/src/main/java/io/papermc/paper/adventure/PaperAdventure.java @@ -32,6 +32,7 @@ import net.kyori.adventure.text.flattener.ComponentFlattener; diff --git a/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch b/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch index 7a580a6eb7..590dfbe627 100644 --- a/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch +++ b/patches/server/0163-Ability-to-apply-mending-to-XP-API.patch @@ -14,7 +14,7 @@ public net.minecraft.world.entity.ExperienceOrb durabilityToXp(I)I public net.minecraft.world.entity.ExperienceOrb xpToDurability(I)I diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 63499a4fa349b3fa61040244db8be2d5d2569b96..d222de793776b0217c8ec0a4a3151d085efa339f 100644 +index 63499a4fa349b3fa61040244db8be2d5d2569b96..128fcd537783986d816dae6d1ce2afb7af07d45a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1665,7 +1665,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -22,7 +22,7 @@ index 63499a4fa349b3fa61040244db8be2d5d2569b96..d222de793776b0217c8ec0a4a3151d08 @Override - public void giveExp(int exp) { -+ // Paper start ++ // Paper start - ability to apply mending + public int applyMending(int amount) { + ServerPlayer handle = this.getHandle(); + // Logic copied from EntityExperienceOrb and remapped to unobfuscated methods/properties @@ -31,7 +31,7 @@ index 63499a4fa349b3fa61040244db8be2d5d2569b96..d222de793776b0217c8ec0a4a3151d08 + .getRandomItemWith(net.minecraft.world.item.enchantment.EnchantmentEffectComponents.REPAIR_WITH_XP, handle, net.minecraft.world.item.ItemStack::isDamaged); + final net.minecraft.world.item.ItemStack itemstack = stackEntry.map(net.minecraft.world.item.enchantment.EnchantedItemInUse::itemStack).orElse(net.minecraft.world.item.ItemStack.EMPTY); + if (!itemstack.isEmpty() && itemstack.getItem().components().has(net.minecraft.core.component.DataComponents.MAX_DAMAGE)) { -+ net.minecraft.world.entity.ExperienceOrb orb = net.minecraft.world.entity.EntityType.EXPERIENCE_ORB.create(handle.level()); ++ net.minecraft.world.entity.ExperienceOrb orb = net.minecraft.world.entity.EntityType.EXPERIENCE_ORB.create(handle.level(), net.minecraft.world.entity.EntitySpawnReason.COMMAND); + orb.value = amount; + orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM; + orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ()); @@ -56,7 +56,7 @@ index 63499a4fa349b3fa61040244db8be2d5d2569b96..d222de793776b0217c8ec0a4a3151d08 + if (applyMending) { + exp = this.applyMending(exp); + } -+ // Paper end ++ // Paper end - ability to apply mending this.getHandle().giveExperiencePoints(exp); } diff --git a/patches/server/0176-Player.setPlayerProfile-API.patch b/patches/server/0176-Player.setPlayerProfile-API.patch index a44003c55f..4f18504a3f 100644 --- a/patches/server/0176-Player.setPlayerProfile-API.patch +++ b/patches/server/0176-Player.setPlayerProfile-API.patch @@ -64,7 +64,7 @@ index 818df09e9245b5d89b4180b1eaa51470b7539341..f6b2ca92fd3510a76cbf56d0ea55aa6c 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 d222de793776b0217c8ec0a4a3151d085efa339f..6191c780cfab682464e23c53873d0acb0c642b0d 100644 +index 128fcd537783986d816dae6d1ce2afb7af07d45a..32eeca2467189c6c97f7da5529d4fe9375e8a848 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -254,11 +254,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0181-Flag-to-disable-the-channel-limit.patch b/patches/server/0181-Flag-to-disable-the-channel-limit.patch index bbb4d82685..867f7c6540 100644 --- a/patches/server/0181-Flag-to-disable-the-channel-limit.patch +++ b/patches/server/0181-Flag-to-disable-the-channel-limit.patch @@ -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 6191c780cfab682464e23c53873d0acb0c642b0d..afee0dd824cfa229f9ebdbc2b4ca9beee485d6e7 100644 +index 32eeca2467189c6c97f7da5529d4fe9375e8a848..a4333eae8aa2ae3fefdc8a765a4434c36e123b12 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -214,6 +214,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0207-InventoryCloseEvent-Reason-API.patch b/patches/server/0207-InventoryCloseEvent-Reason-API.patch index 335dc0d881..d0f2f2b3fc 100644 --- a/patches/server/0207-InventoryCloseEvent-Reason-API.patch +++ b/patches/server/0207-InventoryCloseEvent-Reason-API.patch @@ -165,7 +165,7 @@ index 6d4e0a90c70f7a66450cbb18ebec1d7bf9200af2..5ff159be1a6dfb4b1a5b9aa1e435d294 @Override public boolean isBlocking() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index afee0dd824cfa229f9ebdbc2b4ca9beee485d6e7..d1b14e7460bd2974e2c3c49a085968a90e1f410f 100644 +index a4333eae8aa2ae3fefdc8a765a4434c36e123b12..462877cf6f0dce4f86b6a47564affe9beb2559a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1290,7 +1290,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0218-Expand-ArmorStand-API.patch b/patches/server/0218-Expand-ArmorStand-API.patch index c5c9563242..8e53f0be90 100644 --- a/patches/server/0218-Expand-ArmorStand-API.patch +++ b/patches/server/0218-Expand-ArmorStand-API.patch @@ -14,7 +14,7 @@ public net.minecraft.world.entity.decoration.ArmorStand isDisabled(Lnet/minecraf Co-authored-by: SoSeDiK <[email protected]> diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -index 1bb080a8af45411b68a0f2a3c40718d60fdc9d97..e1cedcb95e9b2e2e9587b623256b5cffa7b08ce4 100644 +index 1bb080a8af45411b68a0f2a3c40718d60fdc9d97..c8713200d946b0fdd74b60d0c2c136c8226389e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java @@ -233,6 +233,149 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { @@ -72,7 +72,7 @@ index 1bb080a8af45411b68a0f2a3c40718d60fdc9d97..e1cedcb95e9b2e2e9587b623256b5cff + for (org.bukkit.inventory.EquipmentSlot slot : slots) { + if (slot == org.bukkit.inventory.EquipmentSlot.OFF_HAND) continue; + net.minecraft.world.entity.EquipmentSlot nmsSlot = org.bukkit.craftbukkit.CraftEquipmentSlot.getNMS(slot); -+ disabled += (1 << nmsSlot.getFilterFlag()) + (1 << (nmsSlot.getFilterFlag() + 8)) + (1 << (nmsSlot.getFilterFlag() + 16)); ++ disabled += (1 << nmsSlot.getFilterBit(0)) + (1 << nmsSlot.getFilterBit(8)) + (1 << nmsSlot.getFilterBit(16)); + } + getHandle().disabledSlots = disabled; + } diff --git a/patches/server/0240-Expose-attack-cooldown-methods-for-Player.patch b/patches/server/0240-Expose-attack-cooldown-methods-for-Player.patch index 2288caab49..348ac73d0c 100644 --- a/patches/server/0240-Expose-attack-cooldown-methods-for-Player.patch +++ b/patches/server/0240-Expose-attack-cooldown-methods-for-Player.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose attack cooldown methods for Player diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d1b14e7460bd2974e2c3c49a085968a90e1f410f..6fb400243e491bb8492342327fe98127b2df331e 100644 +index 462877cf6f0dce4f86b6a47564affe9beb2559a8..e4d840d6335007a6a542240746504bf1f2af332d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -3007,6 +3007,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0241-Improve-death-events.patch b/patches/server/0241-Improve-death-events.patch index 17d781e34a..642cd86423 100644 --- a/patches/server/0241-Improve-death-events.patch +++ b/patches/server/0241-Improve-death-events.patch @@ -420,7 +420,7 @@ index 2caba38a50b7ea535337a3540aa5272d4a9f1878..e20565cf256aacd012a1722c5ebbf901 // CraftBukkit end 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 6fb400243e491bb8492342327fe98127b2df331e..5dab50309b9441ddb3fe66aec653be0246b049d2 100644 +index e4d840d6335007a6a542240746504bf1f2af332d..159bba49095aec77cce5f53d4388a5dff0afcc60 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2544,7 +2544,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch b/patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch index 51b5df8832..cc33312338 100644 --- a/patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch +++ b/patches/server/0270-Replace-OfflinePlayer-getLastPlayed.patch @@ -106,7 +106,7 @@ index f6b2ca92fd3510a76cbf56d0ea55aa6caaf12ba1..e0d342a0ddd140b342f7af138c71596c public Location getLastDeathLocation() { if (this.getData().contains("LastDeathLocation", 10)) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5dab50309b9441ddb3fe66aec653be0246b049d2..38989d2e0702e6edba0e81e292b439b7ef48023c 100644 +index 159bba49095aec77cce5f53d4388a5dff0afcc60..f351250b8e8b66bcf72230bbc76835fcb45817e1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -215,6 +215,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0272-Dont-block-Player-remove-if-the-handle-is-a-custom-p.patch b/patches/server/0272-Dont-block-Player-remove-if-the-handle-is-a-custom-p.patch index f2bcc599c0..12aeb87aa3 100644 --- a/patches/server/0272-Dont-block-Player-remove-if-the-handle-is-a-custom-p.patch +++ b/patches/server/0272-Dont-block-Player-remove-if-the-handle-is-a-custom-p.patch @@ -8,7 +8,7 @@ We just add a check to ensure that the CraftPlayer's handle is a ServerPlayer diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 38989d2e0702e6edba0e81e292b439b7ef48023c..92fb4dfce832f5cb98b476365c060acfd8277183 100644 +index f351250b8e8b66bcf72230bbc76835fcb45817e1..faab55435a0c4fc6ff9d117f29a2401677b9f828 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -229,8 +229,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0337-Implement-Player-Client-Options-API.patch b/patches/server/0337-Implement-Player-Client-Options-API.patch index 1ca74a9891..da2d0fcb26 100644 --- a/patches/server/0337-Implement-Player-Client-Options-API.patch +++ b/patches/server/0337-Implement-Player-Client-Options-API.patch @@ -136,7 +136,7 @@ index 363175d3325c012f31ba84060bb0bfac694f6ab8..9911e231ad021286f2da90057b06874f this.adventure$locale = java.util.Objects.requireNonNullElse(net.kyori.adventure.translation.Translator.parseLocale(this.language), java.util.Locale.US); // 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 92fb4dfce832f5cb98b476365c060acfd8277183..330a64edf72dc598fb5458702cf7cae5dd83ab00 100644 +index faab55435a0c4fc6ff9d117f29a2401677b9f828..69108fd869c7c929fd7971abea520d5ab9063f69 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -670,6 +670,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0371-Paper-dumpitem-command.patch b/patches/server/0371-Paper-dumpitem-command.patch index 088efe087c..3c84400215 100644 --- a/patches/server/0371-Paper-dumpitem-command.patch +++ b/patches/server/0371-Paper-dumpitem-command.patch @@ -19,7 +19,7 @@ index 3010d57efcc97fb409bfe43b1fc9af198c099a67..cdad0fd5257ae842f83b9c1c98b4565b .flatMap(entry -> entry.getKey().stream().map(s -> Map.entry(s, entry.getValue()))) diff --git a/src/main/java/io/papermc/paper/command/subcommands/DumpItemCommand.java b/src/main/java/io/papermc/paper/command/subcommands/DumpItemCommand.java new file mode 100644 -index 0000000000000000000000000000000000000000..e993177b052c76cb3f9c44edb598ebb4be858393 +index 0000000000000000000000000000000000000000..b4b90c1bda72f845756b46e2316d952361989697 --- /dev/null +++ b/src/main/java/io/papermc/paper/command/subcommands/DumpItemCommand.java @@ -0,0 +1,133 @@ @@ -103,7 +103,7 @@ index 0000000000000000000000000000000000000000..e993177b052c76cb3f9c44edb598ebb4 + + final RegistryAccess.Frozen access = ((CraftServer) sender.getServer()).getServer().registryAccess(); + final RegistryOps<Tag> ops = access.createSerializationContext(NbtOps.INSTANCE); -+ final Registry<DataComponentType<?>> registry = access.registryOrThrow(Registries.DATA_COMPONENT_TYPE); ++ final Registry<DataComponentType<?>> registry = access.lookupOrThrow(Registries.DATA_COMPONENT_TYPE); + final List<ComponentLike> componentComponents = new ArrayList<>(); + final List<String> commandComponents = new ArrayList<>(); + for (final DataComponentType<?> type : referencedComponentTypes) { diff --git a/patches/server/0389-Brand-support.patch b/patches/server/0389-Brand-support.patch index 291a5334d5..917f8102d4 100644 --- a/patches/server/0389-Brand-support.patch +++ b/patches/server/0389-Brand-support.patch @@ -57,7 +57,7 @@ index b9fbaddcc8239bf737fdea51790f678306e511eb..9a8b08d4b70b8890961e4af7ce6e870a } catch (Exception ex) { ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 330a64edf72dc598fb5458702cf7cae5dd83ab00..3b0e7473b3e0c5d9e9e34ed505eae4823e626aae 100644 +index 69108fd869c7c929fd7971abea520d5ab9063f69..3191c66c9e5b9c5fcfd07716733aaa51612d507f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -3166,6 +3166,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0430-Fix-Player-spawnParticle-x-y-z-precision-loss.patch b/patches/server/0430-Fix-Player-spawnParticle-x-y-z-precision-loss.patch index b8670990f3..066a872e12 100644 --- a/patches/server/0430-Fix-Player-spawnParticle-x-y-z-precision-loss.patch +++ b/patches/server/0430-Fix-Player-spawnParticle-x-y-z-precision-loss.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 3b0e7473b3e0c5d9e9e34ed505eae4823e626aae..875d96ca1461d254745e53970b401634c07a8dd6 100644 +index 3191c66c9e5b9c5fcfd07716733aaa51612d507f..e7f2d02de2ac58ffa484d8eca5f8b5688e7e02d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -2734,7 +2734,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0466-Add-sendOpLevel-API.patch b/patches/server/0466-Add-sendOpLevel-API.patch index 2a4354226e..fde6ae317a 100644 --- a/patches/server/0466-Add-sendOpLevel-API.patch +++ b/patches/server/0466-Add-sendOpLevel-API.patch @@ -32,7 +32,7 @@ index 70b7871091ab9b64d2a5503620a71c3d5585c25d..7676dbe55b4bf6e0472dc0190c01e6ec public boolean isWhiteListed(GameProfile profile) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 875d96ca1461d254745e53970b401634c07a8dd6..0ca539a7e037b7f8791ed4c71ce3093a3def2746 100644 +index e7f2d02de2ac58ffa484d8eca5f8b5688e7e02d8..711697d039da58c1b93392f70a70e1ad827b1646 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -694,6 +694,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0527-Expand-PlayerGameModeChangeEvent.patch b/patches/server/0527-Expand-PlayerGameModeChangeEvent.patch index 050751dcc7..aac8a279c5 100644 --- a/patches/server/0527-Expand-PlayerGameModeChangeEvent.patch +++ b/patches/server/0527-Expand-PlayerGameModeChangeEvent.patch @@ -147,7 +147,7 @@ index e6a927e991779bad84a02d81010057a4e36b9c95..9007a0f01b823c613c39c974d9e0f585 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0ca539a7e037b7f8791ed4c71ce3093a3def2746..8551d626fd4eb38f57414d022f752c0a389a1095 100644 +index 711697d039da58c1b93392f70a70e1ad827b1646..fc246d30808ad6242f4adfe201adc169a2ddeb90 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1681,7 +1681,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0539-Add-PlayerKickEvent-causes.patch b/patches/server/0539-Add-PlayerKickEvent-causes.patch index d11448420f..04617f2c41 100644 --- a/patches/server/0539-Add-PlayerKickEvent-causes.patch +++ b/patches/server/0539-Add-PlayerKickEvent-causes.patch @@ -495,7 +495,7 @@ index 9e2ad78b12cadbf0e2bda1e12fe844120529c347..6a7d7fad990fc44fdda6849d43dad141 } } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 8551d626fd4eb38f57414d022f752c0a389a1095..f0f8238aeb49c45921c7ec48cc49ed628087741f 100644 +index fc246d30808ad6242f4adfe201adc169a2ddeb90..e24d5992cfb89ccc4e727c91918ab1f94131987e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -280,7 +280,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0566-Add-PlayerSetSpawnEvent.patch b/patches/server/0566-Add-PlayerSetSpawnEvent.patch index e28f1bfdd7..6c4f8f48bc 100644 --- a/patches/server/0566-Add-PlayerSetSpawnEvent.patch +++ b/patches/server/0566-Add-PlayerSetSpawnEvent.patch @@ -187,7 +187,7 @@ index db26b5a0464bd6087eeacaf6dd61eba37365df92..9117c035d5a6ff114b028fad3380ceb1 } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index f0f8238aeb49c45921c7ec48cc49ed628087741f..efc9b5f6864b09fcf116bbad82424b82448f5469 100644 +index e24d5992cfb89ccc4e727c91918ab1f94131987e..ca13d317a5e1c7b7ccda3fdec63e2146562649f6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1430,9 +1430,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0649-Multi-Block-Change-API-Implementation.patch b/patches/server/0649-Multi-Block-Change-API-Implementation.patch index 45d3534bd9..9edd052d01 100644 --- a/patches/server/0649-Multi-Block-Change-API-Implementation.patch +++ b/patches/server/0649-Multi-Block-Change-API-Implementation.patch @@ -24,7 +24,7 @@ index 926ff9be3d9e3f5d620e4c7ccb22b9f64865ff8c..1a37654aff9a9c86c9f7af10a1cf7213 buf.writeLong(this.sectionPos.asLong()); buf.writeVarInt(this.positions.length); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index efc9b5f6864b09fcf116bbad82424b82448f5469..5274ee417ba3b9ccdab70449c87ce8f3809ea137 100644 +index ca13d317a5e1c7b7ccda3fdec63e2146562649f6..fe0c355f8203c9bfa30d2ec48392a5a1a3d616ae 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -947,6 +947,32 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0658-Add-GameEvent-tags.patch b/patches/server/0658-Add-GameEvent-tags.patch index f36a025eb7..34a9b8a43e 100644 --- a/patches/server/0658-Add-GameEvent-tags.patch +++ b/patches/server/0658-Add-GameEvent-tags.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add GameEvent tags diff --git a/src/main/java/io/papermc/paper/CraftGameEventTag.java b/src/main/java/io/papermc/paper/CraftGameEventTag.java new file mode 100644 -index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4fd3d22b5b +index 0000000000000000000000000000000000000000..874c420e60b6be09c806d64f40cf63663ffddc07 --- /dev/null +++ b/src/main/java/io/papermc/paper/CraftGameEventTag.java @@ -0,0 +1,35 @@ @@ -37,7 +37,7 @@ index 0000000000000000000000000000000000000000..e7d9fd2702a1ce96596580fff8f5ee4f + private static final Map<GameEvent, ResourceKey<net.minecraft.world.level.gameevent.GameEvent>> KEY_CACHE = Collections.synchronizedMap(new IdentityHashMap<>()); + @Override + public boolean isTagged(@NotNull GameEvent gameEvent) { -+ return registry.getHolderOrThrow(KEY_CACHE.computeIfAbsent(gameEvent, event -> ResourceKey.create(Registries.GAME_EVENT, CraftNamespacedKey.toMinecraft(event.getKey())))).is(tag); ++ return registry.getOrThrow(KEY_CACHE.computeIfAbsent(gameEvent, event -> ResourceKey.create(Registries.GAME_EVENT, CraftNamespacedKey.toMinecraft(event.getKey())))).is(tag); + } + + @Override diff --git a/patches/server/0668-Expose-furnace-minecart-push-values.patch b/patches/server/0668-Expose-furnace-minecart-push-values.patch index 6245e14b4e..fb48aabb5f 100644 --- a/patches/server/0668-Expose-furnace-minecart-push-values.patch +++ b/patches/server/0668-Expose-furnace-minecart-push-values.patch @@ -6,32 +6,34 @@ Subject: [PATCH] Expose furnace minecart push values Adds methods for getting and setting a furnace minecart's push values diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java -index 53042b75b45093535d6572239b34c3ff9a72f648..1b41026ab638bb2764b19429706eb0aded5aad12 100644 +index 53042b75b45093535d6572239b34c3ff9a72f648..1be1f6d23f2224d4d8720d40f2e530736b1bae81 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java -@@ -27,6 +27,28 @@ public class CraftMinecartFurnace extends CraftMinecart implements PoweredMineca +@@ -27,6 +27,30 @@ public class CraftMinecartFurnace extends CraftMinecart implements PoweredMineca this.getHandle().fuel = fuel; } + // Paper start + @Override + public double getPushX() { -+ return getHandle().xPush; ++ return getHandle().push.x; + } + + @Override + public double getPushZ() { -+ return getHandle().zPush; ++ return getHandle().push.z; + } + + @Override + public void setPushX(double xPush) { -+ getHandle().xPush = xPush; ++ final net.minecraft.world.phys.Vec3 push = getHandle().push; ++ getHandle().push = new net.minecraft.world.phys.Vec3(xPush, push.y, push.z); + } + + @Override + public void setPushZ(double zPush) { -+ getHandle().zPush = zPush; ++ final net.minecraft.world.phys.Vec3 push = getHandle().push; ++ getHandle().push = new net.minecraft.world.phys.Vec3(push.x, push.y, zPush); + } + // Paper end + diff --git a/patches/server/0716-More-Teleport-API.patch b/patches/server/0716-More-Teleport-API.patch index 70bc44b3da..850f742352 100644 --- a/patches/server/0716-More-Teleport-API.patch +++ b/patches/server/0716-More-Teleport-API.patch @@ -112,7 +112,7 @@ index 4e6afa243d6108cb946a8a7cf96c4036a3c2ac0c..43786eacc72cdf3bb209d3dfb1808ea9 private final org.bukkit.entity.Entity.Spigot spigot = new org.bukkit.entity.Entity.Spigot() { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5274ee417ba3b9ccdab70449c87ce8f3809ea137..c45753f4b65b189ebfdaea4fb0ec51217dd990c3 100644 +index fe0c355f8203c9bfa30d2ec48392a5a1a3d616ae..baae7a129853a296273b7f295f58cbb99187da22 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1303,13 +1303,102 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -246,7 +246,7 @@ index 5274ee417ba3b9ccdab70449c87ce8f3809ea137..c45753f4b65b189ebfdaea4fb0ec5121 // SPIGOT-5509: Wakeup, similar to riding if (this.isSleeping()) { -@@ -1356,13 +1445,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1356,13 +1445,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle(); // Close any foreign inventory @@ -263,7 +263,9 @@ index 5274ee417ba3b9ccdab70449c87ce8f3809ea137..c45753f4b65b189ebfdaea4fb0ec5121 + for (final io.papermc.paper.entity.TeleportFlag.Relative bukkit : relativeArguments) { + nms.add(toNmsRelativeFlag(bukkit)); + } -+ entity.connection.internalTeleport(to.getX(), to.getY(), to.getZ(), to.getYaw(), to.getPitch(), nms); ++ entity.connection.internalTeleport(new net.minecraft.world.entity.PositionMoveRotation( ++ io.papermc.paper.util.MCUtil.toVec3(to), net.minecraft.world.phys.Vec3.ZERO, to.getYaw(), to.getPitch() ++ ), nms); + // Paper end - Teleport API } else { entity.portalProcess = null; // SPIGOT-7785: there is no need to carry this over as it contains the old world/location and we might run into trouble if there is a portal in the same spot in both worlds diff --git a/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch b/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch index d204b1a24f..9908dc279c 100644 --- a/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch +++ b/patches/server/0721-Custom-Chat-Completion-Suggestions-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Custom Chat Completion Suggestions API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index c45753f4b65b189ebfdaea4fb0ec51217dd990c3..2b5eb586eda41d465f3f1faae8159f6fbe346312 100644 +index baae7a129853a296273b7f295f58cbb99187da22..58f3ca95b1d79269bed3b6473cd69d8988ede162 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -708,6 +708,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0746-Elder-Guardian-appearance-API.patch b/patches/server/0746-Elder-Guardian-appearance-API.patch index bf49ebc163..772a3c2cd3 100644 --- a/patches/server/0746-Elder-Guardian-appearance-API.patch +++ b/patches/server/0746-Elder-Guardian-appearance-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 2b5eb586eda41d465f3f1faae8159f6fbe346312..d8d3d256910790fd7fc406d64ab38e1c372ecfa7 100644 +index 58f3ca95b1d79269bed3b6473cd69d8988ede162..667796909ea6b56b93ec591aae1c393ec2f8940a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3326,6 +3326,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3328,6 +3328,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/server/0758-Add-Player-Warden-Warning-API.patch b/patches/server/0758-Add-Player-Warden-Warning-API.patch index 9ec7039092..2ce951d036 100644 --- a/patches/server/0758-Add-Player-Warden-Warning-API.patch +++ b/patches/server/0758-Add-Player-Warden-Warning-API.patch @@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index d8d3d256910790fd7fc406d64ab38e1c372ecfa7..bc96e6a4f6833b351da5ac91563fd6f0d057c854 100644 +index 667796909ea6b56b93ec591aae1c393ec2f8940a..7ef67f0b5da392fa09a99d1213eefa373aad96b6 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3331,6 +3331,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3333,6 +3333,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void showElderGuardian(boolean silent) { if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F)); } diff --git a/patches/server/0770-fix-Instruments.patch b/patches/server/0770-fix-Instruments.patch index fa555c5aa3..ff46175c0f 100644 --- a/patches/server/0770-fix-Instruments.patch +++ b/patches/server/0770-fix-Instruments.patch @@ -6,7 +6,7 @@ Subject: [PATCH] fix Instruments properly handle Player#playNote diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index bc96e6a4f6833b351da5ac91563fd6f0d057c854..b0818d1fc60ab75770e671d30cdbfd531b3dfa99 100644 +index 7ef67f0b5da392fa09a99d1213eefa373aad96b6..f710776d2a81c426cbe75532b06da4f8b1ef4787 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -785,7 +785,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0779-Flying-Fall-Damage.patch b/patches/server/0779-Flying-Fall-Damage.patch index a9fc10c351..a09b209fd2 100644 --- a/patches/server/0779-Flying-Fall-Damage.patch +++ b/patches/server/0779-Flying-Fall-Damage.patch @@ -26,10 +26,10 @@ index 30e0a5fe3f9bd85d2b702c2c877c5682ed35d461..aca888c2f02b09ac6739bdc81b194c45 } else { if (fallDistance >= 2.0F) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index b0818d1fc60ab75770e671d30cdbfd531b3dfa99..05d95294a5183612c171fbd0e5181ac02270e784 100644 +index f710776d2a81c426cbe75532b06da4f8b1ef4787..35722608d2c2d702429f5724732e8af39bb37488 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2609,6 +2609,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2611,6 +2611,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().onUpdateAbilities(); } diff --git a/patches/server/0784-Win-Screen-API.patch b/patches/server/0784-Win-Screen-API.patch index 65a47054b5..8412d997bc 100644 --- a/patches/server/0784-Win-Screen-API.patch +++ b/patches/server/0784-Win-Screen-API.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Win Screen API public net.minecraft.server.level.ServerPlayer seenCredits diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 05d95294a5183612c171fbd0e5181ac02270e784..0a700df3e4f4f6e2e902f0c69dd6ae149978be47 100644 +index 35722608d2c2d702429f5724732e8af39bb37488..83e29f518a57bd2eb4113d5b93cdf47af119c715 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1322,6 +1322,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0792-Correctly-handle-ArmorStand-invisibility.patch b/patches/server/0792-Correctly-handle-ArmorStand-invisibility.patch index c3b0b191aa..4c4c5048be 100644 --- a/patches/server/0792-Correctly-handle-ArmorStand-invisibility.patch +++ b/patches/server/0792-Correctly-handle-ArmorStand-invisibility.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Correctly handle ArmorStand invisibility diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java -index e1cedcb95e9b2e2e9587b623256b5cffa7b08ce4..a2a0064ed86628494e80cb6f6357b4cd9f91f04b 100644 +index c8713200d946b0fdd74b60d0c2c136c8226389e0..184fe8257e5ffb0ef090ffa2833786a4db8b59ea 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java @@ -152,6 +152,14 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand { diff --git a/patches/server/0809-Expand-PlayerItemMendEvent.patch b/patches/server/0809-Expand-PlayerItemMendEvent.patch index 73abf28aa3..7c61c0095c 100644 --- a/patches/server/0809-Expand-PlayerItemMendEvent.patch +++ b/patches/server/0809-Expand-PlayerItemMendEvent.patch @@ -30,10 +30,10 @@ index 3a7af27bb1ce0cbe56bd3760cd400083daf98d4c..bf0838f574fa3fb9654e087d602b8d38 if (l > 0) { // this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls // Paper - the value field should not be mutated here because it doesn't take "count" into account diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 0a700df3e4f4f6e2e902f0c69dd6ae149978be47..3d52de930c4358843c5a8c88a1dce478b61ed616 100644 +index 83e29f518a57bd2eb4113d5b93cdf47af119c715..0d2fd570463d7ad1b6457a8b14303273b97716dd 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1881,11 +1881,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1883,11 +1883,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { handle.serverLevel(), itemstack, amount ); int i = Math.min(possibleDurabilityFromXp, itemstack.getDamageValue()); diff --git a/patches/server/0828-Fix-BanList-API.patch b/patches/server/0828-Fix-BanList-API.patch index 639d56d79e..1164a2d949 100644 --- a/patches/server/0828-Fix-BanList-API.patch +++ b/patches/server/0828-Fix-BanList-API.patch @@ -208,10 +208,10 @@ 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 3d52de930c4358843c5a8c88a1dce478b61ed616..de96fdd4b6129f875e710670f6734bf7fa7a4cfb 100644 +index 0d2fd570463d7ad1b6457a8b14303273b97716dd..ccf2c23ecf6f406ae07a2d7614d52e65da8ca586 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1775,23 +1775,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1777,23 +1777,23 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @Override @@ -240,7 +240,7 @@ index 3d52de930c4358843c5a8c88a1dce478b61ed616..de96fdd4b6129f875e710670f6734bf7 if (kickPlayer) { this.kickPlayer(reason); } -@@ -1799,12 +1799,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1801,12 +1801,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } @Override diff --git a/patches/server/0846-Bandaid-fix-for-Effect.patch b/patches/server/0846-Bandaid-fix-for-Effect.patch index a4996fb167..26b1a9f236 100644 --- a/patches/server/0846-Bandaid-fix-for-Effect.patch +++ b/patches/server/0846-Bandaid-fix-for-Effect.patch @@ -81,7 +81,7 @@ index 67d6840faea539b41ba3abb6d94b28e417a84511..b646f882de3ab04d54d07e9e944c261c // Special case: the axis is optional for ELECTRIC_SPARK Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index de96fdd4b6129f875e710670f6734bf7fa7a4cfb..86f74c35a74b3c3a1d04d6be79e0df30642d475a 100644 +index ccf2c23ecf6f406ae07a2d7614d52e65da8ca586..80877e62d0743891f38abeee5b5b04b4f3bc4010 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -934,7 +934,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0854-Add-Listing-API-for-Player.patch b/patches/server/0854-Add-Listing-API-for-Player.patch index 34070f7cf3..e99f679a70 100644 --- a/patches/server/0854-Add-Listing-API-for-Player.patch +++ b/patches/server/0854-Add-Listing-API-for-Player.patch @@ -122,7 +122,7 @@ index a9063533ea4b2b349d476127b99c822203d7dfcb..218e18b9c7836bc4c9d3eba78e0717ca // Paper end - Use single player info update packet on join player.sentListPacket = true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 86f74c35a74b3c3a1d04d6be79e0df30642d475a..9b59e7efde0516d55643e8ceb6d94e02ed22aacc 100644 +index 80877e62d0743891f38abeee5b5b04b4f3bc4010..1943cb7b691573d3f9755d21d4b5a4210c1cc329 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -206,6 +206,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -133,7 +133,7 @@ index 86f74c35a74b3c3a1d04d6be79e0df30642d475a..9b59e7efde0516d55643e8ceb6d94e02 private static final WeakHashMap<Plugin, WeakReference<Plugin>> pluginWeakReferences = new WeakHashMap<>(); private int hash = 0; private double health = 20; -@@ -2120,7 +2121,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2122,7 +2123,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { otherPlayer.setUUID(uuidOverride); } // Paper end @@ -142,7 +142,7 @@ index 86f74c35a74b3c3a1d04d6be79e0df30642d475a..9b59e7efde0516d55643e8ceb6d94e02 if (original != null) otherPlayer.setUUID(original); // Paper - uuid override } -@@ -2224,6 +2225,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2226,6 +2227,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it } diff --git a/patches/server/0864-Implement-OfflinePlayer-isConnected.patch b/patches/server/0864-Implement-OfflinePlayer-isConnected.patch index 7c4e1d3536..ebef6c5101 100644 --- a/patches/server/0864-Implement-OfflinePlayer-isConnected.patch +++ b/patches/server/0864-Implement-OfflinePlayer-isConnected.patch @@ -23,7 +23,7 @@ index 2c2c4db31a746b4eb853dc04c6b3e5631bbfa034..4f4e3ee18d586f61706504218cddc06a public String getName() { Player player = this.getPlayer(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 9b59e7efde0516d55643e8ceb6d94e02ed22aacc..4de2a6a04a5bcf635f2bb5da640eb5941183e87c 100644 +index 1943cb7b691573d3f9755d21d4b5a4210c1cc329..3b2d7837486424a2d1759c4ba5d1b1d492e9ec48 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -261,6 +261,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0884-Add-player-idle-duration-API.patch b/patches/server/0884-Add-player-idle-duration-API.patch index 3f3f534dbc..3bf9d659b7 100644 --- a/patches/server/0884-Add-player-idle-duration-API.patch +++ b/patches/server/0884-Add-player-idle-duration-API.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add player idle duration API Implements API for getting and resetting a player's idle duration. diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4de2a6a04a5bcf635f2bb5da640eb5941183e87c..4060a25f414631f702f04a53169b14e2ae6f9e31 100644 +index 3b2d7837486424a2d1759c4ba5d1b1d492e9ec48..b72d6395768a762cd72f2b98bc8cb2598dc286b9 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3447,6 +3447,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3449,6 +3449,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/server/0887-Allow-null-itemstack-for-Player-sendEquipmentChange.patch b/patches/server/0887-Allow-null-itemstack-for-Player-sendEquipmentChange.patch index 272dd0236d..c5594fd831 100644 --- a/patches/server/0887-Allow-null-itemstack-for-Player-sendEquipmentChange.patch +++ b/patches/server/0887-Allow-null-itemstack-for-Player-sendEquipmentChange.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Allow null itemstack for Player#sendEquipmentChange diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 4060a25f414631f702f04a53169b14e2ae6f9e31..a343684b52594c295d5a75b9005da3434b72f329 100644 +index b72d6395768a762cd72f2b98bc8cb2598dc286b9..542c2d85da9695da0f8cc5c34f2e3c0b925dfb7c 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1144,7 +1144,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0907-Add-experience-points-API.patch b/patches/server/0907-Add-experience-points-API.patch index 14c94b5af4..1b8c5e9d3f 100644 --- a/patches/server/0907-Add-experience-points-API.patch +++ b/patches/server/0907-Add-experience-points-API.patch @@ -18,10 +18,10 @@ index aca888c2f02b09ac6739bdc81b194c4527dd69f5..a19a795deaa7f46c92b97912e2ade006 // Paper start - send while respecting visibility private static void sendSoundEffect(Player fromEntity, double x, double y, double z, SoundEvent soundEffect, SoundSource soundCategory, float volume, float pitch) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a343684b52594c295d5a75b9005da3434b72f329..a6b26d33de210e8c5351f3246b9ac391eb688689 100644 +index 542c2d85da9695da0f8cc5c34f2e3c0b925dfb7c..0a3d44ac5bfe252854377011ac363d52991c15ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1949,6 +1949,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1951,6 +1951,49 @@ public class CraftPlayer extends CraftHumanEntity implements Player { Preconditions.checkArgument(exp >= 0, "Total experience points must not be negative (%s)", exp); this.getHandle().totalExperience = exp; } diff --git a/patches/server/0952-Added-API-to-get-player-ha-proxy-address.patch b/patches/server/0952-Added-API-to-get-player-ha-proxy-address.patch index 5fa97c5b54..1871d14810 100644 --- a/patches/server/0952-Added-API-to-get-player-ha-proxy-address.patch +++ b/patches/server/0952-Added-API-to-get-player-ha-proxy-address.patch @@ -35,7 +35,7 @@ index c62df32af11636ad408b584fcc590590ce4fb0d0..baed0bb80d44973f9323bbe536551182 } else { super.channelRead(ctx, msg); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a6b26d33de210e8c5351f3246b9ac391eb688689..7d8465ec67d4b2551c8fbe01964dd0cb2c94cbe8 100644 +index 0a3d44ac5bfe252854377011ac363d52991c15ed..72b9bffb12ef94d029c9502be90fb8c1bd37a4d1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -270,7 +270,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/1020-Add-FeatureFlag-API.patch b/patches/server/1020-Add-FeatureFlag-API.patch index deea8b504e..dc614e582a 100644 --- a/patches/server/1020-Add-FeatureFlag-API.patch +++ b/patches/server/1020-Add-FeatureFlag-API.patch @@ -29,10 +29,10 @@ index 0000000000000000000000000000000000000000..c6fd2e8a570ac474dd1751929137280c +} diff --git a/src/main/java/io/papermc/paper/world/flag/PaperFeatureFlagProviderImpl.java b/src/main/java/io/papermc/paper/world/flag/PaperFeatureFlagProviderImpl.java new file mode 100644 -index 0000000000000000000000000000000000000000..d58b650fcafd04d00a92005ca8576d314535ce32 +index 0000000000000000000000000000000000000000..8a2fb217501bb6293adf54686420ef7d1ce2ec11 --- /dev/null +++ b/src/main/java/io/papermc/paper/world/flag/PaperFeatureFlagProviderImpl.java -@@ -0,0 +1,53 @@ +@@ -0,0 +1,55 @@ +package io.papermc.paper.world.flag; + +import com.google.common.collect.BiMap; @@ -55,8 +55,10 @@ index 0000000000000000000000000000000000000000..d58b650fcafd04d00a92005ca8576d31 + + public static final BiMap<FeatureFlag, net.minecraft.world.flag.FeatureFlag> FLAGS = ImmutableBiMap.of( + FeatureFlag.VANILLA, FeatureFlags.VANILLA, -+ FeatureFlag.BUNDLE, FeatureFlags.BUNDLE, -+ FeatureFlag.TRADE_REBALANCE, FeatureFlags.TRADE_REBALANCE ++ FeatureFlag.TRADE_REBALANCE, FeatureFlags.TRADE_REBALANCE, ++ FeatureFlag.MINECART_IMPROVEMENTS, FeatureFlags.MINECART_IMPROVEMENTS, ++ FeatureFlag.REDSTONE_EXPERIMENTS, FeatureFlags.REDSTONE_EXPERIMENTS, ++ FeatureFlag.WINTER_DROP, FeatureFlags.WINTER_DROP + ); + + @Override diff --git a/patches/server/1028-Improve-entity-effect-API.patch b/patches/server/1028-Improve-entity-effect-API.patch index 2b11b7ac1c..cc5195f74b 100644 --- a/patches/server/1028-Improve-entity-effect-API.patch +++ b/patches/server/1028-Improve-entity-effect-API.patch @@ -25,7 +25,7 @@ index ca95a36b0149d4b8a67c3b42316c5d9d0415f5dd..64c6f54cc4d0c22bc972b808cb92925c + // Paper end - broadcast hurt animation } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 7d8465ec67d4b2551c8fbe01964dd0cb2c94cbe8..40a9f02091e9ae06fae28508c967fe1298419eda 100644 +index 72b9bffb12ef94d029c9502be90fb8c1bd37a4d1..d5dc7ecb9c4dddfd2c92d89b27c15512a0822b08 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -1294,6 +1294,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -49,7 +49,7 @@ index 7d8465ec67d4b2551c8fbe01964dd0cb2c94cbe8..40a9f02091e9ae06fae28508c967fe12 } @Override -@@ -3546,4 +3551,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3548,4 +3553,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setSendViewDistance(final int viewDistance) { throw new UnsupportedOperationException("Not implemented yet"); } |