ExternalAPI - paulevsGitch/BetterEnd GitHub Wiki

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 supported properties:

  • fog_density - float, default value is 1.0. Controls fog density in this biome (relative scale), Foggy Mushroomland have value 3.0 and forest biomes have ~2;
  • generation_chance - float, default value is 1.0. It defines 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");
  • has_caves - boolean, default value is "true". If enabled BetterEnd caves will generate in your biome.

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 and will not have caves. "your_second_biome" will be less frequent than other biomes and will generate on land.

{
	"your_first_biome": {
		"fog_density": 3.0,
		"generation_chance": 5.0,
		"type": "void",
		"has_caves": false
	},
	"your_second_biome": {
		"generation_chance": 0.5
	}
}