mcthings package¶
Submodules¶
mcthings.block module¶
-
class
mcthings.block.Block(position)¶ Bases:
mcthings.thing.Thing-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
mcthings.blocks module¶
mcthings.blocks_gallery module¶
-
class
mcthings.blocks_gallery.BlocksGallery(position)¶ Bases:
mcthings.thing.Thing-
MAX_BLOCK_NUMBER= 247¶
-
build()¶ Show all possible block types in a line :return:
-
mcthings.bridge module¶
mcthings.building module¶
mcthings.circle module¶
-
class
mcthings.circle.Circle(position)¶ Bases:
mcthings.thing.Thing-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
radius= None¶ radius of the Sphere
-
mcthings.fence module¶
mcthings.house module¶
mcthings.line module¶
-
class
mcthings.line.Line(position)¶ Bases:
mcthings.thing.Thing-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
length= 10¶
-
width= 3¶
-
mcthings.pyramid module¶
-
class
mcthings.pyramid.Pyramid(position)¶ Bases:
mcthings.thing.Thing-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
height= 10¶
-
-
class
mcthings.pyramid.PyramidHollow(position)¶ Bases:
mcthings.thing.Thing-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
height= 10¶
-
thick= 2¶
-
mcthings.river module¶
mcthings.scene module¶
-
class
mcthings.scene.Scene¶ Bases:
objectA scene is a container for all the things built using McThings. A scene can be built, unbuilt and moved. There is only one scene in a program using McThings. Things built are added automatically to the Scene. A Scene can also be loaded from a file, and it can be saved to a file.
Before adding Things to the Scene, it must be connected to a Minecraft server (fill the Scene.server attribute)
-
classmethod
add(thing)¶ Add a new thing to the scene
-
classmethod
build()¶ Recover all the map building the things
-
classmethod
load(file_path)¶ Load a scene from a file (but no build it yet)
-
classmethod
move(position)¶ Move the scene to a new position
Parameters: position – new position Returns:
-
classmethod
reposition(position)¶ Move all the things in the scene to a new relative position
Parameters: position – new position for the Scene Returns:
-
classmethod
save(file_path)¶ Save a scene to a file
-
server= None¶ Minecraft server in which create things
-
things= []¶ map with the things in the scene
-
classmethod
unbuild()¶ Recover all the map unbuilding the things
-
classmethod
mcthings.schematic module¶
-
class
mcthings.schematic.Schematic(position)¶ Bases:
mcthings.thing.Thing-
blocks_field= 'Blocks'¶
-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
data_field= 'Data'¶
-
mcthings.server module¶
-
class
mcthings.server.Server(host='localhost', port='4711')¶ Bases:
objectA Server manages the connection with the Minecraft server.
Every Scene must have a Server in which built the Scene.
-
drawing¶ Connection to MinecraftDrawing (only used in Things built with MinecraftDrawing)
-
mc¶ Connection to Minecraft
-
mcthings.sphere module¶
-
class
mcthings.sphere.Sphere(position)¶ Bases:
mcthings.thing.Thing-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
height= 0¶
-
radius= 5¶ radius of the Sphere
-
-
class
mcthings.sphere.SphereHollow(position)¶ Bases:
mcthings.thing.Thing-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
height= 0¶
-
radius= None¶ radius of the Hollow Sphere
-
mcthings.thing module¶
-
class
mcthings.thing.Thing(position)¶ Bases:
objectbase class for all objects in mcthings library
-
block= Block(45, 0)¶ block type used by the thing. Default to BRICK_BLOCK
-
build()¶ Build the thing and show it in Minecraft at position coordinates
Returns:
-
end_position¶ end position of the thing
-
move(position)¶ Move the thing to a new position
Parameters: position – new position Returns:
-
position¶ initial position of the thing
-
unbuild()¶ Unbuild the thing in Minecraft
Returns:
-