class
Rosegold::Slot
- Rosegold::Slot
- Reference
- Object
Direct Known Subclasses
Defined in:
rosegold/inventory/slot.crConstructors
Class Method Summary
- .enchantment_registry : Array(String)
- .enchantment_registry=(enchantment_registry : Array(String))
- .read(io) : Rosegold::Slot
Instance Method Summary
- #components_to_add : Hash(String, DataComponent)
- #components_to_add=(components_to_add : Hash(String, DataComponent))
- #components_to_remove : Set(String)
- #components_to_remove=(components_to_remove : Set(String))
- #count : UInt32
- #count=(count : UInt32)
- #damage
- #decrement
- #durability
- #edible? : Bool
- #efficiency
- #empty?
- #enchanted? : Bool
- #enchantments
- #full?
- #item : MCData::Item
- #item_id_int : UInt32
- #item_id_int=(value : UInt32)
- #make_empty
- #matches?(item_id_int : UInt32)
- #matches?(name : String)
- #matches?(spec : Rosegold::Slot -> _)
- #matches?(&)
- #max_durability
- #max_stack_size
- #name : String
- #needs_repair? : Bool
- #present?
- #repair_cost : Int32
- #swap_with(other)
- #to_s(io)
- #tool_component : DataComponents::Tool | Nil
-
#tool_speed_for_tag(tag : String) : Float32 | Nil
Get the mining speed from the tool component for a given block tag
- #worth_repairing? : Bool
- #write(io)
Constructor Detail
def self.new(count : UInt32 = 0_u32, item_id_int : UInt32 = 0_u32, components_to_add : Hash(String, Rosegold::DataComponent) = Hash(String, DataComponent).new, components_to_remove : Set(String) = Set(String).new)
#
Class Method Detail
Instance Method Detail
def tool_speed_for_tag(tag : String) : Float32 | Nil
#
Get the mining speed from the tool component for a given block tag