Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
Particle.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/particle/ParticleLayer.h"
7#include "mc/client/renderer/texture/TextureUVCoordinateSet.h"
8#include "mc/comprehensive/ParticleType.h"
9#include "mc/deps/core/math/Color.h"
10#include "mc/deps/core/math/Vec3.h"
11#include "mc/world/level/block/BrightnessPair.h"
12#include "mc/world/phys/AABB.h"
13
14// auto generated forward declare list
15// clang-format off
16class Actor;
17class BlockSource;
18class CompoundTag;
19class ParticleEngine;
21namespace mce { class TextureGroup; }
22namespace mce { class TexturePtr; }
23// clang-format on
24
25class Particle {
26public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<4, 4, float> mCameraOffset;
30 ::ll::TypedStorage<4, 4, int> mLifetime;
31 ::ll::TypedStorage<8, 96, ::TextureUVCoordinateSet> mTex;
32 ::ll::TypedStorage<4, 4, float> mU0;
33 ::ll::TypedStorage<4, 4, float> mV0;
34 ::ll::TypedStorage<4, 4, int> mAge;
35 ::ll::TypedStorage<4, 4, int> mTicksSinceLastUpdate;
36 ::ll::TypedStorage<4, 4, float> mSize;
37 ::ll::TypedStorage<4, 4, float> mGravity;
38 ::ll::TypedStorage<4, 16, ::mce::Color> mColor;
39 ::ll::TypedStorage<4, 16, ::mce::Color> mVanillaLightColor;
40 ::ll::TypedStorage<1, 2, ::BrightnessPair> mAmbientLight;
41 ::ll::TypedStorage<4, 4, ::ParticleType> mType;
42 ::ll::TypedStorage<4, 4, ::ParticleLayer> mLayer;
43 ::ll::TypedStorage<1, 1, bool> mUnlit;
44 ::ll::TypedStorage<4, 4, float> mRoll;
45 ::ll::TypedStorage<4, 4, float> mORoll;
46 ::ll::TypedStorage<4, 4, float> mXa;
47 ::ll::TypedStorage<4, 4, float> mZa;
48 ::ll::TypedStorage<4, 4, float> mXa2;
49 ::ll::TypedStorage<4, 4, float> mZa2;
50 ::ll::TypedStorage<4, 4, float> mYa;
51 ::ll::TypedStorage<8, 8, ::BlockSource*> mRegion;
52 ::ll::TypedStorage<4, 12, ::Vec3> mPosDelta;
53 ::ll::TypedStorage<4, 12, ::Vec3> mPos;
54 ::ll::TypedStorage<4, 12, ::Vec3> mPosOld;
55 ::ll::TypedStorage<1, 1, bool> mNoPhysics;
56 ::ll::TypedStorage<1, 1, bool> mOnGround;
57 ::ll::TypedStorage<1, 1, bool> mVertexDataInitialized;
58 ::ll::TypedStorage<4, 24, ::AABB> mBB;
59 // NOLINTEND
60
61public:
62 // virtual functions
63 // NOLINTBEGIN
64 virtual ~Particle() = default;
65
66 virtual void init(::Vec3 const& pos, ::Vec3 const& dir, int scale, ::ParticleEngine& engine) = 0;
67
68 virtual void addTagData(::CompoundTag const& tag);
69
70 virtual void normalTick();
71
72 virtual void tessellate(::ParticleRenderContext const& renderContext);
73
74 virtual ::mce::TexturePtr const& getParticleTexture() const;
75
76 virtual void setEmittingEntity(::Actor& entity);
77
78 virtual bool _shouldUpdateVertexData(float sqDist);
79
80 virtual void _calculateAmbientLight(float a);
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCNAPI void
87 _init(::Vec3 const& pos, ::Vec3 const& dir, int scale, ::ParticleEngine& engine, ::CompoundTag const* tag);
88
89 MCNAPI void move(::Vec3 const& delta);
90 // NOLINTEND
91
92public:
93 // static functions
94 // NOLINTBEGIN
95 MCNAPI static void initStaticResources(::std::shared_ptr<::mce::TextureGroup> textureGroup);
96 // NOLINTEND
97
98public:
99 // static variables
100 // NOLINTBEGIN
101 MCNAPI static ::mce::TexturePtr& FLAME_ATLAS();
102
103 MCNAPI static ::mce::TexturePtr& FORCEFIELD_ATLAS();
104
105 MCNAPI static ::mce::TexturePtr& ITEMS_ATLAS();
106
107 MCNAPI static ::mce::TexturePtr& PARTICLE_ATLAS();
108
109 MCNAPI static ::mce::TexturePtr& TERRAIN_ATLAS();
110 // NOLINTEND
111
112public:
113 // virtual function thunks
114 // NOLINTBEGIN
115 MCNAPI void $addTagData(::CompoundTag const& tag);
116
117 MCNAPI void $normalTick();
118
119 MCAPI void $tessellate(::ParticleRenderContext const& renderContext);
120
121 MCNAPI ::mce::TexturePtr const& $getParticleTexture() const;
122
123 MCNAPI void $setEmittingEntity(::Actor& entity);
124
125 MCNAPI bool $_shouldUpdateVertexData(float sqDist);
126
127 MCNAPI void $_calculateAmbientLight(float a);
128 // NOLINTEND
129};
Definition Actor.h:116
Definition BlockSource.h:72
Definition CompoundTag.h:18
Definition ParticleEngine.h:5
Definition Particle.h:5
static MCAPI ::mce::TexturePtr & TERRAIN_ATLAS()
static MCAPI ::mce::TexturePtr & FLAME_ATLAS()
static MCAPI ::mce::TexturePtr & FORCEFIELD_ATLAS()
MCAPI void $_calculateAmbientLight(float a)
MCAPI bool $_shouldUpdateVertexData(float sqDist)
MCAPI void $setEmittingEntity(::Actor &entity)
static MCAPI ::mce::TexturePtr & ITEMS_ATLAS()
static MCAPI void initStaticResources(::std::shared_ptr<::mce::TextureGroup > textureGroup)
static MCAPI ::mce::TexturePtr & PARTICLE_ATLAS()
MCAPI void $addTagData(::CompoundTag const &tag)
MCAPI void move(::Vec3 const &delta)
MCAPI void $normalTick()
MCAPI void _init(::Vec3 const &pos, ::Vec3 const &dir, int scale, ::ParticleEngine &engine, ::CompoundTag const *tag)
MCAPI::mce::TexturePtr const & $getParticleTexture() const
Definition Vec3.h:10
Definition TextureGroup.h:7
Definition TexturePtr.h:7
Definition ParticleRenderContext.h:5