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