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

class mcthings.blocks.Blocks(position)

Bases: mcthings.thing.Thing

build()

Build the thing and show it in Minecraft at position coordinates

Returns:
height = 2
length = 4
width = 3

mcthings.bridge module

class mcthings.bridge.Bridge(position)

Bases: mcthings.thing.Thing

build()

Build the thing and show it in Minecraft at position coordinates

Returns:
build_row(z)
height = None
large = 5
width = 1

mcthings.building module

class mcthings.building.Building(position)

Bases: mcthings.thing.Thing

build()

Build the thing and show it in Minecraft at position coordinates

Returns:
floors = 10
house_mirror = False
width = 10

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

class mcthings.fence.Fence(position)

Bases: mcthings.thing.Thing

Build a block plane and empty it to create the fence

build()

Create a fence around the configured thing :return:

fence_space = 5

Space between the fence and the thing fenced

height = 3
thick = 1
thing = None

mcthings.house module

class mcthings.house.House(position)

Bases: mcthings.thing.Thing

build()

Build the thing and show it in Minecraft at position coordinates

Returns:
door_size = 1
height = 3
length = 5
mirror = False
wall_width = 1
width = 5

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

class mcthings.river.River(position)

Bases: mcthings.thing.Thing

block = Block(8, 0)
build()

Build the thing and show it in Minecraft at position coordinates

Returns:
depth = 1
length = 100
width = 2

mcthings.scene module

class mcthings.scene.Scene

Bases: object

A 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

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: object

A 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: object

base 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:

mcthings.town module

class mcthings.town.Town(position)

Bases: mcthings.thing.Thing

build()

Build the thing and show it in Minecraft at position coordinates

Returns:
house_height = 3
house_length = 5
house_mirror = False
house_width = 5
houses = 4
space = 3

space between the town houses

mcthings.wall module

class mcthings.wall.Wall(position)

Bases: mcthings.thing.Thing

build()

Build the thing and show it in Minecraft at position coordinates

Returns:
height = 5
length = 10
width = 2

Module contents