Botcraft 26.3
Loading...
Searching...
No Matches
ItemAttributeModifiersDisplay.cpp
Go to the documentation of this file.
1#if PROTOCOL_VERSION > 770 /* > 1.21.5 */
3
5
9
10namespace ProtocolCraft
11{
12 namespace Components
13 {
17
19 {
20 switch (type)
21 {
23 return std::make_shared<DefaultDisplay>();
25 return std::make_shared<HiddenDisplay>();
27 return std::make_shared<OverrideDisplay>();
28 default:
29 // This should not happen
30 throw std::runtime_error("Unable to create ItemAttributeModifiersDisplayData with id: " + std::to_string(static_cast<int>(type)) + ".");
31 return nullptr;
32 }
33 }
34
36 }
37}
38#endif
#define DEFINE_NETWORK_TYPE(ClassName)
static std::shared_ptr< ItemAttributeModifiersDisplayData > CreateItemAttributeModifiersDisplayData(const ItemAttributeModifiersDisplayType type)