SpongePowered / SpongeAPI

A Minecraft plugin API
http://www.spongepowered.org/
MIT License
1.14k stars 342 forks source link

Add something similar to BiomeTypes from forge #1229

Open Katrix opened 8 years ago

Katrix commented 8 years ago

Currently if you want to say get all biomes that have water in them you have to manually go through the list and check if it has water. It would be nice if there was something similar to the BiomeDictionary from forge where you could get all biomes that has a specific type. So for example in forge you would do BiomeDictionary#getBiomesForType(NETHER), and then if another mod added another nether biome, you would get that biome too.

It would also help with compatibility with new versions as as you wouldn't have to add new biomes yourself if they were added. Say for example that minecraft added another yet another forest biome. With this you wouldn't have to change anything if you just wanted all forest biomes.

ST-DDT commented 8 years ago

@Katrix- Nice idea. But I see the issue with (none-SpongeAPI) mod provided biomes. How would you decide which type it belongs too. Also you may need multiple types for a single biome.

Maybe a biome.getCategories().stream().filter(....) would work better.

simon816 commented 8 years ago

@ST-DDT BiomeDictionary#getTypesForBiome. It returns an array so multiple types are supported

Zidane commented 8 years ago

This sounds like a candidate for inclusion into the GameDictionary...which we've not really expanded on at all.

ST-DDT commented 8 years ago

@simon816 I am aware of that hiwever the mapping should be Many2Many