Skip to content

Commit

Permalink
initial wilder wild compat (#106)
Browse files Browse the repository at this point in the history
- Add compatibility tags for Wilder Wild, thanks to Treetrain1
  • Loading branch information
Treetrain1 authored and gniftygnome committed Nov 8, 2023
1 parent ea4b49e commit c8352c0
Showing 1 changed file with 56 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.registry.RegistryWrapper;
import net.minecraft.registry.tag.BiomeTags;
import net.minecraft.registry.tag.TagKey;
import net.minecraft.util.Identifier;
import net.minecraft.world.biome.Biome;

import java.util.concurrent.CompletableFuture;
Expand All @@ -22,44 +23,44 @@ public void configure(RegistryWrapper.WrapperLookup registries) {
/*
* Vanilla biome categories
*/
getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS.id()))
getOrCreateTagBuilder(BiomeTags.ALLOWS_SURFACE_SLIME_SPAWNS)
.addOptional(TraverseBiomes.LUSH_SWAMP);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.IS_FOREST.id()))
getOrCreateTagBuilder(BiomeTags.IS_FOREST)
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.IS_TAIGA.id()))
getOrCreateTagBuilder(BiomeTags.IS_TAIGA)
.addOptional(TraverseBiomes.SNOWY_CONIFEROUS_FOREST);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.SPAWNS_COLD_VARIANT_FROGS.id()))
getOrCreateTagBuilder(BiomeTags.SPAWNS_COLD_VARIANT_FROGS)
.addOptional(TraverseBiomes.SNOWY_CONIFEROUS_FOREST);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.SPAWNS_WARM_VARIANT_FROGS.id()))
getOrCreateTagBuilder(BiomeTags.SPAWNS_WARM_VARIANT_FROGS)
.addOptional(TraverseBiomes.DESERT_SHRUBLAND);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.WATER_ON_MAP_OUTLINES.id()))
getOrCreateTagBuilder(BiomeTags.WATER_ON_MAP_OUTLINES)
.addOptional(TraverseBiomes.LUSH_SWAMP);


