Class BlockDropItemStack
- Namespace
- Vintagestory.API.Common
- Assembly
- VintagestoryAPI.dll
Represents an itemstack that is dropped when breaking a block, with a potentially random quantity. Open in GitHub
[DocumentAsJson]
public class BlockDropItemStack
- Inheritance
-
BlockDropItemStack
- Derived
Examples
"drops": [
{
"type": "item",
"code": "bone",
"quantity": {
"avg": 4,
"var": 2
}
}
]
Fields
Code (Required)
Code of the block or item
[DocumentAsJson("Required", "", false)]
public AssetLocation? Code
Field Value
Type (Recommended) (Default: Block)
Block or Item?
[DocumentAsJson("Recommended", "Block", false)]
public EnumItemClass Type
Field Value
Attributes (Optional) (Default: None)
Tree Attributes that should be attached to the resulting itemstack
[JsonProperty]
[JsonConverter(typeof(JsonAttributesConverter))]
[DocumentAsJson("Optional", "None", false)]
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).
[DocumentAsJson("Optional", "None", false)]
public string? DropModbyStat
Field Value
LastDrop (Optional) (Default: False)
If true, and this drop occurs, no further drops will happen.
[DocumentAsJson("Optional", "False", false)]
public bool LastDrop
Field Value
Quantity (Optional) (Default: 1)
Quantity to be dropped
[DocumentAsJson("Optional", "1", false)]
public NatFloat Quantity
Field Value
Tool (Optional) (Default: None)
If set, then the given tool is required to make this block drop anything.
[DocumentAsJson("Optional", "None", false)]
public EnumTool? Tool