pyblock-exporer/roof.py
2023-10-30 13:34:01 +01:00

37 lines
831 B
Python

from pyblockworld import World
class Roof:
__width:int
__height:int
__x:float
__y:float
__z:float
__world:World
__block:str
def __init__(self, x:float, y:float, z:float, block:str, world:World, height=10, width=10):
self.__x = x
self.__y = y
self.__z = z
self.__width = width
self.__height = height
self.__world = world
self.__block = block
def build(self):
self.__world.setBlocks(self.__x, self.__y, self.__z, self.__x + self.__width, self.__y, self.__z + self.__height, self.__block)
def getWidth(self):
return self.__width
def getHeight(self):
return self.__height
def getX(self):
return self.__x
def getY(self):
return self.__y
def getZ(self):
return self.__z