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

Method hide_block

main.py:333–349  ·  view source on GitHub ↗

Hide the block at the given `position`. Hiding does not remove the block from the world. Parameters ---------- position : tuple of len 3 The (x, y, z) position of the block to hide. immediate : bool Whether or not to immediately remov

(self, position, immediate=True)

Source from the content-addressed store, hash-verified

331 ('t2f/static', texture_data))
332
333 def hide_block(self, position, immediate=True):
334 """ Hide the block at the given `position`. Hiding does not remove the
335 block from the world.
336
337 Parameters
338 ----------
339 position : tuple of len 3
340 The (x, y, z) position of the block to hide.
341 immediate : bool
342 Whether or not to immediately remove the block from the canvas.
343
344 """
345 self.shown.pop(position)
346 if immediate:
347 self._hide_block(position)
348 else:
349 self._enqueue(self._hide_block, position)
350
351 def _hide_block(self, position):
352 """ Private implementation of the 'hide_block()` method.

Callers 3

remove_blockMethod · 0.95
check_neighborsMethod · 0.95
hide_sectorMethod · 0.95

Calls 2

_hide_blockMethod · 0.95
_enqueueMethod · 0.95

Tested by

no test coverage detected