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