LeviLamina
Loading...
Searching...
No Matches
PistonBlockActor.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/level/block/actor/BlockActor.h"
7#include "mc/world/level/block/actor/PistonState.h"
8
9// auto generated forward declare list
10// clang-format off
11class AABB;
12class Actor;
14class BlockPos;
15class BlockSource;
16class CompoundTag;
17class DataLoadHelper;
18class ILevel;
19class Randomize;
20class SaveContext;
21class Vec3;
23// clang-format on
24
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<1, 1, bool> mSticky;
30 ::ll::TypedStorage<4, 4, float> mProgress;
31 ::ll::TypedStorage<4, 4, float> mLastProgress;
32 ::ll::TypedStorage<1, 1, bool> mWasPushedBackwardByANonStickyPiston;
33 ::ll::TypedStorage<1, 1, bool> mWasPulledForwardByAStickyPiston;
34 ::ll::TypedStorage<1, 1, ::PistonState> mOldState;
35 ::ll::TypedStorage<1, 1, ::PistonState> mState;
36 ::ll::TypedStorage<1, 1, ::PistonState> mNewState;
37 ::ll::TypedStorage<1, 1, bool> mVerifyArm;
38 ::ll::TypedStorage<1, 1, bool> mShouldVerifyArmType;
39 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mAttachedBlocks;
40 ::ll::TypedStorage<8, 32, ::std::optional<::std::vector<::BlockPos>>> mFutureClientAttachedBlocks;
41 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mBreakBlocks;
42 // NOLINTEND
43
44public:
45 // virtual functions
46 // NOLINTBEGIN
47 // vIndex: 1
48 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
49
50 // vIndex: 2
51 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
52
53 // vIndex: 7
54 virtual void tick(::BlockSource& region) /*override*/;
55
56 // vIndex: 13
57 virtual void onRemoved(::BlockSource& region) /*override*/;
58
59 // vIndex: 31
60 virtual ::PistonBlockActor* getOwningPiston(::BlockSource&) /*override*/;
61
62 // vIndex: 30
63 virtual ::PistonBlockActor const* getOwningPiston(::BlockSource&) const /*override*/;
64
65 // vIndex: 43
66 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
67
68 // vIndex: 44
69 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
70
71 // vIndex: 0
72 virtual ~PistonBlockActor() /*override*/;
73 // NOLINTEND
74
75public:
76 // member functions
77 // NOLINTBEGIN
78 MCAPI PistonBlockActor(::BlockPos const& pos, bool isSticky);
79
80 MCAPI bool _attachedBlockWalker(
81 ::BlockSource& region,
82 ::BlockPos const& curPos,
83 uchar curBranchFacing,
84 uchar pistonMoveFacing
85 );
86
87 MCAPI bool _checkAttachedBlocks(::BlockSource& region);
88
89 MCAPI void _checkInceptionAchievement(::BlockActor& be, ::BlockSource& region, ::BlockPos const& facingDir);
90
91 MCAPI bool _handleSlimeConnections(
92 ::BlockSource& region,
93 ::BlockPos const& curPos,
94 uchar curBranchFacing,
95 uchar pistonMoveFacing
96 );
97
98 MCAPI bool _hasBlockAttached(::BlockPos const& blockPos);
99
100 MCAPI void _moveCollidedEntities(::BlockSource& region);
101
102 MCAPI void _moveCollidedEntitiesHelper(
103 ::BlockSource& region,
104 ::AABB const& insideBlockAABB,
105 ::BlockPos const& facingDir,
106 ::Actor* ignore,
107 uint searchHeight
108 );
109
110 MCAPI void _sortAttachedBlocks(::BlockSource& region);
111
112 MCAPI void _spawnBlocks(::BlockSource& region);
113
114 MCAPI void _spawnMovingBlock(::BlockSource& region, ::BlockPos const& blockPos);
115
116 MCAPI void _spawnMovingBlocks(::BlockSource& region);
117
118 MCAPI void moveEntityLastProgress(::Actor& entity, ::Vec3 delta);
119 // NOLINTEND
120
121public:
122 // static functions
123 // NOLINTBEGIN
124 MCAPI static void _spawnResourcesForBlockAndExtraBlock(
125 ::BlockSource& region,
126 ::BlockPos const& blockPos,
127 ::Randomize randomize,
128 ::ResourceDropsContext const& resourceDropsContext
129 );
130 // NOLINTEND
131
132public:
133 // constructor thunks
134 // NOLINTBEGIN
135 MCAPI void* $ctor(::BlockPos const& pos, bool isSticky);
136 // NOLINTEND
137
138public:
139 // destructor thunk
140 // NOLINTBEGIN
141 MCAPI void $dtor();
142 // NOLINTEND
143
144public:
145 // virtual function thunks
146 // NOLINTBEGIN
147 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
148
149 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
150
151 MCAPI void $tick(::BlockSource& region);
152
153 MCAPI void $onRemoved(::BlockSource& region);
154
155 MCFOLD ::PistonBlockActor* $getOwningPiston(::BlockSource&);
156
157 MCFOLD ::PistonBlockActor const* $getOwningPiston(::BlockSource&) const;
158
159 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
160
161 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
162 // NOLINTEND
163
164public:
165 // vftables
166 // NOLINTBEGIN
167 MCAPI static void** $vftable();
168 // NOLINTEND
169};
Definition AABB.h:16
Definition Actor.h:104
Definition BlockActorDataPacket.h:19
Definition BlockActor.h:32
Definition BlockPos.h:18
Definition BlockSource.h:67
Definition CompoundTag.h:13
Definition DataLoadHelper.h:20
Definition ILevel.h:203
Definition PistonBlockActor.h:25
Definition Randomize.h:13
Definition SaveContext.h:5
Definition Vec3.h:10
Definition ResourceDropsContext.h:5