/*
* Conventional biome categories
*/
getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, ConventionalBiomeTags.CLIMATE_TEMPERATE.id()))
getOrCreateTagBuilder(ConventionalBiomeTags.CLIMATE_TEMPERATE)
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.FLATLANDS)
.addOptional(TraverseBiomes.LUSH_SWAMP)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, ConventionalBiomeTags.DESERT.id()))
getOrCreateTagBuilder(ConventionalBiomeTags.DESERT)
.addOptional(TraverseBiomes.DESERT_SHRUBLAND);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, ConventionalBiomeTags.PLAINS.id()))
getOrCreateTagBuilder(ConventionalBiomeTags.PLAINS)
.addOptional(TraverseBiomes.FLATLANDS);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, ConventionalBiomeTags.IN_OVERWORLD.id()))
getOrCreateTagBuilder(ConventionalBiomeTags.IN_OVERWORLD)
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.DESERT_SHRUBLAND)
Expand All @@ -68,16 +69,16 @@ public void configure(RegistryWrapper.WrapperLookup registries) {
.addOptional(TraverseBiomes.SNOWY_CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, ConventionalBiomeTags.SNOWY.id()))
getOrCreateTagBuilder(ConventionalBiomeTags.SNOWY)
.addOptional(TraverseBiomes.SNOWY_CONIFEROUS_FOREST);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, ConventionalBiomeTags.SWAMP.id()))
getOrCreateTagBuilder(ConventionalBiomeTags.SWAMP)
.addOptional(TraverseBiomes.LUSH_SWAMP);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, ConventionalBiomeTags.TREE_CONIFEROUS.id()))
getOrCreateTagBuilder(ConventionalBiomeTags.TREE_CONIFEROUS)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, ConventionalBiomeTags.TREE_DECIDUOUS.id()))
getOrCreateTagBuilder(ConventionalBiomeTags.TREE_DECIDUOUS)
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.LUSH_SWAMP)
.addOptional(TraverseBiomes.WOODLANDS);
Expand All @@ -86,34 +87,34 @@ public void configure(RegistryWrapper.WrapperLookup registries) {
/*
* Biome structure generation tags
*/
getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.IGLOO_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.IGLOO_HAS_STRUCTURE)
.addOptional(TraverseBiomes.SNOWY_CONIFEROUS_FOREST);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.MINESHAFT_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.MINESHAFT_HAS_STRUCTURE)
.addOptional(TraverseBiomes.DESERT_SHRUBLAND)
.addOptional(TraverseBiomes.FLATLANDS)
.addOptional(TraverseBiomes.LUSH_SWAMP);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.PILLAGER_OUTPOST_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.PILLAGER_OUTPOST_HAS_STRUCTURE)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.DESERT_SHRUBLAND)
.addOptional(TraverseBiomes.FLATLANDS)
.addOptional(TraverseBiomes.SNOWY_CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.RUINED_PORTAL_DESERT_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.RUINED_PORTAL_DESERT_HAS_STRUCTURE)
.addOptional(TraverseBiomes.DESERT_SHRUBLAND);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.RUINED_PORTAL_STANDARD_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.RUINED_PORTAL_STANDARD_HAS_STRUCTURE)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.FLATLANDS)
.addOptional(TraverseBiomes.SNOWY_CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.RUINED_PORTAL_SWAMP_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.RUINED_PORTAL_SWAMP_HAS_STRUCTURE)
.addOptional(TraverseBiomes.LUSH_SWAMP);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.STRONGHOLD_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.STRONGHOLD_HAS_STRUCTURE)
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.DESERT_SHRUBLAND)
Expand All @@ -122,14 +123,45 @@ public void configure(RegistryWrapper.WrapperLookup registries) {
.addOptional(TraverseBiomes.SNOWY_CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.SWAMP_HUT_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.SWAMP_HUT_HAS_STRUCTURE)
.addOptional(TraverseBiomes.LUSH_SWAMP);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.VILLAGE_DESERT_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.VILLAGE_DESERT_HAS_STRUCTURE)
.addOptional(TraverseBiomes.DESERT_SHRUBLAND);

getOrCreateTagBuilder(TagKey.of(RegistryKeys.BIOME, BiomeTags.VILLAGE_PLAINS_HAS_STRUCTURE.id()))
getOrCreateTagBuilder(BiomeTags.VILLAGE_PLAINS_HAS_STRUCTURE)
.addOptional(TraverseBiomes.FLATLANDS)
.addOptional(TraverseBiomes.WOODLANDS);

/*
* Compatibility tags for Wilder Wild
*/
getOrCreateTagBuilder(TagKey.of(registryRef, new Identifier("wilderwild", "forest_grass")))
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(registryRef, new Identifier("wilderwild", "has_carnation")))
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(registryRef, new Identifier("wilderwild", "has_seeding_dandelion")))
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.CONIFEROUS_FOREST)
.addOptional(TraverseBiomes.WOODLANDS);

getOrCreateTagBuilder(TagKey.of(registryRef, new Identifier("wilderwild", "has_rare_seeding_dandelion")))
.addOptional(TraverseBiomes.FLATLANDS);

getOrCreateTagBuilder(TagKey.of(registryRef, new Identifier("wilderwild", "has_milkweed")))
.addOptional(TraverseBiomes.AUTUMNAL_WOODS)
.addOptional(TraverseBiomes.LUSH_SWAMP);

getOrCreateTagBuilder(TagKey.of(registryRef, new Identifier("wilderwild", "has_cattail_common")))
.addOptional(TraverseBiomes.LUSH_SWAMP);

getOrCreateTagBuilder(TagKey.of(registryRef, new Identifier("wilderwild", "firefly_spawnable_during_day")))
.addOptional(TraverseBiomes.LUSH_SWAMP);
}
}

0 comments on commit c8352c0

Please sign in to comment.