struct Shatter::Data::Slot

Included Modules

Defined in:

shatter/data/slot.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(name : String, count : UInt8, nbt : Hash(String, NBT::Tag) | Nil) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]

Class Method Detail

def self.from_io(io : IO, con : Shatter::Connection) : Slot | Nil #

[View source]

Instance Method Detail

def clone #

[View source]
def copy_with(name _name = @name, count _count = @count, nbt _nbt = @nbt) #

[View source]
def count : UInt8 #

def inspect(io : IO) #
Description copied from struct Struct

Appends this struct's name and instance variables names and values to the given IO.

struct Point
  def initialize(@x : Int32, @y : Int32)
  end
end

p1 = Point.new 1, 2
p1.to_s    # "Point(@x=1, @y=2)"
p1.inspect # "Point(@x=1, @y=2)"

[View source]
def name : String #

def nbt : Hash(String, NBT::Tag) | Nil #

def pretty_print(pp) : Nil #

[View source]