From 06bb607d313f576da714a69ba1be4d61ff940ea2 Mon Sep 17 00:00:00 2001
From: jzitnik-dev <email@jzitnik.dev>
Date: Sun, 2 Mar 2025 13:59:02 +0100
Subject: [PATCH] chore: Added new constructor for Item

---
 .../java/cz/jzitnik/game/entities/items/Item.java  | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/src/main/java/cz/jzitnik/game/entities/items/Item.java b/src/main/java/cz/jzitnik/game/entities/items/Item.java
index 2c6ad18..c9e3d20 100644
--- a/src/main/java/cz/jzitnik/game/entities/items/Item.java
+++ b/src/main/java/cz/jzitnik/game/entities/items/Item.java
@@ -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;