Skip to content

yawgmoth/BoxSplitGrammars-Update

 
 

Repository files navigation

Readme

This repository contains Box Split Grammars as presented in Eger, M. "Instant Architecture in Minecraft using Box-Split Grammars", presented at FDG 2022. The grammar system is written in Python 2.7, for compatibility with MCEdit, but it also allows other backends and should be convertible to Python 3, if necessary.

Setup

To run the grammar system, you will need python 2.7, as stated above. For the Minecraft-Backend you will additionally need this version of MCEdit (in particular some of the utility functions). The grammar system can be dropped somewhere in your python path, or just directly into MCEdit's stock-filter directory and then be used from any filter. Some demo filters you can find are MakeCastle.py, MakeTemple.py, MakeFloorplan.py and Tetrastyle.py, corresponding to various examples shown in the paper (more examples coming soon). makePattern.py requires Pillow, and shows how the grammar system can be used with the PNG backend.

Amulet Update

Installation / Usage

  1. Download Amulet, can be done through Github releases for exact versioning. Amulet Releases
  2. Place relevant Box-Split Grammar files in Amulet/plugins/operations/. NOTE: Do not include PNGSplitGrammar in this or any other non-MCSplitGrammar file as they can override the registered materials in MCSplitGrammar.
  3. Run Amulet and open a world. Select a section of land, switch to the Operation tool, select the relevant Operation and run it.

Notes on implementation

  • Amulet passes a SelectionGroup into an operation, which is a collection of one or more SelectionBoxes. This allows operations to work on more complex selection shapes. The current implementation of the Box-Split grammar only works on a SelectionGroup with a single SelectionBox and pass if more than one SelectionBox is present

Helpful Documentation

  • General Documentation on Amulet. link
  • Documentation on Amulet Core (Much more helpful). link
    • Documentation on the BaseLevel object passed into an operation. link
    • Documentation on the SelectionGroup object passed into an operation. link
    • Documentation on the SelectionBox object which is contained by SelectionGroups. link
  • Documentation on MCEdit's BoundingBox. link
  • Valid blockstates. link

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%