Compiler issues v2

This commit is contained in:
Bjarne Koll 2024-10-25 13:52:04 +02:00
parent 0f011a31b1
commit 6fb86bb20a
No known key found for this signature in database
GPG key ID: 27F6CCCF55D2EE62
364 changed files with 151 additions and 165 deletions

View file

@ -5,7 +5,7 @@ Subject: [PATCH] Implement enchantWithLevels API
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 237df8b37ee8cf5b15e8e6d30fa3b51ef394434d..944dcc1126c947b4c8c3b4fdd174eb57320abbba 100644
index ad86ee4372e55c82968fd4fc6a65debab0092028..d9eec6cff3c7c6515f4d61bf1063e7d609d4bcb3 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -305,4 +305,47 @@ public final class CraftItemFactory implements ItemFactory {
@ -24,7 +24,7 @@ index 237df8b37ee8cf5b15e8e6d30fa3b51ef394434d..944dcc1126c947b4c8c3b4fdd174eb57
+ // NON_TREASURE, which does contain all enchantments not in the treasure tag.
+ // Additionally, the allowTreasure boolean is more intended to configure this method to behave like
+ // an enchanting table.
+ : net.minecraft.server.MinecraftServer.getServer().registryAccess().registryOrThrow(Registries.ENCHANTMENT).getTag(EnchantmentTags.IN_ENCHANTING_TABLE),
+ : net.minecraft.server.MinecraftServer.getServer().registryAccess().lookupOrThrow(Registries.ENCHANTMENT).get(EnchantmentTags.IN_ENCHANTING_TABLE),
+ random
+ );
+ }