LeviLamina
Loading...
Searching...
No Matches
Explosion.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/math/Vec3.h"
7#include "mc/deps/shared_types/legacy/LevelEvent.h"
8#include "mc/deps/shared_types/legacy/LevelSoundEvent.h"
9#include "mc/legacy/ActorUniqueID.h"
10#include "mc/world/level/BlockPos.h"
11
12// auto generated forward declare list
13// clang-format off
14class Actor;
15class Block;
16class BlockSource;
17class IRandom;
18class ItemStack;
19class Randomize;
21// clang-format on
22
23class Explosion {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<4, 12, ::Vec3> mPos;
28 ::ll::TypedStorage<4, 4, float> mRadius;
29 ::ll::TypedStorage<8, 64, ::std::unordered_set<::BlockPos>> mAffectedBlocks;
30 ::ll::TypedStorage<1, 1, bool> mFire;
31 ::ll::TypedStorage<1, 1, bool> mBreaking;
32 ::ll::TypedStorage<1, 1, bool> mAllowUnderwater;
33 ::ll::TypedStorage<1, 1, bool> mCanToggleBlocks;
34 ::ll::TypedStorage<4, 4, float> mDamageScaling;
35 ::ll::TypedStorage<1, 1, bool> mIgnoreBlockExplosionResistance;
36 ::ll::TypedStorage<2, 2, ::SharedTypes::Legacy::LevelEvent> mParticleType;
37 ::ll::TypedStorage<4, 4, ::SharedTypes::Legacy::LevelSoundEvent> mSoundExplosionType;
38 ::ll::TypedStorage<8, 8, ::ActorUniqueID> mSourceID;
39 ::ll::TypedStorage<8, 8, ::BlockSource&> mRegion;
40 ::ll::TypedStorage<4, 4, float> mMaxResistance;
41 ::ll::TypedStorage<1, 2, ::std::optional<bool>> mInWaterOverride;
42 ::ll::TypedStorage<4, 8, ::std::optional<int>> mTotalDamageOverride;
43 ::ll::TypedStorage<4, 4, float> mKnockbackScaling;
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 Explosion& operator=(Explosion const&);
49 Explosion(Explosion const&);
50 Explosion();
51
52public:
53 // member functions
54 // NOLINTBEGIN
55 MCAPI Explosion(::BlockSource& region, ::Actor* optSource, ::Vec3 const& pos, float radius);
56
57 MCAPI ::std::vector<::gsl::not_null<::Actor*>> _getActorsInRange(::Actor* optSource, float range) const;
58
59 MCAPI bool explode(::IRandom& random);
60
61 MCAPI ::Vec3 getEyePos(::Actor& actor) const;
62
63 MCAPI ~Explosion();
64 // NOLINTEND
65
66public:
67 // static functions
68 // NOLINTBEGIN
69 MCAPI static void _addOrMergeItemStack(
70 ::ItemStack const& newItemStack,
71 ::BlockPos pos,
72 ::std::vector<::std::pair<::ItemStack, ::BlockPos>>& itemStacks
73 );
74
75 MCAPI static void _spawnExtraResourcesAndMergeItemDropsForBlock(
76 ::BlockSource& region,
77 ::BlockPos const& blockPos,
78 ::Block const& block,
79 ::Randomize& randomize,
80 ::ResourceDropsContext const& resourceDropsContext,
81 ::std::vector<::std::pair<::ItemStack, ::BlockPos>>& itemStacks
82 );
83 // NOLINTEND
84
85public:
86 // constructor thunks
87 // NOLINTBEGIN
88 MCAPI void* $ctor(::BlockSource& region, ::Actor* optSource, ::Vec3 const& pos, float radius);
89 // NOLINTEND
90
91public:
92 // destructor thunk
93 // NOLINTBEGIN
94 MCFOLD void $dtor();
95 // NOLINTEND
96};
Definition Actor.h:102
Definition BlockPos.h:17
Definition BlockSource.h:66
Definition Block.h:37
Definition Explosion.h:23
Definition IRandom.h:13
Definition ItemStack.h:23
Definition Randomize.h:13
Definition Vec3.h:10
Definition ResourceDropsContext.h:17