LeviLamina
Loading...
Searching...
No Matches
LeverBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/optional_ref.h"
7#include "mc/world/level/block/BlockType.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
12class Actor;
13class Block;
14class BlockPos;
15class BlockSource;
16class Experiments;
19class Player;
20class Vec3;
21namespace BlockEvents { class BlockPlayerInteractEvent; }
22namespace BlockEvents { class BlockQueuedTickEvent; }
23// clang-format on
24
25class LeverBlock : public ::BlockType {
26public:
27 // virtual functions
28 // NOLINTBEGIN
29 // vIndex: 5
30 virtual ::AABB getCollisionShape(
31 ::Block const&,
33 ::BlockPos const&,
35 ) const /*override*/;
36
37 // vIndex: 11
38 virtual ::AABB const& getVisualShape(::Block const& block, ::AABB& bufferAABB) const /*override*/;
39
40 // vIndex: 136
41 virtual bool isInteractiveBlock() const /*override*/;
42
43 // vIndex: 41
44 virtual bool isLeverBlock() const /*override*/;
45
46 // vIndex: 119
47 virtual bool canSpawnOn(::Actor*) const /*override*/;
48
49 // vIndex: 80
50 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const /*override*/;
51
52 // vIndex: 79
53 virtual bool mayPlace(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
54
55 // vIndex: 92
56 virtual ::Block const&
57 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
58 /*override*/;
59
60 // vIndex: 87
61 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
62 /*override*/;
63
64 // vIndex: 51
65 virtual void onFillBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const /*override*/;
66
67 // vIndex: 94
68 virtual bool isAttachedTo(::BlockSource& region, ::BlockPos const& pos, ::BlockPos& outAttachedTo) const
69 /*override*/;
70
71 // vIndex: 138
72 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
73
74 // vIndex: 131
75 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
76
77 // vIndex: 145
78 virtual void _onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const /*override*/;
79
80 // vIndex: 0
81 virtual ~LeverBlock() /*override*/ = default;
82 // NOLINTEND
83
84public:
85 // member functions
86 // NOLINTBEGIN
87 MCAPI void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
88
89 MCAPI void toggle(::BlockSource& region, ::BlockPos const& pos, ::Player* player) const;
90
91 MCAPI void use(::BlockEvents::BlockPlayerInteractEvent& eventData) const;
92 // NOLINTEND
93
94public:
95 // virtual function thunks
96 // NOLINTBEGIN
97 MCFOLD ::AABB $getCollisionShape(
98 ::Block const&,
100 ::BlockPos const&,
102 ) const;
103
104 MCAPI ::AABB const& $getVisualShape(::Block const& block, ::AABB& bufferAABB) const;
105
106 MCFOLD bool $isInteractiveBlock() const;
107
108 MCFOLD bool $isLeverBlock() const;
109
110 MCFOLD bool $canSpawnOn(::Actor*) const;
111
112 MCFOLD bool $mayPlace(::BlockSource& region, ::BlockPos const& pos, uchar face) const;
113
114 MCFOLD bool $mayPlace(::BlockSource& region, ::BlockPos const& pos) const;
115
116 MCAPI ::Block const& $getPlacementBlock(
117 ::Actor const& by,
118 ::BlockPos const& pos,
119 uchar face,
120 ::Vec3 const& clickPos,
121 int itemValue
122 ) const;
123
124 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
125
126 MCAPI void $onFillBlock(::BlockSource& region, ::BlockPos const& pos, ::Block const& block) const;
127
128 MCAPI bool $isAttachedTo(::BlockSource& region, ::BlockPos const& pos, ::BlockPos& outAttachedTo) const;
129
130 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
131
132 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
133
134 MCAPI void $_onHitByActivatingAttack(::BlockSource& region, ::BlockPos const& pos, ::Actor*) const;
135 // NOLINTEND
136
137public:
138 // vftables
139 // NOLINTBEGIN
140 MCNAPI static void** $vftable();
141 // NOLINTEND
142};
Definition AABB.h:18
Definition Actor.h:102
Definition BlockPlayerInteractEvent.h:17
Definition BlockQueuedTickEvent.h:16
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition BlockType.h:84
Definition Block.h:37
Definition Experiments.h:14
Definition GetCollisionShapeInterface.h:13
Definition IConstBlockSource.h:24
Definition LeverBlock.h:25
static MCAPI void ** $vftable()
Definition Player.h:123
Definition Vec3.h:10
Definition optional_ref.h:10