Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var TierDiamond = Tier{HarvestLevel: 4, Durability: 1561, BaseMiningEfficiency: 8, BaseAttackDamage: 4}
TierDiamond is the tier of diamond tools.
var TierGold = Tier{HarvestLevel: 1, Durability: 32, BaseMiningEfficiency: 12, BaseAttackDamage: 1}
TierGold is the tier of gold tools.
var TierIron = Tier{HarvestLevel: 3, Durability: 250, BaseMiningEfficiency: 6, BaseAttackDamage: 3}
TierIron is the tier of iron tools.
var TierNetherite = Tier{HarvestLevel: 4, Durability: 2031, BaseMiningEfficiency: 9, BaseAttackDamage: 5}
TierNetherite is the tier of netherite tools. This is the highest possible tier.
var TierStone = Tier{HarvestLevel: 2, Durability: 131, BaseMiningEfficiency: 4, BaseAttackDamage: 2}
TierStone is the tier of stone tools.
var TierWood = Tier{HarvestLevel: 1, Durability: 59, BaseMiningEfficiency: 2, BaseAttackDamage: 1}
TierWood is the tier of wood tools. This is the lowest possible tier.
var TypeAxe = Type{t(1)}
TypeAxe is the type for axes.
var TypeHoe = Type{t(2)}
TypeHoe is the type for hoes.
var TypeNone = Type{t(-1)}
TypeNone is the type of items that are not tools.
var TypePickaxe = Type{t(0)}
TypePickaxe is the type for pickaxes.
var TypeShears = Type{t(4)}
TypeShears is the type for shears.
var TypeShovel = Type{t(3)}
TypeShovel is the type for shovels.
var TypeSword = Type{t(5)}
TypeSword is the type for swords.
Functions ¶
This section is empty.
Types ¶
type None ¶
type None struct{}
None is a tool type typically used in functions for items that do not function as tools.
func (None) BaseMiningEfficiency ¶
BaseMiningEfficiency ...
type Tier ¶
type Tier struct { // HarvestLevel is the level that this tier of tools is able to harvest. If a block has a harvest level // above this one, a tool with this tier won't be able to harvest it. HarvestLevel int // BaseMiningEfficiency is the base efficiency of the tier, when it comes to mining blocks. This is // specifically used for tools such as pickaxes. BaseMiningEfficiency float64 // BaseAttackDamage is the base attack damage of tools with this tiers. All tools have a constant value // that is added on top of this. BaseAttackDamage float64 // BaseDurability returns the maximum durability that a tool with this tier has. Durability int }
Tier represents the tier, or material, that a tool is made of.
type Tool ¶
type Tool interface { // ToolType returns the type of the tool. The blocks that can be mined with this tool depend on this // tool type. ToolType() Type // HarvestLevel returns the level that this tool is able to harvest. If a block has a harvest level above // this one, this tool won't be able to harvest it. HarvestLevel() int // BaseMiningEfficiency is the base efficiency of the tool, when it comes to mining blocks. This decides // the speed with which blocks can be mined. // Some tools have a mining efficiency that depends on the block (swords, shears). The block mined is // passed for this behaviour. BaseMiningEfficiency(b world.Block) float64 }
Tool represents an item that may be used as a tool.