class
Rosegold::Player
- Rosegold::Player
- Reference
- Object
Defined in:
rosegold/world/player.crConstant 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 -
MOVEMENT_SPEED_ATTRIBUTE_IDS =
{772_u32 => 22_u32, 773_u32 => 22_u32, 774_u32 => 22_u32, 775_u32 => 22_u32, 776_u32 => 26_u32, 777_u32 => 26_u32} -
26.2 adds four attributes before movement_speed, shifting its registry id.
-
SNEAKING_AABB =
AABBf.new(-0.3, 0.0, -0.3, 0.3, 1.5, 0.3) -
SNEAKING_EYE_HEIGHT =
1.27 -
SPRINT_EXCLUDED_MODIFIER_IDS =
Set {Rosegold::AttributeSnapshot::SPRINTING_MODIFIER_ID}
Instance Method Summary
- #aabb
- #allow_flying=(allow_flying : Bool)
- #allow_flying? : Bool
- #apply_attribute_snapshots(snapshots : Array(AttributeSnapshot)) : Nil
- #attributes : Hash(UInt32, AttributeSnapshot)
- #attributes=(attributes : Hash(UInt32, AttributeSnapshot))
- #clear_attributes : Nil
- #creative_mode=(creative_mode : Bool)
- #creative_mode? : Bool
- #effect_by_name(name)
- #effects : Array(EntityEffect)
- #effects=(effects : Array(EntityEffect))
- #entity_id : UInt64
- #entity_id=(entity_id : UInt64)
- #experience_level : UInt32
- #experience_level=(experience_level : UInt32)
- #experience_progress : Float32
- #experience_progress=(experience_progress : Float32)
- #eyes
- #fall_distance : Float64
- #fall_distance=(fall_distance : Float64)
- #feet
- #feet=(value : Vec3d)
- #field_of_view_modifier : Float32
- #field_of_view_modifier=(field_of_view_modifier : Float32)
- #flying=(flying : Bool)
- #flying? : Bool
- #flying_speed : Float32
- #flying_speed=(flying_speed : Float32)
- #food : UInt32
- #food=(food : UInt32)
- #gamemode : Int8
- #gamemode=(gamemode : Int8)
-
#ground_movement_speed(base_movement_speed : Float64) : Float64
Synced attribute already folds in Speed/Slowness; sprint is excluded here because physics applies SPRINT_MULTIPLIER itself.
- #has_slow_falling? : Bool
- #health : Float32
- #health=(health : Float32)
- #hotbar_selection : UInt32
- #hotbar_selection=(hotbar_selection : UInt32)
- #in_water=(in_water : Bool)
- #in_water? : Bool
- #invulnerable=(invulnerable : Bool)
- #invulnerable? : Bool
- #jump_boost_level : Int32
- #levitation_level : Int32
- #look
- #look=(value : Look)
- #movement_speed_attribute : AttributeSnapshot | Nil
- #on_ground=(on_ground : Bool)
- #on_ground? : Bool
- #saturation : Float32
- #saturation=(saturation : Float32)
- #slowness_level : Int32
- #sneaking=(sneaking : Bool)
- #sneaking? : Bool
- #speed_level : Int32
- #sprinting=(sprinting : Bool)
- #sprinting? : Bool
- #total_experience : UInt32
- #total_experience=(total_experience : UInt32)
- #username : String | Nil
- #username=(username : String | Nil)
- #uuid : UUID | Nil
- #uuid=(uuid : UUID | Nil)
- #velocity
- #velocity=(value : Vec3d)
Instance Method Detail
def ground_movement_speed(base_movement_speed : Float64) : Float64
#
Synced attribute already folds in Speed/Slowness; sprint is excluded here because physics applies SPRINT_MULTIPLIER itself. Effect formula is the no-attribute fallback.