hotfix number 46 and optimization number 956 on windows

This commit is contained in:
AKreuzer
2024-05-27 22:52:09 +02:00
parent 33b34108e5
commit 1371be4132
7 changed files with 145 additions and 86 deletions

View File

@@ -9,8 +9,12 @@ class Rectangle:
def get_position(self):
return (self.point1.position, self.point2.position)
def get_height(self):
return self.point2.y - self.point1.y + 1
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
if self.point2.z - self.point1.z < 2*zpadding: zpadding = 0
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))