mcthings.renderers package¶
Submodules¶
mcthings.renderers.raspberry_pi module¶
-
class
mcthings.renderers.raspberry_pi.
RaspberryPi
(host, port)¶ Bases:
mcthings.renderers.renderer.Renderer
Renderer implemented using the Raspberry Pi Python API https://www.stuffaboutcode.com/p/minecraft-api-reference.html
-
get_block
(pos)¶ Get the rendered block at the given position :param position: :return: int with the block id
-
get_block_with_data
(pos)¶ Get the rendered block at the given position :param position: :return: mcpi.block.Block with the id and data
-
get_blocks
(init_pos, end_pos)¶ Get the rendered cuboid at init_pos and end_pos :param init_pos: :param end_pos: :return:
-
get_pos
(entity)¶ Get the position of the entity in the World :param entity: :return: the position in Vec3 format
-
post_to_chat
(message)¶ Send a message to the chat in the renderer it it exists :param message: :return:
-
render
(blocks_memory)¶ Render the blocks included in the memory_chunk at position in the world
Parameters: blocks_memory – memory with the blocks to be rendered Returns:
-
render_cuboid_memory
(memory)¶ Render a memory with all blocks equal in a filled cuboid
-
render_memory
(memory)¶ Render memory
-
mcthings.renderers.renderer module¶
-
class
mcthings.renderers.renderer.
Renderer
¶ Bases:
object
Base class for all McThings Renderers
-
get_block
(position)¶ Get the rendered block at the given position :param position: :return: int with the block id
-
get_block_with_data
(position)¶ Get the rendered block at the given position :param position: :return: mcpi.block.Block with the id and data
-
get_blocks
(init_pos, end_pos)¶ Get the rendered cuboid at init_pos and end_pos :param init_pos: :param end_pos: :return:
-
get_pos
(entity)¶ Get the position of the entity in the World :param entity: :return: the position in Vec3 format
-
post_to_chat
(message)¶ Send a message to the chat in the renderer it it exists :param message: :return:
-
render
(blocks_memory)¶ Render the blocks included in the memory_chunk at position in the world
Parameters: blocks_memory – memory with the blocks to be rendered Returns:
-