MCPcopy Create free account
hub / github.com/ZeppelinMC/Zeppelin / SetFood

Method SetFood

server/entity/entity.go:188–192  ·  view source on GitHub ↗
(food int32, saturation, exhaustion float32)

Source from the content-addressed store, hash-verified

186}
187
188func (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
194func (l *LivingEntity) Health() float32 {
195 return math.Float32frombits(l.health.Load())

Callers 1

NewMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected