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