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