MCPcopy Index your code
hub / github.com/fogleman/Minecraft / update

Method update

main.py:561–581  ·  view source on GitHub ↗

This method is scheduled to be called repeatedly by the pyglet clock. Parameters ---------- dt : float The change in time since the last call.

(self, dt)

Source from the content-addressed store, hash-verified

559 return (dx, dy, dz)
560
561 def update(self, dt):
562 """ This method is scheduled to be called repeatedly by the pyglet
563 clock.
564
565 Parameters
566 ----------
567 dt : float
568 The change in time since the last call.
569
570 """
571 self.model.process_queue()
572 sector = sectorize(self.position)
573 if sector != self.sector:
574 self.model.change_sectors(self.sector, sector)
575 if self.sector is None:
576 self.model.process_entire_queue()
577 self.sector = sector
578 m = 8
579 dt = min(dt, 0.2)
580 for _ in xrange(m):
581 self._update(dt / m)
582
583 def _update(self, dt):
584 """ Private implementation of the `update()` method. This is where most

Callers

nothing calls this directly

Calls 5

_updateMethod · 0.95
sectorizeFunction · 0.85
process_queueMethod · 0.80
change_sectorsMethod · 0.80
process_entire_queueMethod · 0.80

Tested by

no test coverage detected