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

Method AddWindow

server/world/dimension/window/window.go:24–32  ·  view source on GitHub ↗
(position pos.BlockPosition, w *Window)

Source from the content-addressed store, hash-verified

22}
23
24func (mgr *WindowManager) AddWindow(position pos.BlockPosition, w *Window) error {
25 if w.Id == 0 {
26 return fmt.Errorf("window id should not be 0")
27 }
28 mgr.mu.Lock()
29 defer mgr.mu.Unlock()
30 mgr.windows[position] = w
31 return nil
32}
33
34func (mgr *WindowManager) Range(itr func(pos.BlockPosition, *Window)) {
35 mgr.mu.RLock()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected