From 645afb11f76e9f7fdcd6012c60ff1e6a24161f4a Mon Sep 17 00:00:00 2001 From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Sat, 23 Sep 2023 13:38:46 +0200 Subject: [PATCH] fix test --- patches/api/Add-Mob-Goal-API.patch | 16 +++++++++++++--- patches/api/More-PotionEffectType-API.patch | 9 +++++++++ .../Add-methods-to-get-translation-keys.patch | 2 +- ...dded-missing-default-perms-for-commands.patch | 1 + 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/patches/api/Add-Mob-Goal-API.patch b/patches/api/Add-Mob-Goal-API.patch index fe6223c411..a4bde5ed94 100644 --- a/patches/api/Add-Mob-Goal-API.patch +++ b/patches/api/Add-Mob-Goal-API.patch @@ -357,7 +357,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + GoalKey POLAR_BEAR_MELEE_ATTACK = GoalKey.of(PolarBear.class, NamespacedKey.minecraft("polar_bear_melee_attack")); + GoalKey POLAR_BEAR_PANIC = GoalKey.of(PolarBear.class, NamespacedKey.minecraft("polar_bear_panic")); + GoalKey PUFFERFISH_PUFF = GoalKey.of(PufferFish.class, NamespacedKey.minecraft("pufferfish_puff")); -+ GoalKey EVIL_RABBIT_ATTACK = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("evil_rabbit_attack")); + GoalKey RABBIT_AVOID_ENTITY = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("rabbit_avoid_entity")); + GoalKey RABBIT_PANIC = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("rabbit_panic")); + GoalKey RAID_GARDEN = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("raid_garden")); @@ -403,7 +402,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + GoalKey PHANTOM_ATTACK_STRATEGY = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_attack_strategy")); + GoalKey PHANTOM_CIRCLE_AROUND_ANCHOR = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_circle_around_anchor")); + GoalKey PHANTOM_SWEEP_ATTACK = GoalKey.of(Phantom.class, NamespacedKey.minecraft("phantom_sweep_attack")); -+ GoalKey RAVAGER_MELEE_ATTACK = GoalKey.of(Ravager.class, NamespacedKey.minecraft("ravager_melee_attack")); + GoalKey SHULKER_ATTACK = GoalKey.of(Shulker.class, NamespacedKey.minecraft("shulker_attack")); + GoalKey SHULKER_DEFENSE_ATTACK = GoalKey.of(Shulker.class, NamespacedKey.minecraft("shulker_defense_attack")); + GoalKey SHULKER_NEAREST_ATTACK = GoalKey.of(Shulker.class, NamespacedKey.minecraft("shulker_nearest_attack")); @@ -423,7 +421,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + GoalKey VEX_RANDOM_MOVE = GoalKey.of(Vex.class, NamespacedKey.minecraft("vex_random_move")); + GoalKey VINDICATOR_BREAK_DOOR = GoalKey.of(Mob.class, NamespacedKey.minecraft("vindicator_break_door")); + GoalKey VINDICATOR_JOHNNY_ATTACK = GoalKey.of(Vindicator.class, NamespacedKey.minecraft("vindicator_johnny_attack")); -+ GoalKey VINDICATOR_MELEE_ATTACK = GoalKey.of(Vindicator.class, NamespacedKey.minecraft("vindicator_melee_attack")); + GoalKey ZOMBIE_ATTACK_TURTLE_EGG = GoalKey.of(Zombie.class, NamespacedKey.minecraft("zombie_attack_turtle_egg")); + GoalKey WANDER_TO_POSITION = GoalKey.of(WanderingTrader.class, NamespacedKey.minecraft("wander_to_position")); + GoalKey HOLD_GROUND_ATTACK = GoalKey.of(Raider.class, NamespacedKey.minecraft("hold_ground_attack")); @@ -435,6 +432,19 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + GoalKey WOLF_PANIC = GoalKey.of(Wolf.class, NamespacedKey.minecraft("wolf_panic")); + + /** ++ * @deprecated removed in 1.20.2 ++ */ ++ @Deprecated GoalKey VINDICATOR_MELEE_ATTACK = GoalKey.of(Vindicator.class, NamespacedKey.minecraft("vindicator_melee_attack")); ++ /** ++ * @deprecated removed in 1.20.2 ++ */ ++ @Deprecated GoalKey RAVAGER_MELEE_ATTACK = GoalKey.of(Ravager.class, NamespacedKey.minecraft("ravager_melee_attack")); ++ /** ++ * @deprecated removed in 1.20.2 ++ */ ++ @Deprecated GoalKey EVIL_RABBIT_ATTACK = GoalKey.of(Rabbit.class, NamespacedKey.minecraft("evil_rabbit_attack")); ++ ++ /** + * @deprecated removed in 1.16 + */ + @Deprecated(forRemoval = true) @ApiStatus.ScheduledForRemoval(inVersion = "1.21") GoalKey ANGER = GoalKey.of(PigZombie.class, NamespacedKey.minecraft("anger")); diff --git a/patches/api/More-PotionEffectType-API.patch b/patches/api/More-PotionEffectType-API.patch index efb7562f4d..0720960710 100644 --- a/patches/api/More-PotionEffectType-API.patch +++ b/patches/api/More-PotionEffectType-API.patch @@ -114,6 +114,15 @@ diff --git a/src/main/java/org/bukkit/potion/PotionEffectTypeWrapper.java b/src/ index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/potion/PotionEffectTypeWrapper.java +++ b/src/main/java/org/bukkit/potion/PotionEffectTypeWrapper.java +@@ -0,0 +0,0 @@ public class PotionEffectTypeWrapper extends PotionEffectType { + */ + @NotNull + public PotionEffectType getType() { +- return PotionEffectType.getByKey(getKey()); ++ return PotionEffectType.getByKey(super.getKey()); // Paper + } + + @Override @@ -0,0 +0,0 @@ public class PotionEffectTypeWrapper extends PotionEffectType { public Color getColor() { return getType().getColor(); diff --git a/patches/server/Add-methods-to-get-translation-keys.patch b/patches/server/Add-methods-to-get-translation-keys.patch index 18211a9c0b..565751466b 100644 --- a/patches/server/Add-methods-to-get-translation-keys.patch +++ b/patches/server/Add-methods-to-get-translation-keys.patch @@ -95,7 +95,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + @Test + public void testAttributeKeys() { + for (Attribute attribute : Attribute.values()) { -+ Assert.assertEquals("translation key mismatch for " + attribute, org.bukkit.craftbukkit.attribute.CraftAttributeMap.toMinecraft(attribute).getDescriptionId(), attribute.translationKey()); ++ Assert.assertEquals("translation key mismatch for " + attribute, org.bukkit.craftbukkit.attribute.CraftAttribute.bukkitToMinecraft(attribute).getDescriptionId(), attribute.translationKey()); + } + } + diff --git a/patches/server/Added-missing-default-perms-for-commands.patch b/patches/server/Added-missing-default-perms-for-commands.patch index 657485209b..7926bcf618 100644 --- a/patches/server/Added-missing-default-perms-for-commands.patch +++ b/patches/server/Added-missing-default-perms-for-commands.patch @@ -79,6 +79,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "worldborder", "Allows the user to manage the world border", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "place", "Allows the user to place features and structures", PermissionDefault.OP, commands); + DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "return", "Allows the user to use the /return command", PermissionDefault.OP, commands); ++ DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "random", "Allows the user to generate a random number", PermissionDefault.OP, commands); + // Paper end DefaultPermissions.registerPermission("minecraft.admin.command_feedback", "Receive command broadcasts when sendCommandFeedback is true", PermissionDefault.OP, commands);