Interface ToolMaterial

Object used to describe tool material type.

interface ToolMaterial {
    damage?: number;
    durability?: number;
    efficiency?: number;
    level?: number;
}

Properties

damage?: number

Additional damage for the instruments, this value is added to the base tool damage. If damage is not integer, it is rounded to the higher integer with the chance of the fractional part, e.g. if the value is 3.3, the damage will be 4 with the chance of 30%.

durability?: number

Durability of the tool, 33 is a default value for golden tools and 1562 is a default value for diamond tools.

efficiency?: number

Divider used to calculate block breaking speed. 2 is a default value for wooden instruments and 12 is a default value for golden instruments.

level?: number

Block breaking level, 1 is wooden instruments, 4 is diamond instruments. If block's breaking level is less or equal to the tool's level, block will be dropped when broken.

Copyright © 2024 Nernar. Copyright © 2020 #mineprogramming. Built with ❤ and TypeDoc.