ctx.items.damage and player_death event moved to bworld

This commit is contained in:
2026-11-14 00:09:55 -03:00
parent 9bf6b98953
commit 6c6be61dd0
7 changed files with 34 additions and 14 deletions
+3
View File
@@ -576,6 +576,9 @@ export interface ItemApi {
fluid_capacity(id: Id): number | undefined;
// the tool type it is, like "pickaxe" or "shovel", from the item's "tool"
tool(id: Id): string | undefined;
// takes durability off a tool, kept in its data's damage, like ItemStack.hurtAndBreak. true when that used it up.
// does nothing to items that aren't tools
damage(item: ItemStack, amount: number): boolean;
// what one of it sells for with this data, or undefined if it can't be sold: the item's "base_sell_value", and a full
// fluid container's fluid on top, rounded up. see docs/modding/resources/fluids.md
sell_value(id: Id, data?: unknown): number | undefined;