Table of Contents

Class BlockDropItemStack

Namespace
Vintagestory.API.Common
Assembly
VintagestoryAPI.dll

Represents an itemstack that is dropped when breaking a block, with a potentially random quantity.

public class BlockDropItemStack
Inheritance
BlockDropItemStack

Examples

"drops": [
	{
		"type": "item",
		"code": "bone",
		"quantity": {
			"avg": 4,
			"var": 2
		}
	}
]

Fields

Code (Required)

Code of the block or item

public AssetLocation Code

Field Value

AssetLocation

Type (Recommended) (Default: Block)

Block or Item?

public EnumItemClass Type

Field Value

EnumItemClass

Attributes (Optional) (Default: None)

Tree Attributes that should be attached to the resulting itemstack

[JsonProperty]
[JsonConverter(typeof(JsonAttributesConverter))]
public JsonObject Attributes

Field Value

JsonObject

DropModbyStat (Optional) (Default: None)

If set, the drop quantity will be modified by the collecting entity stat code - entity.Stats.GetBlended(code).

public string DropModbyStat

Field Value

string

LastDrop (Optional) (Default: false)

If true, and this drop occurs, no further drops will happen.

public bool LastDrop

Field Value

bool

Quantity (Optional) (Default: 1)

Quantity to be dropped

public NatFloat Quantity

Field Value

NatFloat

Tool (Optional) (Default: None)

If set, then the given tool is required to make this block drop anything.

public EnumTool? Tool

Field Value

EnumTool?