Moving ATs from the at file to individual patches (#8573)
This commit is contained in:
parent
14d69488ad
commit
b121c04895
72 changed files with 312 additions and 392 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue