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
Type (Recommended) (Default: Block)
Block or Item?
public EnumItemClass Type
Field Value
Attributes (Optional) (Default: None)
Tree Attributes that should be attached to the resulting itemstack
[JsonProperty]
[JsonConverter(typeof(JsonAttributesConverter))]
public JsonObject Attributes
Field Value
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
LastDrop (Optional) (Default: false)
If true, and this drop occurs, no further drops will happen.
public bool LastDrop
Field Value
Quantity (Optional) (Default: 1)
Quantity to be dropped
public NatFloat Quantity
Field Value
Tool (Optional) (Default: None)
If set, then the given tool is required to make this block drop anything.
public EnumTool? Tool