LeviLamina
Loading...
Searching...
No Matches
ElementBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/BlockType.h"
7#include "mc/world/level/block/ElementType.h"
8
9// auto generated forward declare list
10// clang-format off
11class BaseGameVersion;
12class Block;
13class BlockPos;
14class BlockSource;
15class ItemInstance;
16class ItemStackBase;
18struct ElementInfo;
19namespace mce { class Color; }
20// clang-format on
21
22class ElementBlock : public ::BlockType {
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<1, 1, ::ElementType> mType;
27 // NOLINTEND
28
29public:
30 // prevent constructor by default
31 ElementBlock();
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 virtual ::mce::Color getMapColor(::BlockSource& block, ::BlockPos const&, ::Block const&) const /*override*/;
37
38 virtual ::std::string buildDescriptionId(::Block const& block) const /*override*/;
39
40 virtual bool canBeUsedInCommands(::BaseGameVersion const& baseGameVersion) const /*override*/;
41
42 virtual ::Block const* tryLegacyUpgrade(ushort extraData) const /*override*/;
43 // NOLINTEND
44
45public:
46 // member functions
47 // NOLINTBEGIN
48 MCAPI ElementBlock(::std::string const& nameId, int id, ::ElementType type);
49 // NOLINTEND
50
51public:
52 // static functions
53 // NOLINTBEGIN
54#ifdef LL_PLAT_C
55 MCAPI static ::ElementType getElement(::ItemStackBase const& item);
56#endif
57
58 MCAPI static ::ElementInfo getElementInfo(::ElementType e);
59
60 MCAPI static ::std::string getElementName(::ElementType e);
61
62 MCAPI static ::RecipeIngredient getIngredientForElement(::ElementType e, int stackCount);
63
64 MCAPI static ::ItemInstance getItemForElement(::ElementType e, int stackCount);
65
66 MCAPI static void initElements();
67
68 MCAPI static bool isElement(::ItemStackBase const& item);
69
70 MCAPI static void shutdownElements();
71
72 MCAPI static ::BlockType const* tryGetBlockTypeForElement(::ElementType e);
73 // NOLINTEND
74
75public:
76 // static variables
77 // NOLINTBEGIN
78 MCAPI static ::std::vector<::BlockType const*>& mElements();
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84 MCAPI void* $ctor(::std::string const& nameId, int id, ::ElementType type);
85 // NOLINTEND
86
87public:
88 // virtual function thunks
89 // NOLINTBEGIN
90 MCAPI ::mce::Color $getMapColor(::BlockSource& block, ::BlockPos const&, ::Block const&) const;
91
92 MCAPI ::std::string $buildDescriptionId(::Block const& block) const;
93
94 MCFOLD bool $canBeUsedInCommands(::BaseGameVersion const& baseGameVersion) const;
95
96 MCAPI ::Block const* $tryLegacyUpgrade(ushort extraData) const;
97
98
99 // NOLINTEND
100
101public:
102 // vftables
103 // NOLINTBEGIN
104 MCAPI static void** $vftable();
105 // NOLINTEND
106};
Definition BaseGameVersion.h:13
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition ItemInstance.h:15
Definition ItemStackBase.h:52
Definition RecipeIngredient.h:16
Definition Color.h:13
Definition ElementInfo.h:8