struct PacketBuffer

Defined in:

buffer/buffer.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(data : Bytes = Bytes.new(0)) #

[View source]

Class Method Detail

def self.var_int_size(value : Int32) : Int32 #

[View source]

Instance Method Detail

def data : Bytes #

[View source]
def offset : Int32 #

[View source]
def read_angle : Angle #

[View source]
def read_att_property : Attribute::Property #

[View source]
def read_att_property_array(length : Int32) : Array(Attribute::Property) #

[View source]
def read_block_record : BlockRecord #

[View source]
def read_block_record_array(length : Int32) : Array(BlockRecord) #

[View source]
def read_boolean : Bool #

[View source]
def read_byte_array(length : Int32) : Bytes #

[View source]
def read_chunk(primary_bit_mask : UInt16, size_or_sky_light : Int32 | Bool) : Chunk::Column #

[View source]
def read_chunk_array_from_meta(meta : Array(Chunk::Meta), sky_light_sent : Bool) : Array(Chunk::Column) #

[View source]
def read_chunk_meta : Chunk::Meta #

[View source]
def read_chunk_meta_array(length : Int32) : Array(Chunk::Meta) #

[View source]
def read_double : Float64 #

[View source]
def read_explosion_record : ExplosionRecord #

[View source]
def read_explosion_record_array(length : Int32) : Array(ExplosionRecord) #

[View source]
def read_float : Float32 #

[View source]
def read_int : Int32 #

[View source]
def read_long : Int64 #

[View source]
def read_map_icon : MapIcon #

[View source]
def read_map_icon_array(length : Int32) : Array(MapIcon) #

[View source]
def read_metadata : Metadata::Data #

[View source]
def read_modifier : Attribute::Modifier #

[View source]
def read_modifier_array(length : Int32) : Array(Attribute::Modifier) #

[View source]
def read_nbt(type : Int8 | Nil = nil) : Nbt::Value | Nil #

[View source]
def read_pl_property_array(length : Int32) : Array(PlayerList::Property) #

[View source]
def read_player(action : Int32) : PlayerList::Value #

[View source]
def read_player_array(length : Int32, action) : Array(PlayerList::Value) #

[View source]
def read_position : Position #

[View source]
def read_remaining_bytes : Bytes #

[View source]
def read_short : Int16 #

[View source]
def read_signed_byte : Int8 #

[View source]
def read_slot : Slot #

[View source]
def read_slot_array(length : Int32) : Array(Slot) #

[View source]
def read_statistic : Statistic #

[View source]
def read_statistic_array(length : Int32) : Array(Statistic) #

[View source]
def read_string : String #

[View source]
def read_string_array(length : Int32) : Array(String) #

[View source]
def read_title_action(action : Int32) : Title::Action #

[View source]
def read_unsigned_byte : UInt8 #

[View source]
def read_unsigned_byte_array(length : Int32) : Array(UInt8) #

[View source]
def read_unsigned_short : UInt16 #

[View source]
def read_unsigned_short_array(length : Int32) : Array(UInt16) #

[View source]
def read_uuid : UUID #

[View source]
def read_var_int : Int32 #

[View source]
def read_var_int_array(length : Int32) : Array(Int32) #

[View source]
def read_var_long : Int64 #

[View source]
def read_wb_action(action : Int32) : WorldBorder::Action #

[View source]
def write_angle(angle : Angle) #

[View source]
def write_att_property(property : Attribute::Property) #

[View source]
def write_att_property_array(array : Array(Attribute::Property), *_args) #

[View source]
def write_block_record_array(array : Array(BlockRecord), *_args) #

[View source]
def write_boolean(boolean : Bool) #

[View source]
def write_byte_array(array : Bytes, *_args) #

[View source]
def write_chunk_meta_array(array : Array(Chunk::Meta), *_args) #

[View source]
def write_double(double : Float64) #

[View source]
def write_explosion_record_array(array : Array(ExplosionRecord), *_args) #

[View source]
def write_float(float : Float32) #

[View source]
def write_int(int : Int32) #

[View source]
def write_long(long : Int64) #

[View source]
def write_map_icon_array(array : Array(MapIcon), *_args) #

[View source]
def write_modifier(modifier : Attribute::Modifier) #

[View source]
def write_modifier_array(array : Array(Attribute::Modifier), *_args) #

[View source]
def write_pl_property_array(array : Array(PlayerList::Property), *_args) #

[View source]
def write_player_array(array : Array(PlayerList::Value), action, *_args) #

[View source]
def write_position(position : Position) #

[View source]
def write_short(short : Int16) #

[View source]
def write_signed_byte(byte : Int8) #

[View source]
def write_slot_array(array : Array(Slot), *_args) #

[View source]
def write_statistic_array(array : Array(Statistic), *_args) #

[View source]
def write_string(string : String) #

[View source]
def write_string_array(array : Array(String), *_args) #

[View source]
def write_unsigned_byte(byte : UInt8) #

[View source]
def write_unsigned_byte_array(array : Array(UInt8), *_args) #

[View source]
def write_unsigned_short(short : UInt16) #

[View source]
def write_unsigned_short_array(array : Array(UInt16), *_args) #

[View source]
def write_uuid(uuid : UUID) #

[View source]
def write_var_int(value : Int32) #

[View source]
def write_var_int_array(array : Array(Int32), *_args) #

[View source]
def write_var_long(value : Int64) #

[View source]