Skip to content

ExternalAPI

paulevsGitch edited this page Nov 12, 2020 · 9 revisions

External API

BetterEnd has 2 types of API - Java API and JSON API. The first one can be used to register custom biomes, items and more. The second one can be used for configuring already existing biomes to generate properly in the End and have some effects (like fog).

Java API

This api based on plugin interface TODO

JSON API

This api based on simple json file ("end_biome_properties.json") placed in

<your_project>/data/<your_mod_id>/end_biome_properties.json

The structure of end_biome_properties.json is simple - each biome has a key in json (its ID path in registry, for example a key for coolmod:desert will be "desert"). Its value is a json object, containing all biome properties. All properties are optional.

List of supportetd properties:

  • fogDensity - float, default value is 1.0. Controls fog density in this biome (relative scale), Foggy Mushroomland have value 3.0.
  • genChance - float, default value is 1.0. Determs how frequent biome will generate in the world, 0.0 will stop biome from generation, values above 1.0 will make it more frequent than others.
  • type - string, default value is "land". Can be "land" or "void" - allows you to choose where biome will generate - on End islands ("land"), or between them ("void").

Json Example: In this example "your_first_biome" will have dense fog and will be 5 times more frequent than other biomes, but will generate only in the void between islands. "your_second_biome" will be less frequent than other biomes and will generate on land.

{
	"your_first_biome": {
		"fogDensity": 3.0,
		"genChance": 5.0,
		"type": "void"
	},
	"your_second_biome": {
		"genChance": 0.5
	}
}
Clone this wiki locally