class Rosegold::Slot

Direct Known Subclasses

Defined in:

rosegold/world/slot.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(item_id_int : UInt32 = 0, count : UInt8 = 0, nbt : Nil | Minecraft::NBT::CompoundTag = nil) #

[View source]

Class Method Detail

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

[View source]

Instance Method Detail

def count : UInt8 #

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

[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_id : String #

Use to get the item_id in new-age string format To get the legacy int format, use #item_id_int


[View source]
def item_id_int : UInt32 #

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

[View source]
def make_empty #

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

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

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

[View source]
def matches?(&) #

[View source]
def max_durability #

[View source]
def max_stack_size #

[View source]
def nbt : Minecraft::NBT::CompoundTag | Nil #

[View source]
def nbt=(nbt : Minecraft::NBT::CompoundTag | Nil) #

[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]