/BTE-tools

Awesome tools and scripts to enhance your experience on the Build The Earth project!

Primary LanguageJavaScriptMIT LicenseMIT


Logo

BTE-tools

Awesome tools and scripts to enhance your experience on the Build The Earth project!
Go to Build The Earth »

Report Bug · Request Feature

Table of Contents

🚩 Project status 🚩

🚧I'm looking for a maintainer. Contact me if interested🚧

Feature requests are no longer accepted, only pull requests.

About The Project

✨ The BTE generation is not perfect and some structures such as railway lines are missing. Doing it by hand is unthinkable given the curves and the number of measurements that would have to be taken. This set of tools will allow you to enjoy a better experience on BTE and build to your full potential.

Built With

Getting Started

Prerequisites

You must have WorldEdit as a minimum but install the BTE modpack, it's preferable.

Installation

  1. Download the Rhino Javacsript interpreter for Java, which you can get from here. Open the zip file, go to /lib and move rhino-1.7.12.jar (or newer) to your mods Minecraft folder. (Usually C:\Users\[USERNAME]\Twitch\Minecraft\Instances\Build The Earth modpack\mods on Windows)

  2. Download the latest version of BTE-scripts here and place the craftscripts folder in /config/worldedit.

  3. (Recommended) Change the value of scripting-timeout to 30000 or higher in /config/worldedit. (3000 ms by default)

Usage

/cs <COMMAND> [ARGS]

🚀 These are WorldEdit scripts, if blocks are modified you have access to //undo.

  • help : Lists all available commands.
  • tpll : Classic tpll command that also accepts degrees minutes seconds
  • draw : Traces any imported shape of an OpenStreetMap query - railroads, roads, etc.
  • rails : Traces all railroads in an area
  • railsnear : Traces all railroads around the player
  • address : Get the closest address
  • hedges : Traces all hedges in an area
  • hedges : Traces all hedges around the player
  • gis_fr : Get better elevation data in France
  • gis_jp : Get better elevation data in Japan

Do you need another function? Request it here.

help

/cs help

Lists all available commands.

tpll

/cs tpll <latitude> <longitude> [altitude]

Classic tpll command that also accepts degrees minutes seconds This modified version will take you to the highest block even if you've build already. You don't need to remove the comma if there is one when you copy the coordinates.

Examples :

/cs tpll 47.58523 6.89725
/cs tpll 47.58523, 6.89725, 370
/cs tpll 47°35'6.32"N 6°53'50.06"E
/cs tpll 47°35'6.32"N, 6°53'50.06"E, 370

draw

/cs draw <file> [block] [options]

Traces any imported shape of an OpenStreetMap query - railroads, roads, etc.

Default options:

{
  "block": "gold_block",
  "height": 1,
  "offset": 0,
  "onGround": true,
  "ignoreBuildings": true,
  "ignoreVegetation": true,
  "ignoredBlocks": ["see below"],
  "allowedBlocks": ["see below"]
}

Setup :

  • Create a drawings folder inside /config/worldedit.
  • Get a geoJSON/KML file of valid tracings / OR
  • Choose one of the following links:
  • Click Run > Export > download/copy as GeoJSON
  • Place the file in the drawings folder.

Examples :

/cs draw rails1 iron_block
/cs draw file3 stone {"height":5,"onGround":false}

rails

/cs rails [options]

Traces all railroads in an area

Default options:

{
  "block": "iron_block",
  "offset": 0,
  "height": 1,
  "regex": "^.*$",
  "onGround": true,
  "ignoreBuildings": true,
  "ignoreVegetation": true,
  "restrict": false,
  "ignoredBlocks": ["see below"],
  "allowedBlocks": ["see below"]
}

Examples :

/cs rails
/cs rails {"regex":"(subway|tram)"}

railsnear

/cs railsnear <radius> [options]

Traces all railroads around the player

Default options:

