3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/particle/ParticleLayer.h"
7#include "mc/comprehensive/ParticleType.h"
8#include "mc/deps/core/container/slot_map_handle.h"
9#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/minecraft_renderer/renderer/MaterialPtr.h"
12#include "mc/util/Random.h"
34 using ParticleBin = ::std::vector<::std::unique_ptr<::Particle>>;
36 using ParticleTextureMap = ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>;
41 ::ll::TypedStorage<8, 2520, ::std::vector<::std::unique_ptr<::Particle>>[105]> mInactiveParticlesPool;
42 ::ll::TypedStorage<8, 8, ::Level&> mLevel;
43 ::ll::TypedStorage<8, 6720, ::std::unordered_map<::ParticleType, ::std::vector<::std::unique_ptr<::Particle>>>[105]>
45 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::CustomParticle>>> customParticles;
46 ::ll::TypedStorage<8, 24, ::std::vector<::std::unique_ptr<::Particle>>> mNewParticles;
47 ::ll::TypedStorage<8, 24, ::Bedrock::NonOwnerPointer<::SeasonsRenderer>> mSeasons;
48 ::ll::TypedStorage<8, 8, ::LightTexture&> mLightTexture;
49 ::ll::TypedStorage<8, 2544, ::Random> random;
50 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> opaqueMat;
51 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> alphaTestMat;
52 ::ll::TypedStorage<8, 16, ::mce::MaterialPtr> blendMat;
53 ::ll::TypedStorage<4, 420, uint[105]> maxParticleCount;
54 ::ll::TypedStorage<4, 420, uint[105]> particleCount;
55 ::ll::TypedStorage<1, 1, bool> mTemporaryCameraActive;
56 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ParticleType, ::HashedString>> mNewParticleSystemJsonLookup;
62 ::Bedrock::slot_map_handle<::std::unique_ptr<::ParticleSystem::ParticleEmitter>, 64, 32>>>
63 mNewParticleSystemMap;
68 ParticleEngine& operator=(ParticleEngine
const&);
69 ParticleEngine(ParticleEngine
const&);
75 virtual ~ParticleEngine() =
default;
83 ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons,
84 ::LightTexture& lightTexture
87 MCAPI
void _emitParticleNew(
88 ::ParticleSystemEngine& particleSystemEngine,
95 MCAPI ::ParticleLayerRenderObject _extractParticleLayer(
96 ::ScreenContext& screenContext,
97 ::ParticleRenderContext
const& particleRenderContext,
98 ::ParticleLayer particleLayer,
99 ::mce::MaterialPtr
const& mat
102 MCAPI
void addCustomParticle(::std::unique_ptr<::CustomParticle> particle);
106 MCAPI ::ParticleRenderObjectCollection
107 extract(::ScreenContext& screenContext, ::Vec3
const& cameraPos, ::Vec3
const& viewOff,
float minDist)
const;
109 MCAPI ::ParticleRenderObjectCollection extractEmptyCollection(::ScreenContext& screenContext)
const;
117 MCAPI
static void render(::ScreenContext& screenContext, ::ParticleLayerRenderObject
const& particleState);
124 $ctor(::Level& level, ::Bedrock::NotNullNonOwnerPtr<::SeasonsRenderer> seasons, ::LightTexture& lightTexture);
Definition EnableNonOwnerReferences.h:7
Definition CustomParticle.h:5
Definition HashedString.h:5
Definition LightTexture.h:5
Definition ParticleEngine.h:5
Definition ParticleSystemEngine.h:5
Definition ParticleEmitter.h:7
Definition ScreenContext.h:5
Definition SeasonsRenderer.h:5
Definition ParticleLayerRenderObject.h:5
Definition ParticleRenderContext.h:5
Definition ParticleRenderObjectCollection.h:5