class Rosegold::Entity

Defined in:

rosegold/world/entity.cr

Constant Summary

METADATA = Array(Metadata).from_json(Rosegold.read_game_asset("entities.json"))

Constructors

Instance Method Summary

Constructor Detail

def self.new(entity_id : UInt64, uuid : UUID, entity_type : UInt32, position : Rosegold::Vec3d, pitch : Float32, yaw : Float32, head_yaw : Float32, velocity : Rosegold::Vec3d, on_ground : Bool = true, living : Bool = false) #

[View source]

Instance Method Detail

def bounding_box #

[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 entity_type : UInt32 #

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

[View source]
def head_yaw : Float32 #

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

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

[View source]
def living? : Bool #

[View source]
def metadata #

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

[View source]
def on_ground? : Bool #

[View source]
def passenger_ids : Array(UInt64) #

[View source]
def passenger_ids=(passenger_ids : Array(UInt64)) #

[View source]
def pitch : Float32 #

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

[View source]
def position : Vec3d #

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

[View source]
def update_passengers(client) #

[View source]
def uuid : UUID #

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

[View source]
def velocity : Vec3d #

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

[View source]
def yaw : Float32 #

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

[View source]