Skip to content

Commit

Permalink
Fixed doors in Start_Here.py using GDMC-HTTP 0.7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
avdstaaij committed Jan 20, 2023
1 parent 48b8fa8 commit 330e7e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GDPC 5.0 (Manicule)

GDPC (Generative Design Python Client) is a framework for use in conjunction with the [Minecraft HTTP Interface Mod](https://github.com/Niels-NTG/gdmc_http_interface) (version >= 0.7.1, < 0.8.0), built for the [GDMC competition](https://gendesignmc.engineering.nyu.edu).
GDPC (Generative Design Python Client) is a framework for use in conjunction with the [Minecraft HTTP Interface Mod](https://github.com/Niels-NTG/gdmc_http_interface) (version >= 0.7.4, < 0.8.0), built for the [GDMC competition](https://gendesignmc.engineering.nyu.edu).

You need to be playing in a Minecraft world with the mod installed to use the framework.

Expand Down
14 changes: 5 additions & 9 deletions examples/Start_Here.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,27 +220,23 @@ def buildTower(x, z):
ED.placeBlock(ivec3(x, y + 1, z), Block("beacon"))

# trim sides and add windows and doors
# NOTE: When placing doors you need to place two blocks,
# NOTE: When placing doors, you only need to place the bottom block.
# the upper block defines the direction
GEO.placeCuboid(ED, ivec3(x + radius, y + 1, z), ivec3( x + radius, y + height + 2, z), Block("air"))
GEO.placeCuboid(ED, ivec3(x + radius - 1, y + 1, z), ivec3(x + radius - 1, y + height + 2, z), Block("lime_stained_glass"))
ED.placeBlock(ivec3(x + radius - 1, y + 1, z), Block("warped_door"))
ED.placeBlock(ivec3(x + radius - 1, y + 2, z), Block("warped_door", {"facing": "west", "half": "upper"}))
ED.placeBlock(ivec3(x + radius - 1, y + 1, z), Block("warped_door", {"facing": "west"}))

GEO.placeCuboid(ED, ivec3(x - radius, y + 1, z), ivec3( x - radius, y + height + 2, z), Block("air"))
GEO.placeCuboid(ED, ivec3(x - radius + 1, y + 1, z), ivec3(x - radius + 1, y + height + 2, z), Block("lime_stained_glass"))
ED.placeBlock(ivec3(x - radius + 1, y + 1, z), Block("warped_door"))
ED.placeBlock(ivec3(x - radius + 1, y + 2, z), Block("warped_door", {"facing": "east", "half": "upper"}))
ED.placeBlock(ivec3(x - radius + 1, y + 1, z), Block("warped_door", {"facing": "east"}))

GEO.placeCuboid(ED, ivec3(x, y + 1, z + radius), ivec3( x, y + height + 2, z + radius), Block("air"))
GEO.placeCuboid(ED, ivec3(x, y + 1, z + radius - 1), ivec3(x, y + height + 2, z + radius - 1), Block("lime_stained_glass"))
ED.placeBlock(ivec3(x, y + 1, z + radius - 1), Block("warped_door"))
ED.placeBlock(ivec3(x, y + 2, z + radius - 1), Block("warped_door", {"facing": "south", "half": "upper"}))
ED.placeBlock(ivec3(x, y + 1, z + radius - 1), Block("warped_door", {"facing": "south"}))

GEO.placeCuboid(ED, ivec3(x, y + 1, z - radius), ivec3( x, y + height + 2, z - radius), Block("air"))
GEO.placeCuboid(ED, ivec3(x, y + 1, z - radius + 1), ivec3(x, y + height + 2, z - radius + 1), Block("lime_stained_glass"))
ED.placeBlock(ivec3(x, y + 1, z - radius + 1), Block("warped_door"))
ED.placeBlock(ivec3(x, y + 2, z - radius + 1), Block("warped_door", {"facing": "north", "half": "upper"}))
ED.placeBlock(ivec3(x, y + 1, z - radius + 1), Block("warped_door", {"facing": "north"}))


# === STRUCTURE #4
Expand Down

0 comments on commit 330e7e3

Please sign in to comment.