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
8// auto generated forward declare list
9// clang-format off
10class Actor;
11class Block;
12class BlockPos;
14class ItemStack;
15class Vec3;
16// clang-format on
17
18class SurvivalMode : public ::GameMode {
19public:
20 // member variables
21 // NOLINTBEGIN
22 ::ll::TypedStorage<1, 1, bool> mIsTrialMode;
23 ::ll::TypedStorage<1, 1, bool> mHasDisplayedIntro;
24 ::ll::TypedStorage<4, 4, int> mTrialEndedReminder;
25 ::ll::TypedStorage<8, 64, ::std::function<void(bool)>> mShowUpsellScreenCallback;
26 // NOLINTEND
27
28public:
29 // virtual functions
30 // NOLINTBEGIN
31 virtual bool attack(::Actor& entity) /*override*/;
32
33 virtual bool interact(::Actor& entity, ::Vec3 const& location) /*override*/;
34
35 virtual bool destroyBlock(::BlockPos const& pos, uchar face) /*override*/;
36
37 virtual bool startDestroyBlock(::BlockPos const& pos, uchar face, bool& hasDestroyedBlock) /*override*/;
38
39 virtual void startBuildBlock(::BlockPos const& pos, uchar face) /*override*/;
40
41 virtual bool buildBlock(::BlockPos const& pos, uchar face, bool const isSimTick) /*override*/;
42
43 virtual bool useItem(::ItemStack& item) /*override*/;
44
45 virtual bool useItemAsAttack(::ItemStack& item, ::Vec3 const& aimDirection) /*override*/;
46
47 virtual ::InteractionResult useItemOn(
48 ::ItemStack& item,
49 ::BlockPos const& at,
50 uchar face,
51 ::Vec3 const& hit,
52 ::Block const* targetBlock,
53 bool isFirstEvent
54 ) /*override*/;
55
56 virtual void tick() /*override*/;
57
58 virtual void setTrialMode(bool isEnabled) /*override*/;
59
60 virtual bool isInTrialMode() /*override*/;
61
62 virtual void registerUpsellScreenCallback(::std::function<void(bool)> callback) /*override*/;
63
64 virtual ~SurvivalMode() /*override*/ = default;
65 // NOLINTEND
66
67public:
68 // member functions
69 // NOLINTBEGIN
70 MCAPI void _messagePlayers(::std::string message);
71
72 MCAPI void _showTrialReminder(bool force);
73 // NOLINTEND
74
75public:
76 // static variables
77 // NOLINTBEGIN
78 MCAPI static bool& mTrialHasEnded();
79 // NOLINTEND
80
81public:
82 // virtual function thunks
83 // NOLINTBEGIN
84 MCAPI bool $attack(::Actor& entity);
85
86 MCAPI bool $interact(::Actor& entity, ::Vec3 const& location);
87
88 MCAPI bool $destroyBlock(::BlockPos const& pos, uchar face);
89
90 MCAPI bool $startDestroyBlock(::BlockPos const& pos, uchar face, bool& hasDestroyedBlock);
91
92 MCAPI void $startBuildBlock(::BlockPos const& pos, uchar face);
93
94 MCAPI bool $buildBlock(::BlockPos const& pos, uchar face, bool const isSimTick);
95
96 MCAPI bool $useItem(::ItemStack& item);
97
98 MCAPI bool $useItemAsAttack(::ItemStack& item, ::Vec3 const& aimDirection);
99
100 MCAPI ::InteractionResult $useItemOn(
101 ::ItemStack& item,
102 ::BlockPos const& at,
103 uchar face,
104 ::Vec3 const& hit,
105 ::Block const* targetBlock,
106 bool isFirstEvent
107 );
108
109 MCAPI void $tick();
110
111 MCAPI void $setTrialMode(bool isEnabled);
112
113 MCAPI bool $isInTrialMode();
114
115 MCAPI void $registerUpsellScreenCallback(::std::function<void(bool)> callback);
116
117
118 // NOLINTEND
119
120public:
121 // vftables
122 // NOLINTBEGIN
123 MCNAPI static void** $vftable();
124 // NOLINTEND
125};
Definition Actor.h:105
Definition BlockPos.h:19
Definition Block.h:43
Definition InteractionResult.h:5
Definition ItemStack.h:26
Definition SurvivalMode.h:18
static MCAPI void ** $vftable()
Definition Vec3.h:10