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 Event : int {
29 StartTakeInteractionWillFail = 0,
30 StartTakeInteractionWillSucceed = 1,
31 StartPlaceInteractionWillFail = 2,
32 StartPlaceInteractionWillSucceed = 3,
33 FinishedInteraction = 4,
34 };
35
36 enum class State : int {
37 Idle = 0,
38 Travelling = 1,
39 Queuing = 2,
40 Interacting = 3,
41 };
42
44 public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::ChestBlockActor::ChestCloser>> mChestCloser;
48 // NOLINTEND
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&);
70 TransportItemsGoal(TransportItemsGoal const&);
71 TransportItemsGoal();
72
73public:
74 // virtual functions
75 // NOLINTBEGIN
76 virtual bool canUse() /*override*/;
77
78 virtual bool canContinueToUse() /*override*/;
79
80 virtual void start() /*override*/;
81
82 virtual void stop() /*override*/;
83
84 virtual void tick() /*override*/;
85
86 virtual void appendDebugInfo(::std::string& str) const /*override*/;
87
88 virtual ~TransportItemsGoal() /*override*/ = default;
89 // NOLINTEND
90
91public:
92 // member functions
93 // NOLINTBEGIN
94 MCAPI bool _canSeeTarget(::BlockPos const& targetPosition) const;
95
96 MCAPI void _executeEvent(::TransportItemsGoal::Event event) const;
97
98 MCAPI void _tickIdle();
99
100 MCAPI void _tickQueuing(::BlockPos const& targetPos);
101
102 MCAPI void _tickTravelling(::BlockPos const& targetPos);
103 // NOLINTEND
104
105public:
106 // static functions
107 // NOLINTBEGIN
108 MCAPI static bool _canSeeTarget(
109 ::BlockSource const& region,
110 ::Vec3 const& mobHeadPosition,
111 ::AABB const& visualShape,
112 ::BlockPos const& targetPosition
113 );
114 // NOLINTEND
115
116public:
117 // virtual function thunks
118 // NOLINTBEGIN
119 MCAPI bool $canUse();
120
121 MCAPI bool $canContinueToUse();
122
123 MCAPI void $start();
124
125 MCAPI void $stop();
126
127 MCAPI void $tick();
128
129 MCAPI void $appendDebugInfo(::std::string& str) const;
130
131
132 // NOLINTEND
133
134public:
135 // vftables
136 // NOLINTBEGIN
137 MCNAPI static void** $vftable();
138 // NOLINTEND
139};
Definition AABB.h:18
Definition BlockPos.h:19
Definition BlockSource.h:68
Definition Goal.h:14
Definition Mob.h:50
Definition TransportItemsGoal.h:43
static MCAPI void ** $vftable()
Definition Vec3.h:10