class

Rosegold::Block

Inherits JSON::Serializable / Reference / Object

Constructors

from_block_state_id(state_id : UInt16) : Block
Source
new(pull : JSON::PullParser)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

best_tool?(slot : Slot)
Source
break_damage(main_hand : Slot, player : Player, creative : Bool = false) : Float64
Source
break_time(main_hand : Slot, player : Player, creative : Bool = false) : Int32
Source
can_harvest?(slot : Slot)
Source
hardness
Source
harvest_tools
Source
id_str
Source
material
Source
material_tool_multipliers
Source
max_state_id
Source
min_state_id
Source
states

Not individual block states, but the properties that, in combination, make up each block state. Empty array if block has only one state.

Source
tool_speed_from_any_material(slot : Slot) : Float64 | Nil

Search all materials for the tool's speed multiplier. Handles cases where the block's material doesn't list all valid tools (e.g. obsidian's "incorrect_for_wooden_tool" omits diamond/netherite pickaxes).

Source