{
  "block": "iron_block",
  "offset": 0,
  "height": 1,
  "regex": "^.*$",
  "onGround": true,
  "ignoreBuildings": true,
  "ignoreVegetation": true,
  "restrict": false,
  "ignoredBlocks": ["see below"],
  "allowedBlocks": ["see below"]
}

Examples :

/cs railsnear 7
/cs railsnear 50 {"regex":"(subway|tram)"}

osm

/cs osm <query> [options]

Run an overpass query in an area and trace the path

Default options:

{
  "block": "diamond_block",
  "offset": 0,
  "height": 1,
  "onGround": true,
  "ignoreBuildings": true,
  "ignoreVegetation": true,
  "restrict": false,
  "ignoredBlocks": ["see below"],
  "allowedBlocks": ["see below"]
}

Examples :

/cs osm way[highway~"^.*$"]
/cs osm way[railway~"(subway|tram)"] {"block":"stone"}

osmnear

/cs osmnear <query> <radius> [options]

Run an overpass query in an area and trace the path around the player

Default options:

{
  "block": "diamond_block",
  "offset": 0,
  "height": 1,
  "onGround": true,
  "ignoreBuildings": true,
  "ignoreVegetation": true,
  "restrict": false,
  "ignoredBlocks": ["see below"],
  "allowedBlocks": ["see below"]
}

Examples :

/cs osmnear way[highway~"^.*$"] 7
/cs osmnear way[railway~"(subway|tram)"] 50 {"block":"stone"}

address

/cs address

Get the closest address, for example:

Avenue de la Gare TGV, La Jonxion, Meroux, Meroux-Moval, Belfort, Territoire-de-Belfort, Bourgogne-Franche-Comté, France métropolitaine, 90400, France

gis

/cs gis_fr [options]
/cs gis_jp [options]

Get better elevation data in France & Japan

Default options:

{
  "smooth": true,
  "ignoreWater": false,
  "ignoredBlocks": ["see below"],
}

Examples:

/cs gis_fr
/cs gis_jp {"smooth":false,"ignoreWater":true}

hedges

/cs hedges [options]

Traces all hedges in an area

Default options:

{
  "block": "leaves:4",
  "height": 2,
  "offset": 1,
  "onGround": true,
  "ignoreBuildings": true,
  "ignoreVegetation": true,
  "restrict": false,
  "ignoredBlocks": ["see below"],
  "allowedBlocks": ["see below"]
}

Examples :

/cs hedges
/cs hedges {"block":"stone","height":3}

hedgesnear

/cs hedgesnear <radius> [options]

Traces all hedges around the player

Default options:

{
  "block": "leaves:4",
  "height": 2,
  "offset": 1,
  "onGround": true,
  "ignoreBuildings": true,
  "ignoreVegetation": true,
  "restrict": false,
  "ignoredBlocks": ["see below"],
  "allowedBlocks": ["see below"]
}

Examples :

/cs hedgesnear 7
/cs hedgesnear 50 {"block":"stone","height":3}

Default allowed & ignored allowedBlocks

The blocks ignored by default are used to not draw a path on the vegetation.

[
  'air',
  'tallgrass',
  'sapling',
  'log',
  'log2',
  'leaves',
  'leaves2',
  'deadbush',
  'red_flower',
  'yellow_flower',
  'red_mushroom',
  'brown_mushroom',
  'vine',
  'waterlily',
  'cactus',
  'reeds',
  'pumpkin',
  'melon_block',
  'snow_layer',
  'double_plant'
]

The blocks allowed by default are used to not draw a path on existing buildings.

[
  'air',
  'grass',
  'dirt',
  'stone',
  'sand',
  'grass_path',
  'concrete',
  'gravel',
  'water',
  'lava'
]

Roadmap

📜 See the open issues and project boards for a list of proposed features (and known issues).

Contributing

🏗️ Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Make sure that yarn build and yarn lint do not generate errors
  5. Push to the Branch (git push origin feature/AmazingFeature)
  6. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Icon library by Icons8.

Contact

Oganexon#2001 - Discord oganexon@protonmail.com