diff options
Diffstat (limited to 'patches/server/0559-More-Enchantment-API.patch')
-rw-r--r-- | patches/server/0559-More-Enchantment-API.patch | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/patches/server/0559-More-Enchantment-API.patch b/patches/server/0559-More-Enchantment-API.patch index 826f3c58ee..e5f8796fac 100644 --- a/patches/server/0559-More-Enchantment-API.patch +++ b/patches/server/0559-More-Enchantment-API.patch @@ -9,7 +9,7 @@ public net.minecraft.world.item.enchantment.Enchantment slots Co-authored-by: Luis <[email protected]> diff --git a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java -index 7aa4035a4df1ddcc71065034eafd569ca59be810..5b7579395e61684592758f408d61cffe57f8b21d 100644 +index 3feaaca5aaee12e48fa2e5f5d05329c9980b161e..a151b5d7c6e41b08e57c806bc43e067af48263ed 100644 --- a/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java +++ b/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java @@ -81,7 +81,7 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine @@ -78,14 +78,15 @@ index 7aa4035a4df1ddcc71065034eafd569ca59be810..5b7579395e61684592758f408d61cffe @Override diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index c95c0580e0c3afe9730a1c3f2095b7970e7cc001..aab6948060d8870729690449064b34e1b01c925e 100644 +index 9c37509faeeaf11645dbfc6ddb2eac6aac7b3c59..18f2775d6417f775d6ebb6560450c05e63e3299d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -@@ -978,5 +978,21 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { - public void setHurtDirection(float hurtDirection) { +@@ -1010,4 +1010,22 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { throw new UnsupportedOperationException("Cannot set the hurt direction on a non player"); } + // Paper end - hurt direction API + ++ // Paper start - more enchant API + public static MobType fromBukkitEntityCategory(EntityCategory entityCategory) { + switch (entityCategory) { + case NONE: @@ -101,7 +102,7 @@ index c95c0580e0c3afe9730a1c3f2095b7970e7cc001..aab6948060d8870729690449064b34e1 + } + throw new IllegalArgumentException(entityCategory + " is an unrecognized entity category"); + } - // Paper end ++ // Paper end - more enchant API } diff --git a/src/test/java/io/papermc/paper/enchantments/EnchantmentRarityTest.java b/src/test/java/io/papermc/paper/enchantments/EnchantmentRarityTest.java new file mode 100644 |