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

Method SetAttribute

server/entity/entity.go:81–89  ·  view source on GitHub ↗
(id string, base float64)

Source from the content-addressed store, hash-verified

79}
80
81func (p *Entity) SetAttribute(id string, base float64) {
82 p.attr_mu.Lock()
83 defer p.attr_mu.Unlock()
84 i := slices.IndexFunc(p.attributes, func(att Attribute) bool { return att.Id == id })
85 if i == -1 {
86 return
87 }
88 p.attributes[i].Base = base
89}
90
91// Metadata returns a clone of the metadata of this state
92func (p *Entity) Metadata() metadata.Metadata {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected