← Назад к ресурсам

Biome Modifier for Fabric

A library mod that allows users utilize datapacks to modify biomes easily and compatibly.

Modrinth library worldgen

Описание

# Biome-Modifier-for-Fabric ![Banner](https://cdn.modrinth.com/data/LisiviFp/images/8fa225a5460cfbe7f2bed3a9a10d70e8ed1f44a7.png) ## Abstract This is a library mod that allows users utilize datapacks to modify biomes easily and compatibly. ## Usage for Developers We all know that for Forge modpacks, developers can utilize the following [example](https://github.com/Viola-Siemens/EmeraldCraftMod/blob/Forge-1.20.1_9.1.X/src/main/resources/data/emeraldcraft/forge/biome_modifier/ec_wild_crops.json) to modify biomes: ```json { "type": "forge:add_features", "biomes": "#forge:is_plains", "features": [ "emeraldcraft:wild_cabbage", "emeraldcraft:wild_chili" ], "step": "vegetal_decoration" } ``` Let's make this work for Fabric! Datapack developers should put all biome modifiers (with format `*.json`) on `data//biome_modifiers/` directory. With this mod, all biome modifiers will be applied on each biome. All biome modifiers should follow this format: ```json { "type": "", "biomes": "", "priority": priority, "": "" } ``` Where `type` stands for the type of biome modifiers, and `biome` stands for all biomes to be modified. Notice that `priority` field is optional. The smaller it is, the earlier it will be applied to the biomes (for example, modifiers with priority 99 will be applied earlier than modifiers with priority 100). The default value is 1000. ### Different Types of Biome Modifiers We provide 9 different types of biome modifiers currently: #### biome_modifier:none This type allows developers to replace other biome modifiers in other datapacks. ```json { "type": "biome_modifier:none" } ``` #### biome_modifier:add_features This biome modifier adds all placed features mentioned in `features` field to target biomes. If any placed feature is missing from the registry, an error will be logged (won't crash the game with safe mode). ```json { "type": "biome_modifier:add_features", "biomes": "", "features": "", "step": "" } ``` #### biome_modifier:remove_features This biome modifier removes all placed features mentioned in `features` field from target biomes. If any placed feature is missing from the target biomes, a warning will be logged and won't crash the game. If any placed feature is missing from the registry, an error will be logged (won't crash the game with safe mode). ```json { "type": "biome_modifier:remove_features", "biomes": "", "features": "", "step": "" } ``` #### biome_modifier:add_spawns This biome modifier adds all entity spawns mentioned in `spawns` field to target biomes. If any entity type is missing from the registry, an error will be logged (won't crash the game with safe mode). ```json { "type": "biome_modifier:add_spawns", "biomes": "", "spawners": [ { "type": "", "weight": weight, "minCount": minCount, "maxCount": maxCount } //If you only add one spawner, you can also replace the list with the only object. ] } ``` #### biome_modifier:remove_spawns This biome modifier removes all entity spawns mentioned in `entity_types` field from target biomes. If any entity type is missing from the target biomes, a warning will be logged and won't crash the game. If any entity type is missing from the registry, an error will be logged (won't crash the game with safe mode). ```json { "type": "biome_modifier:remove_spawns", "biomes": "", "entity_types": [ "" //If you only remove one spawner, you can also replace the list with the only string. ] } ``` #### biome_modifier:add_spawn_costs This biome modifier adds all entity spawns mentioned in `spawn_costs` field to target biomes. Unlikely to `biome_modifier:add_spawns`, this modifier adds spawns to spawn costs (aka. spawn potential, spawn density). If any entity type is missing from the registry, an error will be logged (won't crash the game with safe mode). ```json { "type": "biome_modifier:add_spawn_costs", "biomes": "", "spawn_costs": { "": { "charge": charge, "energy_budget": energy_budget } } } ``` #### biome_modifier:remove_spawn_costs This biome modifier removes all entity spawns mentioned in `entity_types` field from target biomes. Unlikely to `biome_modifier:remove_spawns`, this modifier removes spawns to spawn costs (aka. spawn potential, spawn density). If any entity type is missing from the target biomes, a warning will be logged and won't crash the game. If any entity type is missing from the registry, an error will be logged (won't crash the game with safe mode). ```json { "type": "biome_modifier:remove_spawn_costs", "biomes": "", "entity_types": [ "" //If you only remove one spawner, you can also replace the list with the only string. ] } ``` #### biome_modifier:add_carvers This biome modifier adds all carvers mentioned in `carvers` field to target biomes. If any carver is missing from the registry, an error will be logged (won't crash the game with safe mode). ```json { "type": "biome_modifier:add_carvers", "biomes": "", "carvers": "", "step": "" } ``` #### biome_modifier:remove_carvers This biome modifier removes all carvers mentioned in `carvers` field from target biomes. If any carver is missing from the target biomes, a warning will be logged and won't crash the game. If any carver is missing from the registry, an error will be logged (won't crash the game with safe mode). ```json { "type": "biome_modifier:remove_carvers", "biomes": "", "carvers": "", "step": "" } ``` ## Examples We provide 3 example datapacks for our mods: ### Extra Ores This datapack adds extra ore blocks to the overworld. ![X-Ray of a world using this datapack.](https://cdn.modrinth.com/data/LisiviFp/images/6dac502db639ead8197edb13ae2d904cf4ea0965.png) ### No Ore in Overworld This datapack removes all ore blocks to the overworld, and only keeps ore veins for players to obtain ores. ![X-Ray of a world using this datapack. The only iron ore is placed on purpose.](https://cdn.modrinth.com/data/LisiviFp/images/7af6a58083315a874706bf4117b6a02f42e7b50d.jpeg) ### Zombies in the Nether This datapack makes zombie able to spawn in the nether. ![Zombies spawn in nether waste.](https://cdn.modrinth.com/data/LisiviFp/images/a9be61ccd59a641dfff18f6ca362817c3ded2047.png)