Class EntityCubeParticles
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
public class EntityCubeParticles : CollectibleParticleProperties, IParticlePropertiesProvider
- Inheritance
-
EntityCubeParticles
- Implements
- Inherited Members
- Extension Methods
Constructors
EntityCubeParticles()
public EntityCubeParticles()
EntityCubeParticles(IWorldAccessor, long, Vec3d, float, int, float, float)
public EntityCubeParticles(IWorldAccessor world, long entityId, Vec3d particlePos, float radius, int quantity, float minScale, float maxScale)
Parameters
world
IWorldAccessorentityId
longparticlePos
Vec3dradius
floatquantity
intminScale
floatmaxScale
float
Fields
maxScale
public float maxScale
Field Value
minScale
public float minScale
Field Value
particlePos
public Vec3d particlePos
Field Value
quantity
public int quantity
Field Value
radius
public float radius
Field Value
Properties
DieInLiquid
Whether the particle should despawn when in contact with liquids
public override bool DieInLiquid { get; }
Property Value
LifeLength
How long the particle should live (default = 1)
public override float LifeLength { get; }
Property Value
ParticleModel
Cube or Quad?
public override EnumParticleModel ParticleModel { get; }
Property Value
Pos
Position in the world where the particle should spawn
public override Vec3d Pos { get; }
Property Value
Quantity
How many particles should spawn? For every particle spawned, all of belows methods are called once. E.g. if quantity is 10, GetPos(), GetVelocity(),... is called 10 times.
public override float Quantity { get; }
Property Value
SecondaryParticles
The secondary particle properties. Secondary particles are particles that are emitted from an in-flight particle.
public override IParticlePropertiesProvider[] SecondaryParticles { get; }
Property Value
Size
Size of the particle
public override float Size { get; }
Property Value
VertexFlags
See also VertexFlags
public override int VertexFlags { get; }
Property Value
Methods
FromBytes(BinaryReader, IWorldAccessor)
For reading from the network
public override void FromBytes(BinaryReader reader, IWorldAccessor resolver)
Parameters
reader
BinaryReaderresolver
IWorldAccessor
GetRgbaColor(ICoreClientAPI)
The particles Rgba Color
public override int GetRgbaColor(ICoreClientAPI capi)
Parameters
capi
ICoreClientAPI
Returns
GetVelocity(Vec3d)
In what direction should the particle fly/fall
public override Vec3f GetVelocity(Vec3d pos)
Parameters
pos
Vec3d
Returns
Init(ICoreAPI)
Called before the particle provider is used for particle creation
public override void Init(ICoreAPI api)
Parameters
api
ICoreAPI
ToBytes(BinaryWriter)
For sending over the network
public override void ToBytes(BinaryWriter writer)
Parameters
writer
BinaryWriter