mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 14:12:20 -07:00
Pretend to fix compile errors
This commit is contained in:
@@ -24,12 +24,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ if (internalStack.isEnchanted()) {
|
||||
+ internalStack.set(net.minecraft.core.component.DataComponents.ENCHANTMENTS, null);
|
||||
+ }
|
||||
+ final net.minecraft.core.RegistryAccess registryAccess = net.minecraft.server.MinecraftServer.getServer().registryAccess();
|
||||
+ final net.minecraft.core.Registry<Enchantment> enchantments = registryAccess.registryOrThrow(Registries.ENCHANTMENT);
|
||||
+ final net.minecraft.world.item.ItemStack enchanted = net.minecraft.world.item.enchantment.EnchantmentHelper.enchantItem(
|
||||
+ MinecraftServer.getServer().getWorldData().enabledFeatures(),
|
||||
+ new org.bukkit.craftbukkit.util.RandomSourceWrapper(random),
|
||||
+ internalStack,
|
||||
+ levels,
|
||||
+ allowTreasure
|
||||
+ enchantments.holders()
|
||||
+ .<net.minecraft.core.Holder<Enchantment>>map(r -> r)
|
||||
+ .filter(r -> allowTreasure || !r.is(EnchantmentTags.TREASURE))
|
||||
+ );
|
||||
+ return CraftItemStack.asCraftMirror(enchanted);
|
||||
+ }
|
||||
|
Reference in New Issue
Block a user