mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-03 23:07:40 +01:00
Fix ItemMeta#removeEnchantments (#10886)
This commit is contained in:
parent
87f8c7ca9b
commit
4c472e3401
@ -9,6 +9,8 @@ public net/minecraft/world/food/FoodProperties DEFAULT_EAT_SECONDS
|
|||||||
public org/bukkit/craftbukkit/block/CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState;
|
public org/bukkit/craftbukkit/block/CraftBlockStates getBlockState(Lorg/bukkit/World;Lnet/minecraft/core/BlockPos;Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/block/entity/BlockEntity;)Lorg/bukkit/craftbukkit/block/CraftBlockState;
|
||||||
public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/nbt/CompoundTag;)V
|
public net/minecraft/world/level/block/entity/BlockEntity saveId(Lnet/minecraft/nbt/CompoundTag;)V
|
||||||
|
|
||||||
|
Co-authored-by: GhastCraftHD <julius.gruenberg@leghast.de>
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||||
@ -895,6 +897,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null;
|
this.lore = lore != null ? io.papermc.paper.adventure.PaperAdventure.asVanilla(lore) : null;
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
|
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
|
@Override
|
||||||
|
public void removeEnchantments() {
|
||||||
|
if (this.hasEnchants()) {
|
||||||
|
- this.enchantments.clear();
|
||||||
|
+ this.enchantments = null; // Paper - Correctly clear enchantments
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
@@ -0,0 +0,0 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||||
// Paper end
|
// Paper end
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user