Lodestone.Level
Loading...
Searching...
No Matches
Item.h
Go to the documentation of this file.
1//
2// Created by DexrnZacAttack on 11/14/25 using zPc-i2.
3//
4#ifndef LODESTONE_ITEM_H
5#define LODESTONE_ITEM_H
6#include <format>
7#include <string>
8
10
11
12
14
16 class Block;
17}
18
19namespace lodestone::level::item {
20 // cant wait to make io for this mmmmm
22 public:
23 explicit constexpr Item(
25 const int maxStack = 64)
26 : m_id(id), m_maxStack(maxStack), m_definition(definition) {};
27
28 constexpr ~Item() override = default;
29
31 return m_id;
32 };
33
34 constexpr std::string getIDString() const { return m_id->getString(); };
35
36 std::string toString() const override {
37 return std::format("Item[id={}]", *m_id);
38 };
39
40 constexpr int getMaxStack() const { return m_maxStack; }
41
42 private:
44 const int m_maxStack;
45
47 };
48} // namespace lodestone::level::item
49
50#endif // LODESTONE_ITEM_H
Definition Block.h:18
std::string toString() const override
Definition Item.h:36
constexpr Item(const lodestone::common::registry::Identifier *id, const properties::definition::ObjectDefinition *definition, const int maxStack=64)
Definition Item.h:23
constexpr ~Item() override=default
const lodestone::common::registry::Identifier * m_id
Definition Item.h:43
constexpr int getMaxStack() const
Definition Item.h:40
const int m_maxStack
Definition Item.h:44
constexpr std::string getIDString() const
Definition Item.h:34
constexpr const lodestone::common::registry::Identifier * getID() const
Definition Item.h:30
Definition Block.cpp:6
Definition BlockItem.cpp:6