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