mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-04 22:22:18 -07:00
Moving ATs from the at file to individual patches (#8573)
This commit is contained in:
@@ -20,8 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ Validate.isTrue(levels > 0 && levels <= 30, "Argument 'levels' must be in range [1, 30] (attempted " + levels + ")");
|
||||
+ Validate.notNull(random, "Argument 'random' must not be null");
|
||||
+ final net.minecraft.world.item.ItemStack internalStack = CraftItemStack.asNMSCopy(itemStack);
|
||||
+ if (internalStack.tag != null) {
|
||||
+ internalStack.tag.remove(net.minecraft.world.item.ItemStack.TAG_ENCH);
|
||||
+ if (internalStack.getTag() != null) {
|
||||
+ internalStack.getTag().remove(net.minecraft.world.item.ItemStack.TAG_ENCH);
|
||||
+ }
|
||||
+ final net.minecraft.world.item.ItemStack enchanted = net.minecraft.world.item.enchantment.EnchantmentHelper.enchantItem(new org.bukkit.craftbukkit.util.RandomSourceWrapper(random), internalStack, levels, allowTreasure);
|
||||
+ return CraftItemStack.asCraftMirror(enchanted);
|
||||
|
Reference in New Issue
Block a user