aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2022-10-20 08:01:55 +0200
committerJan200101 <sentrycraft123@gmail.com>2022-10-20 08:01:55 +0200
commit6c1d719d115e4a698e64733545951fb168335224 (patch)
tree7545907964ca9c6b6546aa88b61bb7426c120b8d
parent8df5b1e408c65237014272c38e2bdec8a2a83e80 (diff)
downloadBerryClient-6c1d719d115e4a698e64733545951fb168335224.tar.gz
BerryClient-6c1d719d115e4a698e64733545951fb168335224.zip
expand window and door to fit better into the house
-rw-r--r--BerryClient/models/WallWithDoor.py17
-rw-r--r--BerryClient/models/WallWithWindow.py11
2 files changed, 21 insertions, 7 deletions
diff --git a/BerryClient/models/WallWithDoor.py b/BerryClient/models/WallWithDoor.py
index 0d9da8a..3205ca8 100644
--- a/BerryClient/models/WallWithDoor.py
+++ b/BerryClient/models/WallWithDoor.py
@@ -9,11 +9,18 @@ class WallWithDoor(Wall):
x, y, z = self.pos
if self.rotated:
- z += (self.width / 2)
+ z += (self.width / 2)-1
else:
- x += (self.width / 2)
+ x += (self.width / 2)-1
- from_pos = (x, y, z)
- to_pos = (x, y+1, z)
+ for i in range(2):
+ if i:
+ if self.rotated:
+ z += 1
+ else:
+ x += 1
- self._bw.set_blocks(*from_pos, *to_pos, self.door_material_id)
+ from_pos = (x, y, z)
+ to_pos = (x, y+1, z)
+
+ self._bw.set_blocks(*from_pos, *to_pos, self.door_material_id)
diff --git a/BerryClient/models/WallWithWindow.py b/BerryClient/models/WallWithWindow.py
index 36ea92f..bde405b 100644
--- a/BerryClient/models/WallWithWindow.py
+++ b/BerryClient/models/WallWithWindow.py
@@ -12,6 +12,13 @@ class WallWithWindow(Wall):
else:
x += (self.width / 2)
- window_pos = (x, y+1, z)
+ from_pos = (x, y+1, z)
- self._bw.set_block(*window_pos, self.window_material_id) \ No newline at end of file
+ if self.rotated:
+ z -= 1
+ else:
+ x -= 1
+
+ to_pos = (x, y+1, z)
+
+ self._bw.set_blocks(*from_pos, *to_pos, self.window_material_id) \ No newline at end of file