corrections corners bugs, clean tree structure and start entrance

This commit is contained in:
AKreuzer
2024-06-11 03:06:06 +02:00
parent 536c71d372
commit de3950d376
21 changed files with 153 additions and 86 deletions

View File

@@ -10,7 +10,7 @@ class Rectangle:
return (self.point1.position, self.point2.position)
def get_height(self):
return self.point2.y - self.point1.y + 1
return self.point2.y - self.point1.y
def fill(self,editor : Editor, material : str, y : int = None, xpadding : int = 0, zpadding : int = 0):
if self.point2.x - self.point1.x < 2*xpadding: xpadding = 0
@@ -18,3 +18,6 @@ class Rectangle:
if y is None: y = self.point2.y
geometry.placeCuboid(editor, (self.point1.x+xpadding, 0, self.point1.z+zpadding), (self.point2.x-xpadding, y, self.point2.z-zpadding), Block(material))
def __repr__(self):
return f"{type(self).__name__}\n1 : {str(self.point1)},\n2 : {str(self.point2)}"