Table of Contents

Class StackCubeParticles

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll
public class StackCubeParticles : CollectibleParticleProperties, IParticlePropertiesProvider
Inheritance
StackCubeParticles
Implements
Inherited Members

Constructors

StackCubeParticles()

public StackCubeParticles()

StackCubeParticles(Vec3d, ItemStack, float, int, float, Vec3f)

public StackCubeParticles(Vec3d collisionPos, ItemStack stack, float radius, int quantity, float scale, Vec3f velocity = null)

Parameters

collisionPos Vec3d
stack ItemStack
radius float
quantity int
scale float
velocity Vec3f

Fields

collisionPos

The position of the collision to create these particles.

public Vec3d collisionPos

Field Value

Vec3d

quantity

The amount of particles to be released.

public int quantity

Field Value

int

radius

The radius to release the particles.

public float radius

Field Value

float

scale

The scale of the particles.

public float scale

Field Value

float

stack

The contents that the particles are built off of.

public ItemStack stack

Field Value

ItemStack

velocity

public Vec3f velocity

Field Value

Vec3f

Properties

DieInLiquid

Whether the particle should despawn when in contact with liquids

public override bool DieInLiquid { get; }

Property Value

bool

LifeLength

How long the particle should live (default = 1)

public override float LifeLength { get; }

Property Value

float

ParticleModel

Cube or Quad?

public override EnumParticleModel ParticleModel { get; }

Property Value

EnumParticleModel

Pos

Position in the world where the particle should spawn

public override Vec3d Pos { get; }

Property Value

Vec3d

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

float

SecondaryParticles

The secondary particle properties. Secondary particles are particles that are emitted from an in-flight particle.

public override IParticlePropertiesProvider[] SecondaryParticles { get; }

Property Value

IParticlePropertiesProvider[]

Size

Size of the particle

public override float Size { get; }

Property Value

float

SwimOnLiquid

public override bool SwimOnLiquid { get; }

Property Value

bool

VertexFlags

See also VertexFlags

public override int VertexFlags { get; }

Property Value

int

Methods

FromBytes(BinaryReader, IWorldAccessor)

For reading from the network

public override void FromBytes(BinaryReader reader, IWorldAccessor resolver)

Parameters

reader BinaryReader
resolver IWorldAccessor

GetRgbaColor(ICoreClientAPI)

The particles Rgba Color

public override int GetRgbaColor(ICoreClientAPI capi)

Parameters

capi ICoreClientAPI

Returns

int

GetVelocity(Vec3d)

In what direction should the particle fly/fall

public override Vec3f GetVelocity(Vec3d pos)

Parameters

pos Vec3d

Returns

Vec3f

ToBytes(BinaryWriter)

For sending over the network

public override void ToBytes(BinaryWriter writer)

Parameters

writer BinaryWriter