Table of Contents

Class EntityDropItemStack

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Represents an itemstack that is dropped when killing or harvesting an entity Open in GitHub

public class EntityDropItemStack : BlockDropItemStack
Inheritance
EntityDropItemStack
Inherited Members
Extension Methods

Fields

DamageType

If not null, then the entity must be killed by this damage type in order for this drop to spawn

public EnumDamageType? DamageType

Field Value

EnumDamageType?

Methods

Clone()

Creates a deep copy of this object

public EntityDropItemStack Clone()

Returns

EntityDropItemStack

FromBytes(ref BinarySpanReader, IClassRegistryAPI)

Reads the contents of the block bytes and converts it into a block.

public override void FromBytes(ref BinarySpanReader reader, IClassRegistryAPI instancer)

Parameters

reader BinarySpanReader

The reader of the block

instancer IClassRegistryAPI

The block registry

ToBytes(BinaryWriter)

The save data writer.

public override void ToBytes(BinaryWriter writer)

Parameters

writer BinaryWriter

The writer to write blocks to.