MCPcopy Create free account

hub / github.com/XenonLab-Studio/TerraCraft / functions

Functions129 in github.com/XenonLab-Studio/TerraCraft

↓ 37 callersMethodadd_block
Add a block with the given `texture` and `position` to the world. Parameters ---------- position : tuple of len 3
game/world.py:319
↓ 19 callersFunction_tex_coords
Return a list of the texture squares for the top, bottom and side.
game/blocks.py:45
↓ 9 callersMethodget
(self, item, default)
game/savemanager.py:115
↓ 8 callersFunctiongrad3
(hash, x, y, z)
libs/perlin.py:326
↓ 7 callersFunctionlerp
(t, a, b)
libs/perlin.py:322
↓ 7 callersFunctionsectorize
Returns a tuple representing the sector for the given `position` :param position: tuple of len 3 :return: tuple of len 3 representing the sec
game/utilities.py:63
↓ 6 callersMethod_enqueue
Add `func` to the internal queue.
game/world.py:519
↓ 6 callersMethodtimestamp_print
(txt)
game/savemanager.py:63
↓ 5 callersMethod_create_plus
(self, chunk, x, y, z, block)
game/genworld.py:306
↓ 5 callersMethodchange_scene
Change to a specific Scene, by it's class name. When changing to a new Scene, any Window event handlers that are defined on the new S
game/scenemanager.py:68
↓ 5 callersMethodempty
Returns True if given `position` does not contain block. If `must_be_loaded` is True, this returns False if the block is not yet loaded.
game/world.py:296
↓ 5 callersMethodset_exclusive_mouse
If `exclusive` is True, the game will capture the mouse, if False the game will ignore the mouse.
game/scenes.py:283
↓ 4 callersMethod_iter_xz
Iterate all the xz block positions from a sector
game/genworld.py:159
↓ 3 callersFunction_tex_coord
Return the bounding vertices of the texture square.
game/blocks.py:35
↓ 3 callersMethodadd_scene
Add a Scene instance to the manager. :param scene_instance: An instace of a `Scene`.
game/scenemanager.py:61
↓ 3 callersMethodcontains_y_range
True if the horizontal plan between `ymin` and `ymax` is inside this sector.
game/world.py:96
↓ 3 callersMethodnoise3
Generate a noise 3D.
game/noise.py:80
↓ 3 callersMethodplay
Play a sound effect on the next available channel :param source: A pyglet audio Source :param position: Optional spacial position for
game/scenes.py:68
↓ 3 callersMethodrandomize
Randomize the permutation table used by the noise functions. This makes them generate a different noise pattern for the same inputs.
libs/perlin.py:113
↓ 2 callersMethod_create_box
(self, chunk, x, y, z, block)
game/genworld.py:313
↓ 2 callersMethod_dequeue
Pop the top function from the internal queue and call it.
game/world.py:525
↓ 2 callersMethod_get_biome
(self, x, z)
game/genworld.py:237
↓ 2 callersMethod_highlight_save_slot
(self)
game/scenes.py:149
↓ 2 callersMethodcheck_face_full
(self, face)
game/world.py:146
↓ 2 callersMethodcheck_neighbors
Check all blocks surrounding `position` and ensure their visual state is current. This means hiding blocks that are not exposed and e
game/world.py:199
↓ 2 callersMethodcontains_y
True if the horizontal plan `y` is inside this sector.
game/world.py:92
↓ 2 callersFunctioncube_vertices
Return the vertices of the Block at position x, y, z with size 2*n. :param x: int or float of the Block's x position :param y: int or float of
game/utilities.py:37
↓ 2 callersMethodempty
Return false if there is no block at this position in this chunk
game/world.py:112
↓ 2 callersMethodexposed
Returns False if given `position` is surrounded on all 6 sides by blocks, True otherwise.
game/world.py:190
↓ 2 callersMethodgenerate
Generate a specific sector of the world and place all the blocks
game/genworld.py:176
↓ 2 callersMethodget_block
Return a block from this position. If no blocks, None is returned.
game/world.py:385
↓ 2 callersMethodget_sight_vector
Returns the current line of sight vector indicating the direction the player is looking.
game/scenes.py:291
↓ 2 callersMethodhas_save_game
Returns True if the save path and file exist.
game/savemanager.py:66
↓ 2 callersMethodhit_test
Line of sight search from current position. If a block is intersected it is returned, along with the block previously in the line of
game/world.py:269
↓ 2 callersMethodis_face_full
Check if one of the face of this section is full of blocks. The direction is a normalized vector from `FACES`.
game/world.py:80
↓ 2 callersFunctioniter_neighbors
Iterate all the positions neighboring this position
game/world.py:44
↓ 2 callersMethodnoise2
Generate a noise 2D.
game/noise.py:60
↓ 2 callersFunctionnormalize
Accepts `position` of arbitrary precision clamps it. :param position: tuple of len 3 :return: tuple of ints of len 3, representing a block po
game/utilities.py:53
↓ 2 callersMethodregister_sector
Add a new sector to this world definition.
game/world.py:423
↓ 2 callersMethodremove_block
Remove the block at the given `position`. Parameters ---------- position : tuple of len 3 The (x, y, z) position
game/world.py:345
↓ 2 callersMethodrequest_sector
Compute the content of a sector asynchronously and return the result to a callback already specified to this generator.
game/genworld.py:147
↓ 1 callersMethod_create_coconut_tree
(self, chunk, x, y, z, height)
game/genworld.py:365
↓ 1 callersMethod_create_default_tree
(self, chunk, x, y, z, height)
game/genworld.py:318
↓ 1 callersMethod_create_fir_tree
(self, chunk, x, y, z, height)
game/genworld.py:340
↓ 1 callersMethod_generate_clouds
Generate clouds at this `self.y_cloud`.
game/genworld.py:386
↓ 1 callersMethod_generate_enclosure
Generate an enclosure with unbreakable blocks on the floor and and on the side.
game/genworld.py:197
↓ 1 callersMethod_generate_floor
Generate a standard floor at a specific height
game/genworld.py:224
↓ 1 callersMethod_generate_random_map
(self, chunk)
game/genworld.py:245
↓ 1 callersMethod_generate_trees
Generate trees in the map For now it do not generate trees between 2 sectors, and use rand instead of a procedural generation.
game/genworld.py:259
↓ 1 callersMethod_generate_underworld
(self, chunk)
game/genworld.py:417
↓ 1 callersMethod_get_stone
Returns the expected mineral at a specific location. The input location have to be already known as a stone location.
game/genworld.py:401
↓ 1 callersMethod_iter_xyz
Iterate all the xyz block positions from a sector
game/genworld.py:167
↓ 1 callersMethod_update
Private implementation of the `update()` method. This is where most of the motion logic lives, along with gravity and collision detection.
game/scenes.py:416
↓ 1 callersMethodcollide
Checks to see if the player at the given `position` and `height` is colliding with any blocks in the world. Parameters -----
game/scenes.py:449
↓ 1 callersMethodcontains
True if the position `pos` is inside this sector.
game/world.py:86
↓ 1 callersMethodcount_blocks
Return the number of blocks in this model
game/world.py:244
↓ 1 callersMethoddraw_focused_block
Draw black edges around the block that is currently under the crosshairs.
game/scenes.py:728
↓ 1 callersMethoddraw_label
Draw the label in the top left of the screen.
game/scenes.py:741
↓ 1 callersMethodget_focus_block
(self)
game/scenes.py:723
↓ 1 callersMethodget_motion_vector
Returns the current motion vector indicating the velocity of the player. Returns ------- vector : tuple of len 3
game/scenes.py:308
↓ 1 callersMethodhide_sector
Ensure all blocks in the given sector that should be hidden are removed from the canvas.
game/world.py:494
↓ 1 callersMethodinit_player_on_summit
Make sure the sector containing the actor is loaded and the player is on top of it.
game/scenes.py:351
↓ 1 callersMethodis_sector_visible
Check if a sector is visible. For now only check if no from a sector position.
game/world.py:479
↓ 1 callersMethodload_world
(self, model)
game/savemanager.py:71
↓ 1 callersFunctionmain
()
main.py:42
↓ 1 callersMethodon_resize
Event handler for the Window.on_resize event. Called when the window is resized to a new `width` and `height`.
game/scenes.py:694
↓ 1 callersMethodon_resize
(self, width, height)
game/scenes.py:782
↓ 1 callersMethodprocess_queue
Process the entire queue while taking periodic breaks. This allows the game loop to run smoothly. The queue contains calls to _show_b
game/world.py:532
↓ 1 callersMethodsave_world
(self, model)
game/savemanager.py:92
↓ 1 callersMethodset_callback
Set a callback called when a new sector is computed
game/genworld.py:143
↓ 1 callersFunctionsetup_fog
Configure the OpenGL fog properties.
game/graphics.py:41
↓ 1 callersFunctionsetup_opengl
Basic OpenGL configuration.
game/graphics.py:60
↓ 1 callersMethodshow_only_sectors
Update the shown sectors. Show the ones which are not part of the list, and hide the others.
game/world.py:504
↓ 1 callersMethodshow_sector
Ensure all blocks in the given sector that should be shown are drawn to the canvas.
game/world.py:458
↓ 1 callersMethodupdate_shown_sectors
Update shown sectors according to the actual frustum. A sector is a contiguous x, y sub-region of world. Sectors are used to speed up
game/scenes.py:514
Method__eq__
(self, other)
game/graphics.py:129
Method__getitem__
(self, item)
game/savemanager.py:109
Method__hash__
(self)
game/graphics.py:126
Method__init__
A class for Blocks :param name: The name of the Block material. :param tex_coords: The texture coordinates for this material.
game/blocks.py:62
Method__init__
(self, position)
game/world.py:59
Method__init__
(self, batch, group)
game/world.py:217
Method__init__
(self, frequency=1.0, octaves=1, lacunarity=2.0, persistence=0.5)
game/noise.py:51
Method__init__
(self)
game/genworld.py:47
Method__init__
(self, window)
game/scenemanager.py:41
Method__init__
(self, window, texture, order=0)
game/graphics.py:87
Method__init__
SaveManager handles saving/loading of worlds and options. An internal dictionary (self._data) holds persistent data such as options,
game/savemanager.py:43
Method__init__
(self, channels=5)
game/scenes.py:54
Method__init__
(self, window)
game/scenes.py:113
Method__init__
(self, window)
game/scenes.py:192
Method__init__
(self, window)
game/scenes.py:756
Method__init__
Initialize the noise generator. With no arguments, the default period and permutation table are used (256). The default permutation ta
libs/perlin.py:71
Method__repr__
(self)
game/graphics.py:135
Method__setitem__
(self, key, item)
game/savemanager.py:112
Methodadd_block
Add a block to this chunk only if the `position` is part of this chunk.
game/world.py:120
Methodadd_terrain_map
Add a new entry to the height map lookup table. `height` will be the height at this part of the height map. and `terrains
game/genworld.py:101
Methodblocks_from_face
Iterate all blocks from a face
game/world.py:101
Methodexposed
Returns False if given `position` is surrounded on all 6 sides by blocks, True otherwise.
game/world.py:307
Methodgenerator
(self)
game/world.py:249
Methodget_biome
Return the biome at a location of the map plus the first empty place.
game/genworld.py:268
Methodget_block
Return the block stored at this position of this sector. Else None.
game/world.py:116
next →1–100 of 129, ranked by callers