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

Method Encode

server/container/container.go:31–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

29}
30
31func (c Container) Encode() []slot.Slot {
32 s := make([]slot.Slot, len(c))
33 for _, item := range c {
34 id, ok := registry.Item.Lookup(item.Id)
35 if !ok {
36 continue
37 }
38 s[item.Slot] = slot.Slot{
39 ItemCount: item.Count,
40 ItemId: id,
41 }
42 }
43
44 return s
45}
46
47// Set adds the item to the container and replaces the existing one if found, and returns if the operation was successful
48func (c *Container) Set(item item.Item) {

Callers

nothing calls this directly

Calls 1

LookupMethod · 0.80

Tested by

no test coverage detected