module Minecraft::IO

Direct including types

Defined in:

minecraft/io.cr

Constant Summary

ABS_MAX_LP_VEC3 = 1.7179869183e10
ABS_MIN_LP_VEC3 = 3.051944088384301e-5

Instance Method Summary

Instance Method Detail

def read_angle256_deg : Float32 #

[View source]
def read_bit_location : Rosegold::Vec3i #

[View source]
def read_bool #

[View source]
def read_byte #

[View source]
def read_double : Float64 #

[View source]
def read_float : Float32 #

[View source]
def read_int : Int32 #

[View source]
def read_long : Int64 #

[View source]
def read_lp_vec3 : Tuple(Float64, Float64, Float64) #

Read LpVec3 (packed velocity format used in 1.21.11+) See decompiled net.minecraft.network.LpVec3 for reference


[View source]
def read_nbt : Minecraft::NBT::Tag #

[View source]
def read_nbt_unamed : Minecraft::NBT::Tag #

[View source]
def read_opt_string : String | Nil #

[View source]
def read_short : Int16 #

[View source]
def read_signed_byte #

[View source]
def read_text_component : Rosegold::TextComponent #

[View source]
def read_ushort : UInt16 #

[View source]
def read_uuid : UUID #

[View source]
def read_var_bytes : Bytes #

[View source]
def read_var_int : UInt32 #

[View source]
def read_var_long : UInt64 #

[View source]
def read_var_string(size : UInt32) : String #

[View source]
def read_var_string : String #

[View source]
def write(x : Int32, y : Int32, z : Int32) #

[View source]
def write(value : Bool) #

[View source]
def write(str : String) #

[View source]
def write(value : Float32 | Float64 | UInt8 | Int8) #

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

[View source]
def write(value : UInt16 | Int16 | UInt32 | Int32 | UInt64 | Int64) #

writes var int


[View source]
def write(nbt : NBT::Tag) #

[View source]
def write(slot : Rosegold::Slot) #

[View source]
def write(text_component : Rosegold::TextComponent) #

[View source]
def write(angle : Minecraft::Angle) #

[View source]
def write(location : Rosegold::Vec3i) #

[View source]
def write_angle256_deg(deg : Float32 | Float64) #

[View source]
def write_full(value : UInt16 | Int16 | UInt32 | Int32 | UInt64 | Int64 | Float32 | Float64) #

writes all bytes even for small magnitudes, not var int


[View source]
def write_lp_vec3(vx : Float64, vy : Float64, vz : Float64) #

Write LpVec3 (packed velocity format used in 1.21.11+)


[View source]
def write_opt_string(str : String | Nil) #

[View source]