class

Rosegold::Entity

Inherits Reference / Object

Constants

METADATA_12111 = Array(Metadata).from_json(Rosegold.read_game_asset("1.21.11/entities.json"))
METADATA_1218 = Array(Metadata).from_json(Rosegold.read_game_asset("1.21.8/entities.json"))
METADATA_261 = Array(Metadata).from_json(Rosegold.read_game_asset("26.1/entities.json"))
METADATA_BY_PROTOCOL = {772_u32 => METADATA_1218, 774_u32 => METADATA_12111, 775_u32 => METADATA_261}
NON_PICKABLE_ENTITIES = Set {"item", "experience_orb", "area_effect_cloud", "marker", "block_display", "item_display", "text_display", "lightning_bolt", "evoker_fangs", "ominous_item_spawner", "eye_of_ender", "arrow", "spectral_arrow", "trident", "fireball", "small_fireball", "dragon_fireball", "wither_skull", "snowball", "egg", "ender_pearl", "experience_bottle", "splash_potion", "lingering_potion", "llama_spit", "wind_charge", "breeze_wind_charge", "firework_rocket", "fishing_bobber"}

Matches vanilla MC's Entity.isPickable() = false. Default is pickable; only these are excluded.

Constructors

new(entity_id : UInt32, 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)
Source

Class methods

metadata_for_protocol
Source

Instance methods

bounding_box
Source
effects
Source
effects=(effects : Array(EntityEffect))
Source
entity_id
Source
entity_id=(entity_id : UInt32)
Source
entity_type
Source
entity_type=(entity_type : UInt32)
Source
head_yaw
Source
head_yaw=(head_yaw : Float32)
Source
living=(living : Bool)
Source
living?
Source
metadata
Source
on_ground=(on_ground : Bool)
Source
on_ground?
Source
passenger_ids
Source
passenger_ids=(passenger_ids : Array(UInt32))
Source
pickable?

Mirrors vanilla MC's Entity.isPickable().

Source
pitch
Source
pitch=(pitch : Float32)
Source
position
Source
position=(position : Vec3d)
Source
update_passengers(client)
Source
uuid
Source
uuid=(uuid : UUID)
Source
velocity
Source
velocity=(velocity : Vec3d)
Source
yaw=(yaw : Float32)
Source

Nested types