LeviLamina
Loading...
Searching...
No Matches
PistonBlock.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/Direction.h"
7#include "mc/world/level/block/ActorBlockBase.h"
8#include "mc/world/level/block/BlockSupportType.h"
9
10// auto generated forward declare list
11// clang-format off
12class Actor;
13class BaseGameVersion;
14class Block;
15class BlockLegacy;
16class BlockPos;
17class BlockSource;
18class Experiments;
20class Vec3;
21namespace BlockEvents { class BlockPlaceEvent; }
22namespace BlockEvents { class BlockQueuedTickEvent; }
23// clang-format on
24
25class PistonBlock : public ::ActorBlock {
26public:
27 // PistonBlock inner types define
28 enum class Type : int {
29 Normal = 0,
30 Sticky = 1,
31 };
32
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<4, 4, ::PistonBlock::Type> mType;
37 // NOLINTEND
38
39public:
40 // virtual functions
41 // NOLINTBEGIN
42 // vIndex: 67
43 virtual void setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
44
45 // vIndex: 92
46 virtual ::Block const&
47 getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue) const
48 /*override*/;
49
50 // vIndex: 61
51 virtual void onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const
52 /*override*/;
53
54 // vIndex: 23
55 virtual bool canProvideSupport(::Block const&, uchar, ::BlockSupportType) const /*override*/;
56
57 // vIndex: 87
58 virtual void neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const
59 /*override*/;
60
61 // vIndex: 88
62 virtual bool getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const
63 /*override*/;
64
65 // vIndex: 54
66 virtual bool
67 shouldConnectToRedstone(::BlockSource& region, ::BlockPos const& pos, ::Direction::Type direction) const
68 /*override*/;
69
70 // vIndex: 48
71 virtual bool isValidAuxValue(int value) const /*override*/;
72
73 // vIndex: 142
74 virtual bool canSurvive(::BlockSource& region, ::BlockPos const& pos) const /*override*/;
75
76 // vIndex: 118
77 virtual int getVariant(::Block const& block) const /*override*/;
78
79 // vIndex: 121
80 virtual uchar getMappedFace(uchar face, ::Block const& block) const /*override*/;
81
82 // vIndex: 84
83 virtual bool breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const /*override*/;
84
85 // vIndex: 103
86 virtual bool pushesUpFallingBlocks() const /*override*/;
87
88 // vIndex: 131
89 virtual void _addHardCodedBlockComponents(::Experiments const&) /*override*/;
90
91 // vIndex: 0
92 virtual ~PistonBlock() /*override*/ = default;
93 // NOLINTEND
94
95public:
96 // member functions
97 // NOLINTBEGIN
98 MCFOLD void onPlace(::BlockEvents::BlockPlaceEvent& eventData) const;
99
100 MCFOLD void tick(::BlockEvents::BlockQueuedTickEvent& eventData) const;
101 // NOLINTEND
102
103public:
104 // static variables
105 // NOLINTBEGIN
106 MCAPI static ::std::add_lvalue_reference_t<::BlockPos const[]> ARM_DIRECTION_OFFSETS();
107 // NOLINTEND
108
109public:
110 // destructor thunk
111 // NOLINTBEGIN
112
113 // NOLINTEND
114
115public:
116 // virtual function thunks
117 // NOLINTBEGIN
118 MCAPI void $setupRedstoneComponent(::BlockSource& region, ::BlockPos const& pos) const;
119
120 MCAPI ::Block const&
121 $getPlacementBlock(::Actor const& by, ::BlockPos const& pos, uchar face, ::Vec3 const& clickPos, int itemValue)
122 const;
123
124 MCFOLD void $onRedstoneUpdate(::BlockSource& region, ::BlockPos const& pos, int strength, bool isFirstTime) const;
125
126 MCFOLD bool $canProvideSupport(::Block const&, uchar, ::BlockSupportType) const;
127
128 MCAPI void $neighborChanged(::BlockSource& region, ::BlockPos const& pos, ::BlockPos const& neighborPos) const;
129
130 MCAPI bool $getSecondPart(::IConstBlockSource const& region, ::BlockPos const& pos, ::BlockPos& out) const;
131
132 MCAPI bool
133 $shouldConnectToRedstone(::BlockSource& region, ::BlockPos const& pos, ::Direction::Type direction) const;
134
135 MCFOLD bool $isValidAuxValue(int value) const;
136
137 MCAPI bool $canSurvive(::BlockSource& region, ::BlockPos const& pos) const;
138
139 MCFOLD int $getVariant(::Block const& block) const;
140
141 MCAPI uchar $getMappedFace(uchar face, ::Block const& block) const;
142
143 MCFOLD bool $breaksFallingBlocks(::Block const& block, ::BaseGameVersion const version) const;
144
145 MCFOLD bool $pushesUpFallingBlocks() const;
146
147 MCAPI void $_addHardCodedBlockComponents(::Experiments const&);
148 // NOLINTEND
149
150public:
151 // vftables
152 // NOLINTBEGIN
153 MCAPI static void** $vftable();
154 // NOLINTEND
155};
Definition ActorBlockBase.h:6
Definition Actor.h:104
Definition BaseGameVersion.h:13
Definition BlockPlaceEvent.h:15
Definition BlockQueuedTickEvent.h:15
Definition BlockLegacy.h:88
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition Block.h:36
Definition Experiments.h:14
Definition IConstBlockSource.h:24
Definition PistonBlock.h:25
Definition Vec3.h:10