chore: Added new constructor for Item
This commit is contained in:
parent
a4999dfbf3
commit
06bb607d31
@ -9,6 +9,7 @@ import lombok.Setter;
|
||||
import java.util.Optional;
|
||||
|
||||
@Getter
|
||||
@Setter
|
||||
@AllArgsConstructor
|
||||
public class Item {
|
||||
private String id;
|
||||
@ -23,9 +24,20 @@ public class Item {
|
||||
private int stackAmount = 64;
|
||||
private int addHunger = 0;
|
||||
private int dealDamage = 1;
|
||||
@Setter
|
||||
private Optional<Block> block = Optional.empty();
|
||||
|
||||
public Item(String id, String name, ItemType type, SpriteLoader.SPRITES sprite, ToolVariant toolVariant, int durability, boolean stackable, int dealDamage) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.type = type;
|
||||
this.sprite = sprite;
|
||||
this.toolVariant = Optional.of(toolVariant);
|
||||
this.miningDecrease = miningDecrease;
|
||||
this.durability = durability;
|
||||
this.stackable = stackable;
|
||||
this.dealDamage = dealDamage;
|
||||
}
|
||||
|
||||
public Item(String id, String name, ItemType type, SpriteLoader.SPRITES sprite, ToolVariant toolVariant, double miningDecrease, int durability, boolean stackable) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
|
Loading…
x
Reference in New Issue
Block a user