Fixed Alexandre

This commit is contained in:
NichiHachi
2024-06-16 00:24:01 +02:00
parent 1a9b0a496f
commit 8682d0d933
18 changed files with 832 additions and 619 deletions

21
main.py
View File

@@ -1,11 +1,18 @@
import random
import gdpc.exceptions
from world_maker.world_maker import *
from House import *
def main():
rectangle_house_mountain, rectangle_building, skeleton_highway, skeleton_mountain = world_maker()
editor = Editor()
editor = Editor(buffering=True)
buildArea = editor.getBuildArea()
blocks = {
"wall": "blackstone",
"roof": "blackstone",
@@ -23,15 +30,18 @@ def main():
}
entranceDirection = ["N", "S", "E", "W"]
for houses in rectangle_house_mountain:
house = House(editor, houses[0], houses[1], entranceDirection[random.randint(0, 3)], blocks)
start = (houses[0][0]+buildArea.begin[0], houses[0][1], houses[0][2]+buildArea.begin[2])
end = (houses[1][0]+buildArea.begin[0], houses[1][1], houses[1][2]+buildArea.begin[2])
house = House(editor, start, end, entranceDirection[random.randint(0, 3)], blocks)
house.build()
if __name__ == '__main__':
main()
"""
from gdpc import Editor, Block, geometry, Transform
import networks.curve as curve
import numpy as np
@@ -63,4 +73,5 @@ geometry.placeCuboid(editor, (-5,0,-8), (25,100,25), Block("air"))
# create a building at the relative position 0,0 with 20 blocks length and 20 blocks width, with a normal shape and 10 floors
building = Building(random_data["buildings"], [(0,0,0), (20,30,20)], baseShape, DIRECTION.EAST)
# build it with your custom materials
building.build(editor, ["stone_bricks","glass_pane","glass","cobblestone_wall","stone_brick_stairs","oak_planks","white_concrete","cobblestone","stone_brick_slab","iron_bars"])
building.build(editor, ["stone_bricks","glass_pane","glass","cobblestone_wall","stone_brick_stairs","oak_planks","white_concrete","cobblestone","stone_brick_slab","iron_bars"])
"""