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/PistonState.h"
8#include "mc/world/level/block/actor/VanillaBlockActor.h"
9
10// auto generated forward declare list
11// clang-format off
12class AABB;
13class Actor;
14class BlockActor;
16class BlockSource;
17class CompoundTag;
18class DataLoadHelper;
20class ILevel;
21class SaveContext;
22class Vec3;
23// clang-format on
24
25class PistonBlockActor : public ::VanillaBlockActor {
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 virtual void load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper) /*override*/;
48
49 virtual bool save(::CompoundTag& tag, ::SaveContext const& saveContext) const /*override*/;
50
51 virtual bool saveItemInstanceData(::CompoundTag& tag) const /*override*/;
52
53 virtual void tick(::BlockSource& region) /*override*/;
54
55 virtual void onRemoved(::BlockSource& region) /*override*/;
56
57 virtual ::std::unique_ptr<::BlockActorDataPacket> _getUpdatePacket(::BlockSource&) /*override*/;
58
59 virtual void _onUpdatePacket(::CompoundTag const& data, ::BlockSource& region) /*override*/;
60 // NOLINTEND
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI bool _attachedBlockWalker(
66 ::BlockSource& region,
67 ::BlockPos const& curPos,
68 uchar curBranchFacing,
69 uchar pistonMoveFacing
70 );
71
72 MCAPI bool _checkAttachedBlocks(::BlockSource& region);
73
74 MCAPI void _moveCollidedEntities(::BlockSource& region);
75
76 MCAPI void _moveCollidedEntitiesHelper(
77 ::BlockSource& region,
78 ::AABB const& insideBlockAABB,
79 ::BlockPos const& facingDir,
80 ::Actor* ignore,
81 uint searchHeight
82 );
83
84 MCAPI void _spawnBlocks(::BlockSource& region);
85
86 MCAPI void _spawnMovingBlock(::BlockSource& region, ::BlockPos const& blockPos);
87
88 MCAPI void _spawnMovingBlocks(::BlockSource& region);
89
90 MCAPI ::BlockPos const& getFacingDir(::IConstBlockSource const& region) const;
91
92 MCAPI void moveEntityLastProgress(::Actor& entity, ::Vec3 delta);
93 // NOLINTEND
94
95public:
96 // static functions
97 // NOLINTBEGIN
98 MCFOLD static ::PistonBlockActor const* getOwningPiston(::BlockActor const& blockActor, ::BlockSource& region);
99
100 MCFOLD static ::PistonBlockActor* getOwningPiston(::BlockActor& blockActor, ::BlockSource& region);
101 // NOLINTEND
102
103public:
104 // virtual function thunks
105 // NOLINTBEGIN
106 MCAPI void $load(::ILevel& level, ::CompoundTag const& tag, ::DataLoadHelper& dataLoadHelper);
107
108 MCAPI bool $save(::CompoundTag& tag, ::SaveContext const& saveContext) const;
109
110 MCAPI bool $saveItemInstanceData(::CompoundTag& tag) const;
111
112 MCAPI void $tick(::BlockSource& region);
113
114 MCAPI void $onRemoved(::BlockSource& region);
115
116 MCFOLD ::std::unique_ptr<::BlockActorDataPacket> $_getUpdatePacket(::BlockSource&);
117
118 MCAPI void $_onUpdatePacket(::CompoundTag const& data, ::BlockSource& region);
119
120
121 // NOLINTEND
122
123public:
124 // vftables
125 // NOLINTBEGIN
127
129
131
132 MCNAPI static void** $vftableForBlockActor();
133 // NOLINTEND
134};
Definition AABB.h:18
Definition Actor.h:113
Definition BlockActorDataPacket.h:19
Definition BlockActor.h:29
Definition BlockPos.h:17
Definition BlockSource.h:71
Definition CompoundTag.h:18
Definition DataLoadHelper.h:20
Definition IConstBlockSource.h:25
Definition ILevel.h:221
Definition PistonBlockActor.h:25
static MCAPI void ** $vftableForBlockActor()
static MCAPI void ** $vftableForIVanillaTickBlockActorComponent()
static MCAPI void ** $vftableForIVanillaRenderBlockActorComponent()
static MCAPI void ** $vftableForIVanillaMainBlockActorComponent()
Definition SaveContext.h:5
Definition Vec3.h:10