MCPcopy
hub / github.com/fogleman/Minecraft / show_block

Method show_block

main.py:293–310  ·  view source on GitHub ↗

Show the block at the given `position`. This method assumes the block has already been added with add_block() Parameters ---------- position : tuple of len 3 The (x, y, z) position of the block to show. immediate : bool Whether or not

(self, position, immediate=True)

Source from the content-addressed store, hash-verified

291 self.hide_block(key)
292
293 def show_block(self, position, immediate=True):
294 """ Show the block at the given `position`. This method assumes the
295 block has already been added with add_block()
296
297 Parameters
298 ----------
299 position : tuple of len 3
300 The (x, y, z) position of the block to show.
301 immediate : bool
302 Whether or not to show the block immediately.
303
304 """
305 texture = self.world[position]
306 self.shown[position] = texture
307 if immediate:
308 self._show_block(position, texture)
309 else:
310 self._enqueue(self._show_block, position, texture)
311
312 def _show_block(self, position, texture):
313 """ Private implementation of the `show_block()` method.

Callers 3

add_blockMethod · 0.95
check_neighborsMethod · 0.95
show_sectorMethod · 0.95

Calls 2

_show_blockMethod · 0.95
_enqueueMethod · 0.95

Tested by

no test coverage detected