Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
ProjectileFactory.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated forward declare list
6// clang-format off
7class Actor;
8class Level;
9class Mob;
11class Vec3;
13namespace Json { class Value; }
14namespace SharedTypes::v1_26_50 { struct OnHitCommandsStorage; }
15// clang-format on
16
17class ProjectileFactory {
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
22 // NOLINTEND
23
24public:
25 // prevent constructor by default
26 ProjectileFactory& operator=(ProjectileFactory const&);
27 ProjectileFactory(ProjectileFactory const&);
28 ProjectileFactory();
29
30public:
31 // member functions
32 // NOLINTBEGIN
34 ::ActorDefinitionIdentifier const& identifier,
35 ::Mob* owner,
36 ::Vec3 targetDir,
37 int auxValue,
38 float throwPower,
39 bool useUnmodifiedDirection,
40 bool overrideSpawnPosition,
41 ::Vec3 spawnPosition
42 );
43 // NOLINTEND
44
45public:
46 // static functions
47 // NOLINTBEGIN
48 MCNAPI static void _applyEnchantmentsToProjectile(::Mob const& owner, ::Actor& projectile);
49
51 ::Json::Value& trigger,
52 ::std::string const& name,
54 );
55
56 MCNAPI static ::std::unique_ptr<::OnHitSubcomponent>
57 createSubcomponentFromDefinition(::std::string const& name, ::entt::meta_any const& def);
58
59 MCNAPI static void initFactory();
60
61 MCNAPI static void shutdown();
62 // NOLINTEND
63
64public:
65 // static variables
66 // NOLINTBEGIN
67 MCNAPI static ::std::unordered_map<
68 ::std::string_view,
71
72 MCNAPI static ::std::unordered_map<
73 ::std::string_view,
74 ::std::function<::std::unique_ptr<::OnHitSubcomponent>(::entt::meta_any const&)>>&
76 // NOLINTEND
77};
Definition Actor.h:116
Definition Value.h:16
Definition Level.h:255
Definition Mob.h:58
Definition OnHitSubcomponent.h:13
static MCAPI void shutdown()
static MCAPI void _applyEnchantmentsToProjectile(::Mob const &owner, ::Actor &projectile)
static MCAPI ::std::unique_ptr<::OnHitSubcomponent > createSubcomponentFromDefinition(::std::string const &name, ::entt::meta_any const &def)
MCAPI::Actor * shootProjectileFromDefinition(::ActorDefinitionIdentifier const &identifier, ::Mob *owner, ::Vec3 targetDir, int auxValue, float throwPower, bool useUnmodifiedDirection, bool overrideSpawnPosition, ::Vec3 spawnPosition)
static MCAPI void createSubcomponentDefinitionFromLegacy(::Json::Value &trigger, ::std::string const &name, ::SharedTypes::v1_26_50::OnHitCommandsStorage &onHitCommands)
static MCAPI ::std::unordered_map< ::std::string_view, ::std::function< void(::Json::Value &, ::SharedTypes::v1_26_50::OnHitCommandsStorage &)> > & mSubcomponentDefinitionMap()
static MCAPI void initFactory()
static MCAPI ::std::unordered_map< ::std::string_view, ::std::function<::std::unique_ptr<::OnHitSubcomponent >(::entt::meta_any const &)> > & mSubcomponentMap()
Definition Vec3.h:10
Definition ActorDefinitionIdentifier.h:15
Definition OnHitCommandsStorage.h:15