From 14fd17f6f2d27d72f65531e489375b5ae79719d6 Mon Sep 17 00:00:00 2001 From: Treetrain1 <39657565+Treetrain1@users.noreply.github.com> Date: Wed, 8 Nov 2023 13:36:45 -0600 Subject: [PATCH] initial wilder wild compat (#106) - Add compatibility tags for Wilder Wild, thanks to Treetrain1 --- .../data/TraverseBiomeTagProvider.java | 81 +++++++++++++------ gradle.properties | 2 +- 2 files changed, 58 insertions(+), 25 deletions(-) diff --git a/common/src/main/java/com/terraformersmc/traverse/data/TraverseBiomeTagProvider.java b/common/src/main/java/com/terraformersmc/traverse/data/TraverseBiomeTagProvider.java index d6a71eb..1fc09bd 100644 --- a/common/src/main/java/com/terraformersmc/traverse/data/TraverseBiomeTagProvider.java +++ b/common/src/main/java/com/terraformersmc/traverse/data/TraverseBiomeTagProvider.java @@ -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; @@ -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) @@ -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); @@ -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) @@ -122,14 +123,46 @@ 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 + */ + + 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); } } diff --git a/gradle.properties b/gradle.properties index 8aeb348..f5adaf0 100644 --- a/gradle.properties +++ b/gradle.properties @@ -12,7 +12,7 @@ terraform_config_api_version=8.0.0 terraform_surfaces_api_version=8.0.0 terraform_tree_api_version=8.0.0 terraform_wood_api_version=8.0.0 -fabric_version=0.89.1+1.20.2 +fabric_version=0.90.4+1.20.2 # Biolith for worldgen module and testing biolith_version=1.1.0-alpha.1