class Rosegold::Slot

Direct Known Subclasses

Defined in:

rosegold/inventory/slot.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(count : UInt32 = 0_u32, item_id_int : UInt32 = 0_u32, components_to_add : Hash(UInt32, Rosegold::DataComponent) = Hash(UInt32, DataComponent).new, components_to_remove : Set(UInt32) = Set(UInt32).new) #

[View source]

Class Method Detail

def self.read(io) : Rosegold::Slot #

[View source]

Instance Method Detail

def components_to_add : Hash(UInt32, DataComponent) #

[View source]
def components_to_add=(components_to_add : Hash(UInt32, DataComponent)) #

[View source]
def components_to_remove : Set(UInt32) #

[View source]
def components_to_remove=(components_to_remove : Set(UInt32)) #

[View source]
def count : UInt32 #

[View source]
def count=(count : UInt32) #

[View source]
def damage #

[View source]
def decrement #

[View source]
def durability #

[View source]
def edible? : Bool #

[View source]
def efficiency #

[View source]
def empty? #

[View source]
def enchanted? : Bool #

[View source]
def enchantments #

[View source]
def full? #

[View source]
def item : MCData::Item #

[View source]
def item_id_int : UInt32 #

[View source]
def item_id_int=(value : UInt32) #

[View source]
def make_empty #

[View source]
def matches?(item_id_int : UInt32) #

[View source]
def matches?(name : String) #

[View source]
def matches?(spec : Rosegold::Slot -> _) #

[View source]
def matches?(&) #

[View source]
def max_durability #

[View source]
def max_stack_size #

[View source]
def name : String #

[View source]
def needs_repair? : Bool #

[View source]
def present? #

[View source]
def repair_cost : Int32 #

[View source]
def swap_with(other) #

[View source]
def to_s(io) #

[View source]
def worth_repairing? : Bool #

[View source]
def write(io) #

[View source]