Shortcut for withMeta

This commit is contained in:
themode 2021-12-20 20:01:51 +01:00 committed by TheMode
parent 74e00bc70c
commit b8e6d95880

View File

@ -147,7 +147,7 @@ public final class ItemStack implements TagReadable, HoverEventSource<HoverEvent
@ApiStatus.Experimental
@Contract(value = "_ -> new", pure = true)
public @NotNull ItemStack withMeta(@NotNull ItemMeta meta) {
return builder().meta(meta).build();
return new ItemStack(material, amount, meta, stackingRule);
}
@Contract(pure = true)