Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
Connection.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/container/EnumSet.h"
7#include "mc/world/level/block/traits/block_trait/ITrait.h"
8
9// auto generated forward declare list
10// clang-format off
11class Block;
12class BlockPos;
13class BlockType;
14class CompoundTag;
17namespace cereal { struct ReflectionCtx; }
18// clang-format on
19
20namespace BlockTrait {
21
23public:
24 // Connection inner types declare
25 // clang-format off
27 // clang-format on
28
29 // Connection inner types define
30 enum class EnabledConnectionStates : int {
31 Cardinal = 0,
32 Vertical = 1,
33 Count = 2,
34 };
35
36 enum class Type : int {
37 Standard = 0,
38 };
39
41 public:
42 // member variables
43 // NOLINTBEGIN
44 ::ll::TypedStorage<1, 1, ::Bedrock::EnumSet<::BlockTrait::Connection::EnabledConnectionStates, 2>> mStates;
45 // NOLINTEND
46 };
47
48public:
49 // member variables
50 // NOLINTBEGIN
51 ::ll::TypedStorage<4, 4, int> mUpdateFlags;
52 ::ll::TypedStorage<4, 4, ::BlockTrait::Connection::Type> mType;
53 ::ll::TypedStorage<1, 1, ::BlockTrait::Connection::EnabledConnectionStatesContainer> mEnabledConnectionStates;
54 // NOLINTEND
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59 virtual ~Connection() /*override*/ = default;
60
61 virtual void applyToBlockType(::BlockType& blockType) const /*override*/;
62
63 virtual void initializeFromNetwork(::CompoundTag const& compoundTag, ::cereal::ReflectionCtx const&) /*override*/;
64
65 virtual ::std::unique_ptr<::CompoundTag> _buildNetworkTag(::cereal::ReflectionCtx const&) const /*override*/;
66
67 virtual ::std::string const& _getName() const /*override*/;
68 // NOLINTEND
69
70public:
71 // static functions
72 // NOLINTBEGIN
74 ::BlockType& blockType,
75 ::NeighborBlockDirections enabledDirections,
76 ::Block const& (*updateFunction)(
77 ::IConstBlockSource const&,
78 ::Block const&,
79 ::BlockPos const&,
81 ),
82 int updateFlags
83 );
84
86 ::IConstBlockSource const& region,
87 ::Block const& block,
88 ::BlockPos const& pos,
89 ::NeighborBlockDirections directionsToCheck
90 );
91 // NOLINTEND
92
93public:
94 // virtual function thunks
95 // NOLINTBEGIN
96 MCNAPI void $applyToBlockType(::BlockType& blockType) const;
97
98 MCNAPI void $initializeFromNetwork(::CompoundTag const& compoundTag, ::cereal::ReflectionCtx const&);
99
100 MCNAPI ::std::unique_ptr<::CompoundTag> $_buildNetworkTag(::cereal::ReflectionCtx const&) const;
101
102 MCNAPI ::std::string const& $_getName() const;
103
104
105 // NOLINTEND
106
107public:
108 // vftables
109 // NOLINTBEGIN
110 MCNAPI static void** $vftable();
111 // NOLINTEND
112};
113
114} // namespace BlockTrait
Definition BlockPos.h:14
Definition Connection.h:22
static MCAPI ::NeighborBlockDirections getConnectedDirections(::IConstBlockSource const &region, ::Block const &block, ::BlockPos const &pos, ::NeighborBlockDirections directionsToCheck)
MCAPI ::std::unique_ptr<::CompoundTag > $_buildNetworkTag(::cereal::ReflectionCtx const &) const
MCAPI::std::string const & $_getName() const
MCAPI void $initializeFromNetwork(::CompoundTag const &compoundTag, ::cereal::ReflectionCtx const &)
static MCAPI void ** $vftable()
MCAPI void $applyToBlockType(::BlockType &blockType) const
static MCAPI void applyCustomConnectionToBlockType(::BlockType &blockType, ::NeighborBlockDirections enabledDirections, ::Block const &(*updateFunction)(::IConstBlockSource const &, ::Block const &, ::BlockPos const &, ::NeighborBlockDirections), int updateFlags)
Definition ITrait.h:14
Definition BlockType.h:79
Definition Block.h:42
Definition CompoundTag.h:18
Definition IConstBlockSource.h:25
Definition NeighborBlockDirections.h:14
STL namespace.
Definition ReflectionCtx.h:11