Skip to content

Commit

Permalink
Deprecate ItemStack#setType & add ItemStack#withType (PaperMC#10290)
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen1212055 authored Apr 12, 2024
1 parent 3263470 commit 4445d23
Show file tree
Hide file tree
Showing 17 changed files with 258 additions and 33 deletions.
20 changes: 17 additions & 3 deletions patches/api/0124-PlayerElytraBoostEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ Subject: [PATCH] PlayerElytraBoostEvent

diff --git a/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java
new file mode 100644
index 0000000000000000000000000000000000000000..42375d44ed0db457b96165414e9b45a557bac1ab
index 0000000000000000000000000000000000000000..9ebac41c22b8866df616020d409e5e1a49cddca5
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/player/PlayerElytraBoostEvent.java
@@ -0,0 +1,90 @@
@@ -0,0 +1,104 @@
+package com.destroystokyo.paper.event.player;
+
+import org.bukkit.entity.Firework;
+import org.bukkit.entity.Player;
+import org.bukkit.event.Cancellable;
+import org.bukkit.event.HandlerList;
+import org.bukkit.event.player.PlayerEvent;
+import org.bukkit.inventory.EquipmentSlot;
+import org.bukkit.inventory.ItemStack;
+import org.jetbrains.annotations.ApiStatus;
+import org.jetbrains.annotations.NotNull;
Expand All @@ -31,14 +32,17 @@ index 0000000000000000000000000000000000000000..42375d44ed0db457b96165414e9b45a5
+ @NotNull private final ItemStack itemStack;
+ @NotNull private final Firework firework;
+ private boolean consume = true;
+ @NotNull
+ private final EquipmentSlot hand;
+
+ private boolean cancelled;
+
+ @ApiStatus.Internal
+ public PlayerElytraBoostEvent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull Firework firework) {
+ public PlayerElytraBoostEvent(@NotNull Player player, @NotNull ItemStack itemStack, @NotNull Firework firework, @NotNull EquipmentSlot hand) {
+ super(player);
+ this.itemStack = itemStack;
+ this.firework = firework;
+ this.hand = hand;
+ }
+
+ /**
Expand Down Expand Up @@ -79,6 +83,16 @@ index 0000000000000000000000000000000000000000..42375d44ed0db457b96165414e9b45a5
+ this.consume = consume;
+ }
+
+ /**
+ * Gets the hand holding the firework used for boosting this player.
+ *
+ * @return interaction hand
+ */
+ @NotNull
+ public EquipmentSlot getHand() {
+ return this.hand;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return this.cancelled;
Expand Down
24 changes: 24 additions & 0 deletions patches/api/0173-Fix-Spigot-annotation-mistakes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -982,6 +982,30 @@ index 8f601e85df580ef8106eaff8b9eafb5691a4874b..d615c006c9153fb65024241604b744fb
public static final MemoryKey<Location> SNIFFER_EXPLORED_POSITIONS = new MemoryKey<>(NamespacedKey.minecraft("sniffer_explored_positions"), Location.class);

/**
diff --git a/src/main/java/org/bukkit/event/block/BrewingStartEvent.java b/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
index 9e54ef5b60bf5583c12e1edfa76f19013a5b2a65..37be83184cae203d5e99518b0ff5c708fafb0331 100644
--- a/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
+++ b/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
@@ -8,6 +8,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Called when a brewing stand starts to brew.
*/
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public class BrewingStartEvent extends InventoryBlockStartEvent {

private static final HandlerList handlers = new HandlerList();
diff --git a/src/main/java/org/bukkit/event/block/CampfireStartEvent.java b/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
index 53119742beda00a38111063243665bb995ae2188..2d084214e991fecc51f8e18e3d733e43b1dca248 100644
--- a/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
+++ b/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
@@ -9,6 +9,7 @@ import org.jetbrains.annotations.NotNull;
/**
* Called when a Campfire starts to cook.
*/
+@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public class CampfireStartEvent extends InventoryBlockStartEvent {

private static final HandlerList handlers = new HandlerList();
diff --git a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java b/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
index e9a6e5be5f33a342f7e5c496f0f1c64b2f302ace..f0db59a556deaefefbdaca121585c0fd199c13c2 100644
--- a/src/main/java/org/bukkit/event/enchantment/PrepareItemEnchantEvent.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ Subject: [PATCH] Fix HandlerList for InventoryBlockStartEvent subclasses


diff --git a/src/main/java/org/bukkit/event/block/BrewingStartEvent.java b/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
index 9e54ef5b60bf5583c12e1edfa76f19013a5b2a65..fe6573d8fca0aa8d8f37f8b476fc45adc786795f 100644
index 37be83184cae203d5e99518b0ff5c708fafb0331..43eac972f45d1cbb6278b048f8e6d7882c0aabeb 100644
--- a/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
+++ b/src/main/java/org/bukkit/event/block/BrewingStartEvent.java
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
*/
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public class BrewingStartEvent extends InventoryBlockStartEvent {

- private static final HandlerList handlers = new HandlerList();
+ // Paper - remove HandlerList
private int brewingTime;

public BrewingStartEvent(@NotNull final Block furnace, @NotNull ItemStack source, int brewingTime) {
@@ -36,14 +36,5 @@ public class BrewingStartEvent extends InventoryBlockStartEvent {
@@ -37,14 +37,5 @@ public class BrewingStartEvent extends InventoryBlockStartEvent {
this.brewingTime = brewTime;
}

Expand All @@ -34,19 +34,19 @@ index 9e54ef5b60bf5583c12e1edfa76f19013a5b2a65..fe6573d8fca0aa8d8f37f8b476fc45ad
+ // Paper - remove HandlerList
}
diff --git a/src/main/java/org/bukkit/event/block/CampfireStartEvent.java b/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
index 53119742beda00a38111063243665bb995ae2188..1f7a8bf65e9ac3188f759f9b3c4d6edbf255942a 100644
index 2d084214e991fecc51f8e18e3d733e43b1dca248..4b12575107b3f1fa6d0ed7f667bf0d0ae40acae0 100644
--- a/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
+++ b/src/main/java/org/bukkit/event/block/CampfireStartEvent.java
@@ -11,7 +11,7 @@ import org.jetbrains.annotations.NotNull;
*/
@@ -12,7 +12,7 @@ import org.jetbrains.annotations.NotNull;
@org.jetbrains.annotations.ApiStatus.Experimental // Paper
public class CampfireStartEvent extends InventoryBlockStartEvent {

- private static final HandlerList handlers = new HandlerList();
+ // Paper - remove HandlerList
private int cookingTime;
private CampfireRecipe campfireRecipe;

@@ -49,14 +49,5 @@ public class CampfireStartEvent extends InventoryBlockStartEvent {
@@ -50,14 +50,5 @@ public class CampfireStartEvent extends InventoryBlockStartEvent {
this.cookingTime = cookTime;
}

Expand Down
54 changes: 54 additions & 0 deletions patches/api/0469-Deprecate-ItemStack-setType.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Owen1212055 <[email protected]>
Date: Thu, 29 Feb 2024 17:54:26 -0500
Subject: [PATCH] Deprecate ItemStack#setType


diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
index 245a730a54c4b241a9a67eccceefafd2763bd238..7414b4fa690d393a8e9557cc1fd1ce12fa426940 100644
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
@@ -134,8 +134,18 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
* {@link Material#isItem()} returns false.</b>
*
* @param type New type to set the items in this stack to
+ * @deprecated <b>Setting the material type of ItemStacks is no longer supported.</b>
+ * <p>
+ * This method is deprecated due to potential illegal behavior that may occur
+ * during the context of which this ItemStack is being used, allowing for certain item validation to be bypassed.
+ * It is recommended to instead create a new ItemStack object with the desired
+ * Material type, and if possible, set it in the appropriate context.
+ *
+ * Using this method in ItemStacks passed in events will result in undefined behavior.
+ * @see ItemStack#withType(Material)
*/
@Utility
+ @Deprecated // Paper
public void setType(@NotNull Material type) {
Preconditions.checkArgument(type != null, "Material cannot be null");
this.type = type;
@@ -148,6 +158,24 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
this.data = null;
}
}
+ // Paper start
+ /**
+ * Creates a new ItemStack with the specified Material type, where the item count and item meta is preserved.
+ *
+ * @param type The Material type of the new ItemStack.
+ * @return A new ItemStack instance with the specified Material type.
+ */
+ @NotNull
+ @org.jetbrains.annotations.Contract(value = "_ -> new", pure = true)
+ public ItemStack withType(@NotNull Material type) {
+ ItemStack itemStack = new ItemStack(type, this.amount);
+ if (this.hasItemMeta()) {
+ itemStack.setItemMeta(this.getItemMeta());
+ }
+
+ return itemStack;
+ }
+ // Paper end

/**
* Gets the amount of items in this stack
50 changes: 50 additions & 0 deletions patches/api/0470-Item-Mutation-Fixes.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Owen1212055 <[email protected]>
Date: Wed, 20 Mar 2024 20:42:31 -0400
Subject: [PATCH] Item Mutation Fixes


diff --git a/src/main/java/org/bukkit/event/block/InventoryBlockStartEvent.java b/src/main/java/org/bukkit/event/block/InventoryBlockStartEvent.java
index f30ed841864f426c59143f392f39c96f864ba924..16fd600c25991e641a1be6fb78238256a6ce3d3f 100644
--- a/src/main/java/org/bukkit/event/block/InventoryBlockStartEvent.java
+++ b/src/main/java/org/bukkit/event/block/InventoryBlockStartEvent.java
@@ -21,7 +21,7 @@ import org.jetbrains.annotations.NotNull;
public class InventoryBlockStartEvent extends BlockEvent {

private static final HandlerList handlers = new HandlerList();
- private final ItemStack source;
+ protected ItemStack source; // Paper

public InventoryBlockStartEvent(@NotNull final Block block, @NotNull ItemStack source) {
super(block);
diff --git a/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java b/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java
index 1829529c9915937dcdd0e6d1ceba9e64819fb93f..e7c243038b70ca13b7eabdf88ce518b6198c6db9 100644
--- a/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java
+++ b/src/main/java/org/bukkit/event/enchantment/EnchantItemEvent.java
@@ -20,7 +20,7 @@ import org.jetbrains.annotations.NotNull;
public class EnchantItemEvent extends InventoryEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
private final Block table;
- private final ItemStack item;
+ private ItemStack item; // Paper
private int level;
private boolean cancelled;
private final Map<Enchantment, Integer> enchants;
@@ -72,6 +72,17 @@ public class EnchantItemEvent extends InventoryEvent implements Cancellable {
return item;
}

+ // Paper start
+ /**
+ * Sets the item to be enchanted
+ *
+ * @param item item
+ */
+ public void setItem(@NotNull final ItemStack item) {
+ this.item = item;
+ }
+ // Paper end
+
/**
* Gets the cost (minimum level) which is displayed as a number on the right
* hand side of the enchantment offer.
8 changes: 6 additions & 2 deletions patches/server/0009-MC-Utils.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7892,10 +7892,10 @@ index ed501b794c222278dca98f8ece6096db1d8108a5..be3a8e54d64b3cc145ab09b0bc7abb3f
+ }
}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index bf46aa3bd46ffabe92d58aa45ea0dfe6c98d94aa..23b83f8e98d681895b4e23cda4f3d50f85c12dd9 100644
index bf46aa3bd46ffabe92d58aa45ea0dfe6c98d94aa..0bb01e53f1c15071c8cd818cce79af8196fe790f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -23,6 +23,16 @@ import org.bukkit.material.MaterialData;
@@ -23,6 +23,20 @@ import org.bukkit.material.MaterialData;
@DelegateDeserialization(ItemStack.class)
public final class CraftItemStack extends ItemStack {

Expand All @@ -7907,6 +7907,10 @@ index bf46aa3bd46ffabe92d58aa45ea0dfe6c98d94aa..23b83f8e98d681895b4e23cda4f3d50f
+ return asNMSCopy(bukkit);
+ }
+ }
+
+ public static net.minecraft.world.item.ItemStack getOrCloneOnMutation(ItemStack old, ItemStack newInstance) {
+ return old == newInstance ? unwrap(old) : asNMSCopy(newInstance);
+ }
+ // Paper end - MC Utils
+
public static net.minecraft.world.item.ItemStack asNMSCopy(ItemStack original) {
Expand Down
8 changes: 4 additions & 4 deletions patches/server/0067-Handle-Item-Meta-Inconsistencies.patch
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ index 6291265ae4691bf7dffe196d20571c1c30e8d906..70511628eefc28163d07f50f18d9cc55

public boolean isEnchanted() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 23b83f8e98d681895b4e23cda4f3d50f85c12dd9..c72a1a503f6e71228a1f82b37068ff7a83e983dc 100644
index 0bb01e53f1c15071c8cd818cce79af8196fe790f..b59e84bbed37b002a34fe81efdce6f025617fc84 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -188,28 +188,11 @@ public final class CraftItemStack extends ItemStack {
@@ -192,28 +192,11 @@ public final class CraftItemStack extends ItemStack {
public void addUnsafeEnchantment(Enchantment ench, int level) {
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");

Expand Down Expand Up @@ -107,7 +107,7 @@ index 23b83f8e98d681895b4e23cda4f3d50f85c12dd9..c72a1a503f6e71228a1f82b37068ff7a
}

static boolean makeTag(net.minecraft.world.item.ItemStack item) {
@@ -242,43 +225,15 @@ public final class CraftItemStack extends ItemStack {
@@ -246,43 +229,15 @@ public final class CraftItemStack extends ItemStack {
public int removeEnchantment(Enchantment ench) {
Preconditions.checkArgument(ench != null, "Enchantment cannot be null");

Expand Down Expand Up @@ -159,7 +159,7 @@ index 23b83f8e98d681895b4e23cda4f3d50f85c12dd9..c72a1a503f6e71228a1f82b37068ff7a

return level;
}
@@ -290,7 +245,7 @@ public final class CraftItemStack extends ItemStack {
@@ -294,7 +249,7 @@ public final class CraftItemStack extends ItemStack {

@Override
public Map<Enchantment, Integer> getEnchantments() {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0193-ItemStack-getMaxItemUseDuration.patch
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
Allows you to determine how long it takes to use a usable/consumable item

diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index c72a1a503f6e71228a1f82b37068ff7a83e983dc..d9a07829d5d0ebcb18b8e3f12622ed7795955d61 100644
index b59e84bbed37b002a34fe81efdce6f025617fc84..78f2159285e676b877f85df604889ddcf19e8923 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -184,6 +184,13 @@ public final class CraftItemStack extends ItemStack {
@@ -188,6 +188,13 @@ public final class CraftItemStack extends ItemStack {
return (this.handle == null) ? Material.AIR.getMaxStackSize() : this.handle.getItem().getMaxStackSize();
}

Expand Down
4 changes: 2 additions & 2 deletions patches/server/0214-PlayerElytraBoostEvent.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] PlayerElytraBoostEvent


diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
index 3749cfca8f007973d1a2206d8f2ba15283a550e1..eb655eb01e4841ca163666f21dae00f0632a11e5 100644
index 7c627d27300247db9122ab2081049345ef306073..4565cf51ee2f973b368a984436c02220ed9f4a70 100644
--- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
+++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java
@@ -68,12 +68,19 @@ public class FireworkRocketItem extends Item {
Expand All @@ -15,7 +15,7 @@ index 3749cfca8f007973d1a2206d8f2ba15283a550e1..eb655eb01e4841ca163666f21dae00f0
- world.addFreshEntity(fireworkRocketEntity);
- if (!user.getAbilities().instabuild) {
+ // Paper start - PlayerElytraBoostEvent
+ com.destroystokyo.paper.event.player.PlayerElytraBoostEvent event = new com.destroystokyo.paper.event.player.PlayerElytraBoostEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack), (org.bukkit.entity.Firework) fireworkRocketEntity.getBukkitEntity());
+ com.destroystokyo.paper.event.player.PlayerElytraBoostEvent event = new com.destroystokyo.paper.event.player.PlayerElytraBoostEvent((org.bukkit.entity.Player) user.getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack), (org.bukkit.entity.Firework) fireworkRocketEntity.getBukkitEntity(), org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand));
+ if (event.callEvent() && world.addFreshEntity(fireworkRocketEntity)) {
+ user.awardStat(Stats.ITEM_USED.get(this));
+ if (event.shouldConsume() && !user.getAbilities().instabuild) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ Returns true if getDamage() == 0 or has damage tag or other tag is set.
Check the `ItemMetaTest#testTaggedButNotMeta` method to see how this method behaves.

diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index d9a07829d5d0ebcb18b8e3f12622ed7795955d61..7ce48473222516aefda3c5ad40e5e3fd23502e3d 100644
index 78f2159285e676b877f85df604889ddcf19e8923..f3195b37c314a1327752ece7ec33dfdae16f0bec 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -675,7 +675,7 @@ public final class CraftItemStack extends ItemStack {
@@ -679,7 +679,7 @@ public final class CraftItemStack extends ItemStack {

@Override
public boolean hasItemMeta() {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0716-More-Projectile-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -568,10 +568,10 @@ index 7d72ccdd82daa6afe85859f5bc6ec7b187622384..fb0426a1d864f3c60637e394e5bedb39
}

diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 7ce48473222516aefda3c5ad40e5e3fd23502e3d..6725c0824b986885c8aade846f6e159986ffbe59 100644
index f3195b37c314a1327752ece7ec33dfdae16f0bec..6b75314023adf313937990e31323dff9bacc564b 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -294,12 +294,20 @@ public final class CraftItemStack extends ItemStack {
@@ -298,12 +298,20 @@ public final class CraftItemStack extends ItemStack {
public ItemMeta getItemMeta() {
return CraftItemStack.getItemMeta(this.handle);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ with less than zero amounts, so this code doesn't create
a problem with operations on the vanilla ItemStack.

diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 6725c0824b986885c8aade846f6e159986ffbe59..312e756843f62371048a4d8de9deb024bd9846a7 100644
index 6b75314023adf313937990e31323dff9bacc564b..fb2e4881096459eff16a7c46faa9921166837ee9 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -157,7 +157,7 @@ public final class CraftItemStack extends ItemStack {
@@ -161,7 +161,7 @@ public final class CraftItemStack extends ItemStack {
}

this.handle.setCount(amount);
Expand Down
Loading

0 comments on commit 4445d23

Please sign in to comment.