LeviLamina
Loading...
Searching...
No Matches
TransportItemsGoal.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/actor/ai/goal/Goal.h"
7#include "mc/world/actor/ai/goal/TransportItemsGoalSettings.h"
8#include "mc/world/level/BlockPos.h"
9#include "mc/world/level/Tick.h"
10#include "mc/world/level/block/actor/ChestBlockActor.h"
11
12// auto generated forward declare list
13// clang-format off
14class AABB;
15class BlockSource;
16class Mob;
17class Vec3;
18// clang-format on
19
20class TransportItemsGoal : public ::Goal {
21public:
22 // TransportItemsGoal inner types declare
23 // clang-format off
24 class ContainerCloser;
25 // clang-format on
26
27 // TransportItemsGoal inner types define
28 enum class State : int {
29 Idle = 0,
30 Travelling = 1,
31 Queuing = 2,
32 Interacting = 3,
33 };
34
36 public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::ChestBlockActor::ChestCloser>> mChestCloser;
40 // NOLINTEND
41 };
42
43 enum class Event : int {
44 StartTakeInteractionWillFail = 0,
45 StartTakeInteractionWillSucceed = 1,
46 StartPlaceInteractionWillFail = 2,
47 StartPlaceInteractionWillSucceed = 3,
48 FinishedInteraction = 4,
49 };
50
51public:
52 // member variables
53 // NOLINTBEGIN
54 ::ll::TypedStorage<8, 8, ::Mob&> mMob;
55 ::ll::TypedStorage<8, 136, ::TransportItemsGoalSettings> mSettings;
56 ::ll::TypedStorage<4, 4, ::TransportItemsGoal::State> mState;
57 ::ll::TypedStorage<4, 4, uint> mCountedPositions;
58 ::ll::TypedStorage<8, 24, ::std::vector<::BlockPos>> mVisitedPositions;
59 ::ll::TypedStorage<8, 16, ::std::optional<::Tick>> mInteractEndTick;
60 ::ll::TypedStorage<8, 16, ::std::optional<::Tick>> mCooldownEndTick;
61 ::ll::TypedStorage<4, 16, ::std::optional<::BlockPos>> mTargetContainerPosition;
62 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mWasHoldingItemLastTick;
63 ::ll::TypedStorage<8, 24, ::std::optional<::TransportItemsGoal::ContainerCloser>> mContainerCloser;
64 ::ll::TypedStorage<1, 1, bool> mCheckLineOfSight;
65 // NOLINTEND
66
67public:
68 // prevent constructor by default
69 TransportItemsGoal& operator=(TransportItemsGoal const&);
72
73public:
74 // virtual functions
75 // NOLINTBEGIN
76 // vIndex: 1
77 virtual bool canUse() /*override*/;
78
79 // vIndex: 2
80 virtual bool canContinueToUse() /*override*/;
81
82 // vIndex: 4
83 virtual void start() /*override*/;
84
85 // vIndex: 5
86 virtual void stop() /*override*/;
87
88 // vIndex: 6
89 virtual void tick() /*override*/;
90
91 // vIndex: 7
92 virtual void appendDebugInfo(::std::string& str) const /*override*/;
93
94 // vIndex: 0
95 virtual ~TransportItemsGoal() /*override*/ = default;
96 // NOLINTEND
97
98public:
99 // member functions
100 // NOLINTBEGIN
101 MCAPI bool _canSeeTarget(::BlockPos const& targetPosition) const;
102
103 MCAPI void _executeEvent(::TransportItemsGoal::Event event) const;
104
105 MCAPI void _tickIdle();
106
107 MCAPI void _tickQueuing(::BlockPos const& targetPos);
108
109 MCAPI void _tickTravelling(::BlockPos const& targetPos);
110 // NOLINTEND
111
112public:
113 // static functions
114 // NOLINTBEGIN
115 MCAPI static bool _canSeeTarget(
116 ::BlockSource const& region,
117 ::Vec3 const& mobHeadPosition,
118 ::AABB const& visualShape,
119 ::BlockPos const& targetPosition
120 );
121 // NOLINTEND
122
123public:
124 // virtual function thunks
125 // NOLINTBEGIN
126 MCAPI bool $canUse();
127
128 MCAPI bool $canContinueToUse();
129
130 MCAPI void $start();
131
132 MCAPI void $stop();
133
134 MCAPI void $tick();
135
136 MCAPI void $appendDebugInfo(::std::string& str) const;
137 // NOLINTEND
138
139public:
140 // vftables
141 // NOLINTBEGIN
142 MCNAPI static void** $vftable();
143 // NOLINTEND
144};
Definition AABB.h:18
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition Goal.h:14
Definition Mob.h:47
Definition TransportItemsGoal.h:35
Definition TransportItemsGoal.h:20
static MCAPI void ** $vftable()
Definition Vec3.h:10