address my own comments
This commit is contained in:
parent
2d89c1f53e
commit
a404f4b9ab
4 changed files with 21 additions and 10 deletions
|
@ -22,7 +22,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||
+ Preconditions.checkArgument(random != null, "Argument 'random' must not be null");
|
||||
+ final net.minecraft.world.item.ItemStack internalStack = CraftItemStack.asNMSCopy(itemStack);
|
||||
+ if (internalStack.isEnchanted()) {
|
||||
+ internalStack.applyComponents(net.minecraft.core.component.DataComponentPatch.builder().remove(net.minecraft.core.component.DataComponents.ENCHANTMENTS).build());
|
||||
+ internalStack.set(net.minecraft.core.component.DataComponents.ENCHANTMENTS, null);
|
||||
+ }
|
||||
+ final net.minecraft.world.item.ItemStack enchanted = net.minecraft.world.item.enchantment.EnchantmentHelper.enchantItem(
|
||||
+ MinecraftServer.getServer().getWorldData().enabledFeatures(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue