LeviLamina
Loading...
Searching...
No Matches
SurvivalMode.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/gamemode/GameMode.h"
7#include "mc/world/item/HandSlot.h"
8
9// auto generated forward declare list
10// clang-format off
11class Actor;
12class Block;
13class BlockPos;
15class ItemStack;
16class Player;
17class Vec3;
18// clang-format on
19
20class SurvivalMode : public ::GameMode {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<1, 1, bool> mIsTrialMode;
25 ::ll::TypedStorage<1, 1, bool> mHasDisplayedIntro;
26 ::ll::TypedStorage<4, 4, int> mTrialEndedReminder;
27 ::ll::TypedStorage<8, 64, ::std::function<void(bool)>> mShowUpsellScreenCallback;
28 // NOLINTEND
29
30public:
31 // prevent constructor by default
32 SurvivalMode();
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual bool attack(::Actor& entity, ::Vec3 const& hitPosition) /*override*/;
38
39 virtual bool interact(::Actor& entity, ::Vec3 const& location, ::HandSlot const handSlot) /*override*/;
40
41 virtual bool destroyBlock(::BlockPos const& pos, uchar face) /*override*/;
42
43 virtual bool startDestroyBlock(::BlockPos const& pos, uchar face, bool& hasDestroyedBlock) /*override*/;
44
45 virtual void startBuildBlock(::BlockPos const& pos, uchar face, ::HandSlot const handSlot) /*override*/;
46
47 virtual bool
48 buildBlock(::BlockPos const& pos, uchar face, ::HandSlot const handSlot, bool const isSimTick) /*override*/;
49
50 virtual bool useItem(::ItemStack& item, ::HandSlot const handSlot) /*override*/;
51
52 virtual bool useItemAsAttack(::ItemStack& item, ::Vec3 const& aimDirection, ::HandSlot const handSlot) /*override*/;
53
54 virtual ::InteractionResult useItemOn(
55 ::ItemStack& item,
56 ::BlockPos const& at,
57 uchar face,
58 ::Vec3 const& hit,
59 ::HandSlot const handSlot,
60 ::Block const* targetBlock,
61 bool isFirstEvent
62 ) /*override*/;
63
64 virtual void tick() /*override*/;
65
66 virtual void setTrialMode(bool isEnabled) /*override*/;
67
68 virtual bool isInTrialMode() /*override*/;
69
70 virtual void registerUpsellScreenCallback(::std::function<void(bool)> callback) /*override*/;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCAPI explicit SurvivalMode(::Player& player);
77
78 MCAPI void _messagePlayers(::std::string message);
79
80 MCAPI void _showTrialReminder(bool force);
81 // NOLINTEND
82
83public:
84 // static variables
85 // NOLINTBEGIN
86 MCAPI static bool& mTrialHasEnded();
87 // NOLINTEND
88
89public:
90 // constructor thunks
91 // NOLINTBEGIN
92 MCAPI void* $ctor(::Player& player);
93 // NOLINTEND
94
95public:
96 // virtual function thunks
97 // NOLINTBEGIN
98 MCAPI bool $attack(::Actor& entity, ::Vec3 const& hitPosition);
99
100 MCAPI bool $interact(::Actor& entity, ::Vec3 const& location, ::HandSlot const handSlot);
101
102 MCAPI bool $destroyBlock(::BlockPos const& pos, uchar face);
103
104 MCAPI bool $startDestroyBlock(::BlockPos const& pos, uchar face, bool& hasDestroyedBlock);
105
106 MCAPI void $startBuildBlock(::BlockPos const& pos, uchar face, ::HandSlot const handSlot);
107
108 MCAPI bool $buildBlock(::BlockPos const& pos, uchar face, ::HandSlot const handSlot, bool const isSimTick);
109
110 MCAPI bool $useItem(::ItemStack& item, ::HandSlot const handSlot);
111
112 MCAPI bool $useItemAsAttack(::ItemStack& item, ::Vec3 const& aimDirection, ::HandSlot const handSlot);
113
114 MCAPI ::InteractionResult $useItemOn(
115 ::ItemStack& item,
116 ::BlockPos const& at,
117 uchar face,
118 ::Vec3 const& hit,
119 ::HandSlot const handSlot,
120 ::Block const* targetBlock,
121 bool isFirstEvent
122 );
123
124 MCAPI void $tick();
125
126 MCAPI void $setTrialMode(bool isEnabled);
127
128#ifdef LL_PLAT_S
129 MCAPI bool $isInTrialMode();
130#else // LL_PLAT_C
131 MCFOLD bool $isInTrialMode();
132#endif
133
134#ifdef LL_PLAT_S
135 MCAPI void $registerUpsellScreenCallback(::std::function<void(bool)> callback);
136#else // LL_PLAT_C
137 MCFOLD void $registerUpsellScreenCallback(::std::function<void(bool)> callback);
138#endif
139
140
141 // NOLINTEND
142
143public:
144 // vftables
145 // NOLINTBEGIN
146 MCNAPI static void** $vftable();
147 // NOLINTEND
148};
Definition Actor.h:113
Definition BlockPos.h:17
Definition Block.h:41
Definition InteractionResult.h:5
Definition ItemStack.h:26
Definition Player.h:129
static MCAPI void ** $vftable()
Definition Vec3.h:10