Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ItemDynamicPropertiesHelper.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
8class ItemStackBase;
9class Vec3;
10namespace cereal { struct ReflectionCtx; }
11// clang-format on
12
13namespace ItemDynamicPropertiesHelper {
14// functions
15// NOLINTBEGIN
16MCNAPI bool clearAllDynamicProperties(::ItemStackBase& item, ::std::string const& collection);
17
18MCNAPI ::std::unique_ptr<::DynamicProperties>
19getDynamicProperties(::ItemStackBase const& item, ::cereal::ReflectionCtx const& ctx);
20
21MCNAPI ::std::optional<::std::variant<double, float, bool, ::std::string, ::Vec3>> getDynamicProperty(
22 ::ItemStackBase const& item,
23 ::std::string const& key,
24 ::std::string const& collectionName,
25 ::cereal::ReflectionCtx const& ctx
26);
27
28MCNAPI bool removeDynamicProperty(::ItemStackBase& item, ::std::string const& key, ::std::string const& collectionName);
29
30MCNAPI void setDynamicProperty(
31 ::ItemStackBase& item,
32 ::std::string const& key,
33 ::std::variant<double, float, bool, ::std::string, ::Vec3> const& value,
34 ::std::string const& collectionName,
35 ::cereal::ReflectionCtx const& ctx
36);
37// NOLINTEND
38
39} // namespace ItemDynamicPropertiesHelper
Definition DynamicProperties.h:16
Definition ItemStackBase.h:45
Definition Vec3.h:10
Definition ReflectionCtx.h:11