aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0202-Add-methods-to-get-translation-keys.patch
diff options
context:
space:
mode:
authorNassim Jahnke <[email protected]>2024-07-18 10:13:20 +0200
committerGitHub <[email protected]>2024-07-18 10:13:20 +0200
commitdd11ef84410f92af07f46adce198ef5078cb54b8 (patch)
tree58f91722ef913b4d4c577e3cbd2a15af5bf7af10 /patches/api/0202-Add-methods-to-get-translation-keys.patch
parent44c3dd0d4c83cbfb8b41270c8d4ef0d1571e3925 (diff)
downloadPaper-dd11ef84410f92af07f46adce198ef5078cb54b8.tar.gz
Paper-dd11ef84410f92af07f46adce198ef5078cb54b8.zip
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#11102)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 3a3bea52 SPIGOT-7829: Increase maximum outgoing plugin message size to match Vanilla intention 5cd1c8cb SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT a8e278f0 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals 53729d12 Remove spurious ApiStatus.Internal annotation b9f57486 SPIGOT-7799, PR-1039: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent 7983b966 PR-1029: Trial changing a small number of inner enums to classes/interfaces to better support custom values CraftBukkit Changes: 403accd56 SPIGOT-7831: Add CreatureSpawnEvent.SpawnReason#POTION_EFFECT 812761660 Increase outdated build delay bed1e3ff6 SPIGOT-7827: Sync EntityPortalEvent with PlayerPortalEvent since non-players can now create portals 2444c8b23 SPIGOT-7823: Suspicious sand and gravel material are not marked as having gravity correctly aceddcd0b SPIGOT-7820: Enum changes - duplicate method name a0d2d6a84 SPIGOT-7813: Material#isInteractable() always returns false 8fd64b091 SPIGOT-7806: Handle both loot and inventory item drop behaviour in PlayerDeathEvent a4ee40b74 SPIGOT-7799, PR-1436: Expose explosion world interaction in EntityExplodeEvent and BlockExplodeEvent 082aa51c5 PR-1424: Trial changing a small number of inner enums to classes/interfaces to better support custom values 66e78a96b SPIGOT-7815: Consider EntityDamageEvent status for Wolf armor damage Spigot Changes: 5bbef5ad SPIGOT-7834: Modify max value for generic.max_absorption
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.patch22
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
}