mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 00:07:45 +00:00
1.18.x Port BiomeDictionary over to biome tags (#8564)
This commit is contained in:
1 parent
4008057803
commit
d4c8708229
41 files changed
+629
No files matched your search
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:beach",
|
||||
"minecraft:stony_shore",
|
||||
"minecraft:snowy_beach"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:taiga",
|
||||
"minecraft:the_end",
|
||||
"minecraft:frozen_ocean",
|
||||
"minecraft:frozen_river",
|
||||
"minecraft:snowy_plains",
|
||||
"minecraft:snowy_beach",
|
||||
"minecraft:snowy_taiga",
|
||||
"minecraft:old_growth_pine_taiga",
|
||||
"minecraft:grove",
|
||||
"minecraft:snowy_slopes",
|
||||
"minecraft:jagged_peaks",
|
||||
"minecraft:frozen_peaks",
|
||||
"minecraft:small_end_islands",
|
||||
"minecraft:end_midlands",
|
||||
"minecraft:end_highlands",
|
||||
"minecraft:end_barrens",
|
||||
"minecraft:cold_ocean",
|
||||
"minecraft:deep_cold_ocean",
|
||||
"minecraft:deep_frozen_ocean",
|
||||
"minecraft:ice_spikes"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:the_end",
|
||||
"minecraft:small_end_islands",
|
||||
"minecraft:end_midlands",
|
||||
"minecraft:end_highlands",
|
||||
"minecraft:end_barrens"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:taiga",
|
||||
"minecraft:frozen_ocean",
|
||||
"minecraft:frozen_river",
|
||||
"minecraft:snowy_plains",
|
||||
"minecraft:snowy_beach",
|
||||
"minecraft:snowy_taiga",
|
||||
"minecraft:old_growth_pine_taiga",
|
||||
"minecraft:grove",
|
||||
"minecraft:snowy_slopes",
|
||||
"minecraft:jagged_peaks",
|
||||
"minecraft:frozen_peaks",
|
||||
"minecraft:cold_ocean",
|
||||
"minecraft:deep_cold_ocean",
|
||||
"minecraft:deep_frozen_ocean",
|
||||
"minecraft:ice_spikes"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:taiga",
|
||||
"minecraft:snowy_taiga",
|
||||
"minecraft:old_growth_pine_taiga",
|
||||
"minecraft:grove"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:jungle",
|
||||
"minecraft:dark_forest",
|
||||
"minecraft:old_growth_birch_forest",
|
||||
"minecraft:old_growth_spruce_taiga"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:jungle",
|
||||
"minecraft:dark_forest",
|
||||
"minecraft:old_growth_birch_forest",
|
||||
"minecraft:old_growth_spruce_taiga"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:desert",
|
||||
"minecraft:nether_wastes",
|
||||
"minecraft:the_end",
|
||||
"minecraft:badlands",
|
||||
"minecraft:wooded_badlands",
|
||||
"minecraft:small_end_islands",
|
||||
"minecraft:end_midlands",
|
||||
"minecraft:end_highlands",
|
||||
"minecraft:end_barrens",
|
||||
"minecraft:windswept_savanna",
|
||||
"minecraft:eroded_badlands",
|
||||
"minecraft:soul_sand_valley",
|
||||
"minecraft:crimson_forest",
|
||||
"minecraft:warped_forest",
|
||||
"minecraft:basalt_deltas"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:the_end",
|
||||
"minecraft:small_end_islands",
|
||||
"minecraft:end_midlands",
|
||||
"minecraft:end_highlands",
|
||||
"minecraft:end_barrens"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:nether_wastes",
|
||||
"minecraft:soul_sand_valley",
|
||||
"minecraft:crimson_forest",
|
||||
"minecraft:warped_forest",
|
||||
"minecraft:basalt_deltas"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:desert",
|
||||
"minecraft:badlands",
|
||||
"minecraft:wooded_badlands",
|
||||
"minecraft:windswept_savanna",
|
||||
"minecraft:eroded_badlands"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:the_end",
|
||||
"minecraft:small_end_islands",
|
||||
"minecraft:end_midlands",
|
||||
"minecraft:end_highlands",
|
||||
"minecraft:end_barrens"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:desert",
|
||||
"minecraft:nether_wastes",
|
||||
"minecraft:jungle",
|
||||
"minecraft:sparse_jungle",
|
||||
"minecraft:savanna",
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:stony_peaks",
|
||||
"minecraft:warm_ocean",
|
||||
"minecraft:windswept_savanna",
|
||||
"minecraft:eroded_badlands",
|
||||
"minecraft:bamboo_jungle",
|
||||
"minecraft:soul_sand_valley",
|
||||
"minecraft:crimson_forest",
|
||||
"minecraft:warped_forest",
|
||||
"minecraft:basalt_deltas"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:nether_wastes",
|
||||
"minecraft:soul_sand_valley",
|
||||
"minecraft:crimson_forest",
|
||||
"minecraft:warped_forest",
|
||||
"minecraft:basalt_deltas"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:desert",
|
||||
"minecraft:jungle",
|
||||
"minecraft:sparse_jungle",
|
||||
"minecraft:savanna",
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:stony_peaks",
|
||||
"minecraft:warm_ocean",
|
||||
"minecraft:windswept_savanna",
|
||||
"minecraft:eroded_badlands",
|
||||
"minecraft:bamboo_jungle"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:lush_caves"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:mushroom_fields"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:ocean",
|
||||
"minecraft:plains",
|
||||
"minecraft:desert",
|
||||
"minecraft:windswept_hills",
|
||||
"minecraft:forest",
|
||||
"minecraft:taiga",
|
||||
"minecraft:swamp",
|
||||
"minecraft:river",
|
||||
"minecraft:frozen_ocean",
|
||||
"minecraft:frozen_river",
|
||||
"minecraft:snowy_plains",
|
||||
"minecraft:mushroom_fields",
|
||||
"minecraft:beach",
|
||||
"minecraft:jungle",
|
||||
"minecraft:sparse_jungle",
|
||||
"minecraft:deep_ocean",
|
||||
"minecraft:stony_shore",
|
||||
"minecraft:snowy_beach",
|
||||
"minecraft:birch_forest",
|
||||
"minecraft:dark_forest",
|
||||
"minecraft:snowy_taiga",
|
||||
"minecraft:old_growth_pine_taiga",
|
||||
"minecraft:windswept_forest",
|
||||
"minecraft:savanna",
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:badlands",
|
||||
"minecraft:wooded_badlands",
|
||||
"minecraft:meadow",
|
||||
"minecraft:grove",
|
||||
"minecraft:snowy_slopes",
|
||||
"minecraft:jagged_peaks",
|
||||
"minecraft:frozen_peaks",
|
||||
"minecraft:stony_peaks",
|
||||
"minecraft:warm_ocean",
|
||||
"minecraft:lukewarm_ocean",
|
||||
"minecraft:cold_ocean",
|
||||
"minecraft:deep_lukewarm_ocean",
|
||||
"minecraft:deep_cold_ocean",
|
||||
"minecraft:deep_frozen_ocean",
|
||||
"minecraft:sunflower_plains",
|
||||
"minecraft:windswept_gravelly_hills",
|
||||
"minecraft:flower_forest",
|
||||
"minecraft:ice_spikes",
|
||||
"minecraft:old_growth_birch_forest",
|
||||
"minecraft:old_growth_spruce_taiga",
|
||||
"minecraft:windswept_savanna",
|
||||
"minecraft:eroded_badlands",
|
||||
"minecraft:bamboo_jungle",
|
||||
"minecraft:lush_caves",
|
||||
"minecraft:dripstone_caves"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:jagged_peaks",
|
||||
"minecraft:frozen_peaks",
|
||||
"minecraft:stony_peaks"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:plains",
|
||||
"minecraft:snowy_plains",
|
||||
"minecraft:meadow",
|
||||
"minecraft:sunflower_plains"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:wooded_badlands",
|
||||
"minecraft:meadow"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:mushroom_fields",
|
||||
"minecraft:sparse_jungle",
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:sunflower_plains",
|
||||
"minecraft:windswept_gravelly_hills",
|
||||
"minecraft:flower_forest",
|
||||
"minecraft:ice_spikes",
|
||||
"minecraft:old_growth_birch_forest",
|
||||
"minecraft:old_growth_spruce_taiga",
|
||||
"minecraft:windswept_savanna",
|
||||
"minecraft:eroded_badlands",
|
||||
"minecraft:bamboo_jungle"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:desert",
|
||||
"minecraft:badlands",
|
||||
"minecraft:wooded_badlands"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:savanna",
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:windswept_savanna"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:wooded_badlands",
|
||||
"minecraft:meadow",
|
||||
"minecraft:grove",
|
||||
"minecraft:snowy_slopes"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:frozen_ocean",
|
||||
"minecraft:frozen_river",
|
||||
"minecraft:snowy_plains",
|
||||
"minecraft:snowy_beach",
|
||||
"minecraft:snowy_taiga",
|
||||
"minecraft:grove",
|
||||
"minecraft:snowy_slopes",
|
||||
"minecraft:jagged_peaks",
|
||||
"minecraft:frozen_peaks",
|
||||
"minecraft:ice_spikes"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:windswept_forest",
|
||||
"minecraft:savanna",
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:wooded_badlands",
|
||||
"minecraft:snowy_slopes",
|
||||
"minecraft:jagged_peaks",
|
||||
"minecraft:frozen_peaks",
|
||||
"minecraft:windswept_gravelly_hills",
|
||||
"minecraft:windswept_savanna",
|
||||
"minecraft:eroded_badlands",
|
||||
"minecraft:dripstone_caves"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:windswept_forest",
|
||||
"minecraft:savanna",
|
||||
"minecraft:savanna_plateau",
|
||||
"minecraft:wooded_badlands",
|
||||
"minecraft:snowy_slopes",
|
||||
"minecraft:jagged_peaks",
|
||||
"minecraft:frozen_peaks",
|
||||
"minecraft:windswept_gravelly_hills",
|
||||
"minecraft:windswept_savanna",
|
||||
"minecraft:eroded_badlands",
|
||||
"minecraft:dripstone_caves"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:dark_forest"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:swamp"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:lush_caves",
|
||||
"minecraft:dripstone_caves"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:the_void"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:snowy_plains"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#minecraft:is_ocean",
|
||||
"#minecraft:is_river"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:swamp",
|
||||
"minecraft:jungle",
|
||||
"minecraft:sparse_jungle",
|
||||
"minecraft:sparse_jungle",
|
||||
"minecraft:bamboo_jungle",
|
||||
"minecraft:lush_caves"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"minecraft:swamp",
|
||||
"minecraft:jungle",
|
||||
"minecraft:bamboo_jungle",
|
||||
"minecraft:lush_caves"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"#forge:is_peak",
|
||||
"#forge:is_slope"
|
||||
]
|
||||
}
|
||||
@@ -13,6 +13,7 @@ import java.util.stream.StreamSupport;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraftforge.event.world.BiomeLoadingEvent;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -26,6 +27,11 @@ import com.google.common.collect.ImmutableList;
|
||||
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
|
||||
/**
|
||||
* Use {@link Tags.Biomes} when possible.
|
||||
* Note that tags are not usable yet during {@link BiomeLoadingEvent} so BiomeDictionary are still necessary there
|
||||
*/
|
||||
@Deprecated
|
||||
public class BiomeDictionary
|
||||
{
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
@@ -23,6 +23,7 @@ import net.minecraftforge.common.crafting.PartialNBTIngredient;
|
||||
import net.minecraftforge.common.crafting.DifferenceIngredient;
|
||||
import net.minecraftforge.common.crafting.IntersectionIngredient;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.common.data.ForgeBiomeTagsProvider;
|
||||
import net.minecraftforge.common.data.ForgeFluidTagsProvider;
|
||||
import net.minecraftforge.common.extensions.IForgeEntity;
|
||||
import net.minecraftforge.common.extensions.IForgePlayer;
|
||||
@@ -233,6 +234,7 @@ public class ForgeMod
|
||||
gen.addProvider(new ForgeFluidTagsProvider(gen, existingFileHelper));
|
||||
gen.addProvider(new ForgeRecipeProvider(gen));
|
||||
gen.addProvider(new ForgeLootTableProvider(gen));
|
||||
gen.addProvider(new ForgeBiomeTagsProvider(gen, existingFileHelper));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,15 +5,19 @@
|
||||
|
||||
package net.minecraftforge.common;
|
||||
|
||||
import net.minecraft.core.Registry;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.tags.BlockTags;
|
||||
import net.minecraft.tags.FluidTags;
|
||||
import net.minecraft.tags.ItemTags;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.material.Fluid;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Set;
|
||||
@@ -26,6 +30,7 @@ public class Tags
|
||||
Blocks.init();
|
||||
Items.init();
|
||||
Fluids.init();
|
||||
Biomes.init();
|
||||
}
|
||||
|
||||
public static class Blocks
|
||||
@@ -411,4 +416,71 @@ public class Tags
|
||||
return FluidTags.create(new ResourceLocation("forge", name));
|
||||
}
|
||||
}
|
||||
|
||||
public static class Biomes
|
||||
{
|
||||
private static void init() {}
|
||||
|
||||
public static final TagKey<Biome> IS_HOT = tag("is_hot");
|
||||
public static final TagKey<Biome> IS_HOT_OVERWORLD = tag("is_hot/overworld");
|
||||
public static final TagKey<Biome> IS_HOT_NETHER = tag("is_hot/nether");
|
||||
public static final TagKey<Biome> IS_HOT_END = tag("is_hot/end");
|
||||
|
||||
public static final TagKey<Biome> IS_COLD = tag("is_cold");
|
||||
public static final TagKey<Biome> IS_COLD_OVERWORLD = tag("is_cold/overworld");
|
||||
public static final TagKey<Biome> IS_COLD_NETHER = tag("is_cold/nether");
|
||||
public static final TagKey<Biome> IS_COLD_END = tag("is_cold/end");
|
||||
|
||||
public static final TagKey<Biome> IS_SPARSE = tag("is_sparse");
|
||||
public static final TagKey<Biome> IS_SPARSE_OVERWORLD = tag("is_sparse/overworld");
|
||||
public static final TagKey<Biome> IS_SPARSE_NETHER = tag("is_sparse/nether");
|
||||
public static final TagKey<Biome> IS_SPARSE_END = tag("is_sparse/end");
|
||||
public static final TagKey<Biome> IS_DENSE = tag("is_dense");
|
||||
public static final TagKey<Biome> IS_DENSE_OVERWORLD = tag("is_dense/overworld");
|
||||
public static final TagKey<Biome> IS_DENSE_NETHER = tag("is_dense/nether");
|
||||
public static final TagKey<Biome> IS_DENSE_END = tag("is_dense/end");
|
||||
|
||||
public static final TagKey<Biome> IS_WET = tag("is_wet");
|
||||
public static final TagKey<Biome> IS_WET_OVERWORLD = tag("is_wet/overworld");
|
||||
public static final TagKey<Biome> IS_WET_NETHER = tag("is_wet/nether");
|
||||
public static final TagKey<Biome> IS_WET_END = tag("is_wet/end");
|
||||
public static final TagKey<Biome> IS_DRY = tag("is_dry");
|
||||
public static final TagKey<Biome> IS_DRY_OVERWORLD = tag("is_dry/overworld");
|
||||
public static final TagKey<Biome> IS_DRY_NETHER = tag("is_dry/nether");
|
||||
public static final TagKey<Biome> IS_DRY_END = tag("is_dry/end");
|
||||
|
||||
public static final TagKey<Biome> IS_SAVANNA = tag("is_savanna");
|
||||
public static final TagKey<Biome> IS_CONIFEROUS = tag("is_coniferous");
|
||||
|
||||
public static final TagKey<Biome> IS_SPOOKY = tag("is_spooky");
|
||||
public static final TagKey<Biome> IS_DEAD = tag("is_dead");
|
||||
public static final TagKey<Biome> IS_LUSH = tag("is_lush");
|
||||
public static final TagKey<Biome> IS_MUSHROOM = tag("is_mushroom");
|
||||
public static final TagKey<Biome> IS_MAGICAL = tag("is_magical");
|
||||
public static final TagKey<Biome> IS_RARE = tag("is_rare");
|
||||
public static final TagKey<Biome> IS_PLATEAU = tag("is_plateau");
|
||||
public static final TagKey<Biome> IS_MODIFIED = tag("is_modified");
|
||||
|
||||
public static final TagKey<Biome> IS_WATER = tag("is_water");
|
||||
|
||||
public static final TagKey<Biome> IS_PLAINS = tag("is_plains");
|
||||
public static final TagKey<Biome> IS_SWAMP = tag("is_swamp");
|
||||
public static final TagKey<Biome> IS_SANDY = tag("is_sandy");
|
||||
public static final TagKey<Biome> IS_SNOWY = tag("is_snowy");
|
||||
public static final TagKey<Biome> IS_WASTELAND = tag("is_wasteland");
|
||||
public static final TagKey<Biome> IS_BEACH = tag("is_beach");
|
||||
public static final TagKey<Biome> IS_VOID = tag("is_void");
|
||||
public static final TagKey<Biome> IS_UNDERGROUND = tag("is_underground");
|
||||
|
||||
public static final TagKey<Biome> IS_PEAK = tag("is_peak");
|
||||
public static final TagKey<Biome> IS_SLOPE = tag("is_slope");
|
||||
|
||||
public static final TagKey<Biome> IS_OVERWORLD = tag("is_overworld");
|
||||
public static final TagKey<Biome> IS_END = tag("is_end");
|
||||
|
||||
private static TagKey<Biome> tag(String name)
|
||||
{
|
||||
return TagKey.create(Registry.BIOME_REGISTRY, new ResourceLocation("forge", name));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
/*
|
||||
* Minecraft Forge - Forge Development LLC
|
||||
* SPDX-License-Identifier: LGPL-2.1-only
|
||||
*/
|
||||
|
||||
package net.minecraftforge.common.data;
|
||||
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraft.data.tags.BiomeTagsProvider;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.tags.TagKey;
|
||||
import net.minecraft.world.level.biome.Biome;
|
||||
import net.minecraft.world.level.biome.Biomes;
|
||||
import net.minecraftforge.common.Tags;
|
||||
|
||||
public final class ForgeBiomeTagsProvider extends BiomeTagsProvider
|
||||
{
|
||||
|
||||
public ForgeBiomeTagsProvider(DataGenerator arg, ExistingFileHelper existingFileHelper)
|
||||
{
|
||||
super(arg, "forge", existingFileHelper);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void addTags()
|
||||
{
|
||||
tag(Biomes.OCEAN, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.PLAINS, Tags.Biomes.IS_PLAINS, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.DESERT, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_OVERWORLD, Tags.Biomes.IS_SANDY, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.WINDSWEPT_HILLS, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.FOREST, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.TAIGA, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_CONIFEROUS, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SWAMP, Tags.Biomes.IS_WET, Tags.Biomes.IS_WET_OVERWORLD, Tags.Biomes.IS_SWAMP, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.RIVER, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.NETHER_WASTES, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_NETHER, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_NETHER);
|
||||
tag(Biomes.THE_END, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_END, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_END, Tags.Biomes.IS_END);
|
||||
tag(Biomes.FROZEN_OCEAN, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.FROZEN_RIVER, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SNOWY_PLAINS, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_WASTELAND, Tags.Biomes.IS_PLAINS, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.MUSHROOM_FIELDS, Tags.Biomes.IS_MUSHROOM, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.BEACH, Tags.Biomes.IS_BEACH, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.JUNGLE, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_WET, Tags.Biomes.IS_WET_OVERWORLD, Tags.Biomes.IS_DENSE, Tags.Biomes.IS_DENSE_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SPARSE_JUNGLE, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_WET, Tags.Biomes.IS_WET, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.DEEP_OCEAN, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.STONY_SHORE, Tags.Biomes.IS_BEACH, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SNOWY_BEACH, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_BEACH, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.BIRCH_FOREST, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.DARK_FOREST, Tags.Biomes.IS_SPOOKY, Tags.Biomes.IS_DENSE, Tags.Biomes.IS_DENSE_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SNOWY_TAIGA, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_CONIFEROUS, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.OLD_GROWTH_PINE_TAIGA, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_CONIFEROUS, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.WINDSWEPT_FOREST, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SAVANNA, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_SAVANNA, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SAVANNA_PLATEAU, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_SAVANNA, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD, Tags.Biomes.IS_SLOPE, Tags.Biomes.IS_PLATEAU);
|
||||
tag(Biomes.BADLANDS, Tags.Biomes.IS_SANDY, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.WOODED_BADLANDS, Tags.Biomes.IS_SANDY, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_OVERWORLD, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_OVERWORLD, Tags.Biomes.IS_SLOPE, Tags.Biomes.IS_PLATEAU);
|
||||
tag(Biomes.MEADOW, Tags.Biomes.IS_PLAINS, Tags.Biomes.IS_PLATEAU, Tags.Biomes.IS_SLOPE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.GROVE, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_CONIFEROUS, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_SLOPE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SNOWY_SLOPES, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_SLOPE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.JAGGED_PEAKS, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_PEAK, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.FROZEN_PEAKS, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_PEAK, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.STONY_PEAKS, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_PEAK, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SMALL_END_ISLANDS, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_END, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_END, Tags.Biomes.IS_END);
|
||||
tag(Biomes.END_MIDLANDS, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_END, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_END, Tags.Biomes.IS_END);
|
||||
tag(Biomes.END_HIGHLANDS, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_END, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_END, Tags.Biomes.IS_END);
|
||||
tag(Biomes.END_BARRENS, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_END, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_END, Tags.Biomes.IS_END);
|
||||
tag(Biomes.WARM_OCEAN, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.LUKEWARM_OCEAN, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.COLD_OCEAN, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.DEEP_LUKEWARM_OCEAN, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.DEEP_COLD_OCEAN, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.DEEP_FROZEN_OCEAN, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.THE_VOID, Tags.Biomes.IS_VOID);
|
||||
tag(Biomes.SUNFLOWER_PLAINS, Tags.Biomes.IS_PLAINS, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.WINDSWEPT_GRAVELLY_HILLS, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.FLOWER_FOREST, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.ICE_SPIKES, Tags.Biomes.IS_COLD, Tags.Biomes.IS_COLD_OVERWORLD, Tags.Biomes.IS_SNOWY, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.OLD_GROWTH_BIRCH_FOREST, Tags.Biomes.IS_DENSE, Tags.Biomes.IS_DENSE_OVERWORLD, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.OLD_GROWTH_SPRUCE_TAIGA, Tags.Biomes.IS_DENSE, Tags.Biomes.IS_DENSE_OVERWORLD, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.WINDSWEPT_SAVANNA, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_OVERWORLD, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_SAVANNA, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.ERODED_BADLANDS, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_OVERWORLD, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.BAMBOO_JUNGLE, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_OVERWORLD, Tags.Biomes.IS_WET, Tags.Biomes.IS_WET_OVERWORLD, Tags.Biomes.IS_RARE, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.LUSH_CAVES, Tags.Biomes.IS_UNDERGROUND, Tags.Biomes.IS_LUSH, Tags.Biomes.IS_WET, Tags.Biomes.IS_WET_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.DRIPSTONE_CAVES, Tags.Biomes.IS_UNDERGROUND, Tags.Biomes.IS_SPARSE, Tags.Biomes.IS_SPARSE_OVERWORLD, Tags.Biomes.IS_OVERWORLD);
|
||||
tag(Biomes.SOUL_SAND_VALLEY, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_NETHER, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_NETHER);
|
||||
tag(Biomes.CRIMSON_FOREST, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_NETHER, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_NETHER);
|
||||
tag(Biomes.WARPED_FOREST, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_NETHER, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_NETHER);
|
||||
tag(Biomes.BASALT_DELTAS, Tags.Biomes.IS_HOT, Tags.Biomes.IS_HOT_NETHER, Tags.Biomes.IS_DRY, Tags.Biomes.IS_DRY_NETHER);
|
||||
|
||||
tag(Tags.Biomes.IS_WATER).addTag(BiomeTags.IS_OCEAN).addTag(BiomeTags.IS_RIVER);
|
||||
tag(BiomeTags.IS_MOUNTAIN).addTag(Tags.Biomes.IS_PEAK).addTag(Tags.Biomes.IS_SLOPE);
|
||||
}
|
||||
|
||||
@SafeVarargs
|
||||
private void tag(ResourceKey<Biome> biome, TagKey<Biome>... tags)
|
||||
{
|
||||
for(TagKey<Biome> key : tags)
|
||||
{
|
||||
tag(key).add(biome);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return "Forge Biome Tags";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user