diff --git a/README.md b/README.md deleted file mode 100644 index c40db15..0000000 --- a/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# pyblock-exporer - diff --git a/wall.py b/wall.py new file mode 100644 index 0000000..7df3e03 --- /dev/null +++ b/wall.py @@ -0,0 +1,29 @@ +from pyblockworld import World + +class Wall: + __length:int + __width:int + __height:int + __rotated:bool + __x:float + __y:float + __z:float + __world:World + __block:str + + def __init__(self, x:float, y:float, z:float, block:str, world:World, length=10, width=10, height=5, rotated=False): + self.__width = width + self.__length = length + self.__height = height + self.__x = x + self.__y = y - 1 + self.__z = z + self.__world = world + self.__rotated = rotated + self.__block = block + + def build(self): + if self.__rotated: + self.__world.setBlocks(self.__x, self.__y, self.__z, self.__x + self.__width, self.__y + self.__height, self.__z, self.__block) + else: + self.__world.setBlocks(self.__x, self.__y, self.__z, self.__x, self.__y + self.__height, self.__z + self.__length, self.__block)