diff options
Diffstat (limited to 'patches/api/0202-Add-methods-to-get-translation-keys.patch')
-rw-r--r-- | patches/api/0202-Add-methods-to-get-translation-keys.patch | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/patches/api/0202-Add-methods-to-get-translation-keys.patch b/patches/api/0202-Add-methods-to-get-translation-keys.patch index fa62b17b92..0cc7a454f5 100644 --- a/patches/api/0202-Add-methods-to-get-translation-keys.patch +++ b/patches/api/0202-Add-methods-to-get-translation-keys.patch @@ -420,27 +420,27 @@ index d248069adfc67eb840951f7ab4a1fa5d30214dec..976f701ed9b9873945a5628173c580e2 * Gets if this EntityType is enabled by feature in a world. * diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java -index 49db82ceff5e2c5f6414045648d68bd384c857c8..b3957b3ff64f35fdeb2daa2ed1fb34fd65e24693 100644 +index d839630d7b2e51629e52edf24e7c6dd86b5f58f6..0759f66986cec2c7e3f765aaa5b1654b5ed9f4b5 100644 --- a/src/main/java/org/bukkit/entity/Villager.java +++ b/src/main/java/org/bukkit/entity/Villager.java -@@ -160,7 +160,7 @@ public interface Villager extends AbstractVillager { +@@ -185,7 +185,7 @@ public interface Villager extends AbstractVillager { * Represents the various different Villager professions there may be. * Villagers have different trading options depending on their profession, */ -- public enum Profession implements Keyed { -+ public enum Profession implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - NONE, +- interface Profession extends OldEnum<Profession>, Keyed { ++ interface Profession extends OldEnum<Profession>, Keyed, net.kyori.adventure.translation.Translatable { + + Profession NONE = getProfession("none"); /** - * Armorer profession. Wears a black apron. Armorers primarily trade for -@@ -243,6 +243,13 @@ public interface Villager extends AbstractVillager { - public NamespacedKey getKey() { - return key; +@@ -290,6 +290,13 @@ public interface Villager extends AbstractVillager { + static Profession[] values() { + return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]); } + + // Paper start + @Override -+ public @NotNull String translationKey() { -+ return "entity.minecraft.villager." + this.key.getKey(); ++ default @NotNull String translationKey() { ++ return "entity.minecraft.villager." + this.getKey().getKey(); + } + // Paper end } |