Better use of ItemStack#of

This commit is contained in:
themode 2021-04-02 23:41:06 +02:00
parent 255ccf8ad5
commit d3fb364a7a
2 changed files with 3 additions and 3 deletions

View File

@ -60,7 +60,7 @@ public class Advancement {
public Advancement(@NotNull JsonMessage title, @NotNull JsonMessage description,
@NotNull Material icon, @NotNull FrameType frameType,
float x, float y) {
this(title, description, ItemStack.of(icon, 1), frameType, x, y);
this(title, description, ItemStack.of(icon), frameType, x, y);
}
public Advancement(@NotNull Component title, Component description,
@ -77,7 +77,7 @@ public class Advancement {
public Advancement(@NotNull Component title, @NotNull Component description,
@NotNull Material icon, @NotNull FrameType frameType,
float x, float y) {
this(title, description, ItemStack.of(icon, 1), frameType, x, y);
this(title, description, ItemStack.of(icon), frameType, x, y);
}
/**

View File

@ -13,7 +13,7 @@ class ItemContainingMeta extends EntityMeta {
protected ItemContainingMeta(@NotNull Entity entity, @NotNull Metadata metadata, @NotNull Material defaultItemMaterial) {
super(entity, metadata);
this.defaultItem = ItemStack.of(defaultItemMaterial, 1);
this.defaultItem = ItemStack.of(defaultItemMaterial);
}
@NotNull