LeviLamina
Loading...
Searching...
No Matches
CameraItemComponentLegacy.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/molang/MolangVersion.h"
7#include "mc/world/item/components/ICameraItemComponent.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class BlockPos;
13class CompoundTag;
14class ItemStack;
15class Player;
16class Vec3;
17namespace Json { class Value; }
18class CameraCallbacks;
19// clang-format on
20
22public:
23 // CameraItemComponentLegacy inner types define
24 enum class UseAction : uchar {
25 None = 0,
26 Place = 1,
27 Use = 2,
28 };
29
30 using PlaceCallback = ::std::function<void(::Vec3 const&, ::Player&)>;
31
32 using UseCallback = ::std::function<void(::Player&)>;
33
34public:
35 // member variables
36 // NOLINTBEGIN
37 ::ll::TypedStorage<4, 4, float> mBlackBarsDuration;
38 ::ll::TypedStorage<4, 4, float> mBlackBarsScreenRatio;
39 ::ll::TypedStorage<4, 4, float> mShutterScreenRatio;
40 ::ll::TypedStorage<4, 4, float> mShutterDuration;
41 ::ll::TypedStorage<4, 4, float> mPictureDuration;
42 ::ll::TypedStorage<4, 4, float> mSlideAwayDuration;
43 ::ll::TypedStorage<1, 1, bool> mPlacingTripod;
44 ::ll::TypedStorage<8, 8, uint64> mPlacingTripodClientTick;
45 ::ll::TypedStorage<8, 8, uint64> mPlacingTripodServerTick;
46 ::ll::TypedStorage<8, 8, ::CameraCallbacks*> mCallbacks;
47 // NOLINTEND
48
49public:
50 // virtual functions
51 // NOLINTBEGIN
52 virtual ~CameraItemComponentLegacy() /*override*/ = default;
53
54 virtual void takePictureNow(::Player& player, ::Actor* camera, ::Actor* target) /*override*/;
55
56 virtual void use(::ItemStack& instance, ::Player& player) /*override*/;
57
58 virtual void releaseUsing(::ItemStack& instance, ::Player& player, int durationLeft) /*override*/;
59
60 virtual bool
61 useOn(::ItemStack& instance, ::Actor& actor, ::BlockPos const& blockPos, uchar face, ::Vec3 const&) /*override*/;
62
63 virtual bool canPlace(::ItemStack const& instance, ::Actor& actor, ::BlockPos const& blockPos, uchar face) const
64 /*override*/;
65
66 virtual float blackBarsDuration() const /*override*/;
67
68 virtual float blackBarsScreenRatio() const /*override*/;
69
70 virtual float shutterScreenRatio() const /*override*/;
71
72 virtual float shutterDuration() const /*override*/;
73
74 virtual float pictureDuration() const /*override*/;
75
76 virtual float slideAwayDuration() const /*override*/;
77
78 virtual void registerCallbacks(::CameraCallbacks* callbacks) /*override*/;
79 // NOLINTEND
80
81public:
82 // member functions
83 // NOLINTBEGIN
84 MCAPI ::std::unique_ptr<::CompoundTag> buildNetworkTag() const;
85
86 MCAPI bool init(::Json::Value const& data, ::MolangVersion);
87 // NOLINTEND
88
89public:
90 // static functions
91 // NOLINTBEGIN
92 MCAPI static ::CameraItemComponentLegacy::UseAction
93 _tryPlace(::ItemStack const& instance, ::Actor& actor, ::BlockPos const& blockPos, uchar face, ::Vec3& spawnPos);
94
95 MCAPI static ::Json::Value initializeFromNetwork(::CompoundTag const& tag);
96 // NOLINTEND
97
98public:
99 // virtual function thunks
100 // NOLINTBEGIN
101 MCAPI void $takePictureNow(::Player& player, ::Actor* camera, ::Actor* target);
102
103 MCAPI void $use(::ItemStack& instance, ::Player& player);
104
105 MCAPI void $releaseUsing(::ItemStack& instance, ::Player& player, int durationLeft);
106
107 MCAPI bool $useOn(::ItemStack& instance, ::Actor& actor, ::BlockPos const& blockPos, uchar face, ::Vec3 const&);
108
109 MCAPI bool $canPlace(::ItemStack const& instance, ::Actor& actor, ::BlockPos const& blockPos, uchar face) const;
110
111 MCAPI float $blackBarsDuration() const;
112
113 MCFOLD float $blackBarsScreenRatio() const;
114
115 MCAPI float $shutterScreenRatio() const;
116
117 MCAPI float $shutterDuration() const;
118
119 MCAPI float $pictureDuration() const;
120
121 MCAPI float $slideAwayDuration() const;
122
123 MCAPI void $registerCallbacks(::CameraCallbacks* callbacks);
124
125
126 // NOLINTEND
127
128public:
129 // vftables
130 // NOLINTBEGIN
131 MCNAPI static void** $vftable();
132 // NOLINTEND
133};
Definition Actor.h:114
Definition BlockPos.h:17
Definition CameraCallbacks.h:5
Definition CameraItemComponentLegacy.h:21
static MCAPI void ** $vftable()
Definition CompoundTag.h:18
Definition ICameraItemComponent.h:15
Definition ItemStack.h:24
Definition Value.h:16
Definition Player.h:129
Definition Vec3.h:10