class Rosegold::DataComponents::PotionContents

Overview

Component for potion contents (visual and effects of a potion item)

Defined in:

rosegold/inventory/slot.cr

Constructors

Instance Method Summary

Instance methods inherited from class Rosegold::DataComponent

write(io) : Nil write

Constructor methods inherited from class Rosegold::DataComponent

create_component(component_type : UInt32, io) : DataComponent create_component

Constructor Detail

def self.new(has_potion_id : Bool = false, potion_id : UInt32 | Nil = nil, has_custom_color : Bool = false, custom_color : UInt32 | Nil = nil, custom_effects : Array(Rosegold::DataComponents::PotionContents::PotionEffect) = [] of PotionEffect, custom_name : String = "") #

[View source]
def self.read(io) : PotionContents #

[View source]

Instance Method Detail

def custom_color : UInt32 | Nil #

[View source]
def custom_color=(custom_color : UInt32 | Nil) #

[View source]
def custom_effects : Array(PotionEffect) #

[View source]
def custom_effects=(custom_effects : Array(PotionEffect)) #

[View source]
def custom_name : String #

[View source]
def custom_name=(custom_name : String) #

[View source]
def has_custom_color : Bool #

[View source]
def has_custom_color=(has_custom_color : Bool) #

[View source]
def has_potion_id : Bool #

[View source]
def has_potion_id=(has_potion_id : Bool) #

[View source]
def potion_id : UInt32 | Nil #

[View source]
def potion_id=(potion_id : UInt32 | Nil) #

[View source]
def write(io) : Nil #

[View source]