class Rosegold::Player

Overview

Holds assumed server-side player state. Only gets updated when reading/writing packets.

Defined in:

rosegold/world/player.cr

Constant Summary

CRAWLING_AABB = AABBf.new(-0.3, 0.0, -0.3, 0.3, 0.625, 0.3)
CRAWLING_EYE_HEIGHT = 0.40
DEFAULT_AABB = AABBf.new(-0.3, 0.0, -0.3, 0.3, 1.8, 0.3)
DEFAULT_EYE_HEIGHT = 1.62
SNEAKING_AABB = AABBf.new(-0.3, 0.0, -0.3, 0.3, 1.5, 0.3)
SNEAKING_EYE_HEIGHT = 1.27

Instance Method Summary

Instance Method Detail

def aabb #

[View source]
def effect_by_name(name) #

[View source]
def effects : Array(EntityEffect) #

[View source]
def effects=(effects : Array(EntityEffect)) #

[View source]
def entity_id : UInt64 #

[View source]
def entity_id=(entity_id : UInt64) #

[View source]
def eyes #

[View source]
def feet : Vec3d #

[View source]
def feet=(feet : Vec3d) #

[View source]
def food : UInt32 #

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

[View source]
def gamemode : Int8 #

[View source]
def gamemode=(gamemode : Int8) #

[View source]
def health : Float32 #

[View source]
def health=(health : Float32) #

[View source]
def hotbar_selection : UInt8 #

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

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

[View source]
def in_water? : Bool #

[View source]
def look : Look #

[View source]
def look=(look : Look) #

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

[View source]
def on_ground? : Bool #

[View source]
def saturation : Float32 #

[View source]
def saturation=(saturation : Float32) #

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

[View source]
def sneaking? : Bool #

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

[View source]
def sprinting? : Bool #

[View source]
def username : String | Nil #

[View source]
def username=(username : String | Nil) #

[View source]
def uuid : UUID | Nil #

[View source]
def uuid=(uuid : UUID | Nil) #

[View source]
def velocity : Vec3d #

[View source]
def velocity=(velocity : Vec3d) #

[View source]