(food int32, saturation, exhaustion float32)
| 186 | } |
| 187 | |
| 188 | func (l *LivingEntity) SetFood(food int32, saturation, exhaustion float32) { |
| 189 | l.food.Store(uint32(food)) |
| 190 | l.foodSaturation.Store(math.Float32bits(saturation)) |
| 191 | l.foodExhaustion.Store(math.Float32bits(exhaustion)) |
| 192 | } |
| 193 | |
| 194 | func (l *LivingEntity) Health() float32 { |
| 195 | return math.Float32frombits(l.health.Load()) |