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

Method exposed

main.py:222–231  ·  view source on GitHub ↗

Returns False is given `position` is surrounded on all 6 sides by blocks, True otherwise.

(self, position)

Source from the content-addressed store, hash-verified

220 return None, None
221
222 def exposed(self, position):
223 """ Returns False is given `position` is surrounded on all 6 sides by
224 blocks, True otherwise.
225
226 """
227 x, y, z = position
228 for dx, dy, dz in FACES:
229 if (x + dx, y + dy, z + dz) not in self.world:
230 return True
231 return False
232
233 def add_block(self, position, texture, immediate=True):
234 """ Add a block with the given `texture` and `position` to the world.

Callers 3

add_blockMethod · 0.95
check_neighborsMethod · 0.95
show_sectorMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected