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 getSourcePos(::Actor* source) const;
61
62 MCAPI void overrideInWater(bool inWater);
63
64 MCFOLD void setAllowUnderwater(bool val);
65
66 MCFOLD void setBreaking(bool val);
67
68 MCFOLD void setCanToggleBlocks(bool toggleBlocks);
69
70 MCAPI void setDamageScaling(float damageScaling);
71
72 MCAPI void setExplosionParticleType(::SharedTypes::Legacy::LevelEvent particlesExplosionType);
73
74 MCAPI void setExplosionSound(::SharedTypes::Legacy::LevelSoundEvent soundExplosionType);
75
76 MCFOLD void setFire(bool val);
77
78 MCFOLD void setIgnoreBlockResistance(bool shouldIgnore);
79
80 MCAPI void setKnockbackScaling(float scaling);
81
82 MCAPI void setMaxResistance(float resistance);
83
84 MCAPI ~Explosion();
85 // NOLINTEND
86
87public:
88 // static functions
89 // NOLINTBEGIN
90 MCAPI static void _addOrMergeItemStack(
91 ::ItemStack const& newItemStack,
92 ::BlockPos pos,
93 ::std::vector<::std::pair<::ItemStack, ::BlockPos>>& itemStacks
94 );
95
96 MCAPI static void _spawnExtraResourcesAndMergeItemDropsForBlock(
97 ::BlockSource& region,
98 ::BlockPos const& blockPos,
99 ::Block const& block,
100 ::IRandom& random,
101 ::ResourceDropsContext const& resourceDropsContext,
102 ::std::vector<::std::pair<::ItemStack, ::BlockPos>>& itemStacks
103 );
104 // NOLINTEND
105
106public:
107 // constructor thunks
108 // NOLINTBEGIN
109 MCAPI void* $ctor(::BlockSource& region, ::Actor* optSource, ::Vec3 const& pos, float radius);
110 // NOLINTEND
111
112public:
113 // destructor thunk
114 // NOLINTBEGIN
115 MCFOLD void $dtor();
116 // NOLINTEND
117};
Definition Actor.h:125
Definition BlockPos.h:21
Definition BlockSource.h:73
Definition Block.h:69
Definition IRandom.h:10
Definition ItemStack.h:35
Definition Vec3.h:10
Definition ResourceDropsContext.h:19