MCPcopy Index your code
hub / github.com/BombusMod/BombusMod / run

Method run

src/main/java/images/AniImageList.java:105–131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103
104 private static final int WAIT_TIME = 100;
105 public void run() {
106 long time = System.currentTimeMillis();
107 while (true) {
108 try {
109 Thread.sleep(WAIT_TIME);
110 } catch (Exception e) {
111 }
112 long newTime = System.currentTimeMillis();
113 boolean animationWorked = true;
114 if (animationWorked) {
115 boolean update = false;
116 for (int i = 0; i < size(); i++) {
117 if (null != icons[i]) {
118 update |= icons[i].nextFrame(newTime - time);
119 }
120 }
121 if (update) {
122 Displayable d = BombusMod.getInstance().getDisplay().getCurrent();
123 if (d instanceof Canvas) {
124 ((Canvas)d).repaint();
125 }
126
127 }
128 }
129 time = newTime;
130 }
131 }
132}
133
134//#endif

Callers

nothing calls this directly

Calls 6

sizeMethod · 0.95
getInstanceMethod · 0.95
nextFrameMethod · 0.80
getCurrentMethod · 0.65
getDisplayMethod · 0.65
repaintMethod · 0.65

Tested by

no test coverage detected