goldodemon/most / ExampleWorldGen.json
goldodemon's picture
download
raw
2.18 kB
{
"path": "Minecraft/mc-Data/ExampleWorldGen.java",
"original_extension": "java",
"content": "package com.example.examplemod;\n\nimport net.fabricmc.fabric.api.biome.v1.BiomeModifications;\nimport net.fabricmc.fabric.api.biome.v1.BiomeSelectors;\nimport net.minecraft.registry.RegistryKeys;\nimport net.minecraft.registry.tag.BiomeTags;\nimport net.minecraft.world.gen.GenerationStep;\n\n/**\n * Adds a custom ore feature to all \"is_overworld\" biomes using Fabric's\n * BiomeModifications API. The underlying ConfiguredFeature/PlacedFeature\n * are defined as JSON datapack files (see comment at bottom);\n * BiomeModifications API unchanged across 1.21.7 - 1.21.11.\n */\npublic final class ExampleWorldGen {\n\n private ExampleWorldGen() {}\n\n public static void register() {\n BiomeModifications.addFeature(\n BiomeSelectors.tag(BiomeTags.IS_OVERWORLD),\n GenerationStep.Feature.UNDERGROUND_ORES,\n net.minecraft.registry.RegistryKey.of(\n RegistryKeys.PLACED_FEATURE,\n net.minecraft.util.Identifier.of(ExampleMod.MOD_ID, \"ore_example_gem_ore\")\n )\n );\n }\n}\n\n/*\n * data/examplemod/worldgen/configured_feature/ore_example_gem_ore.json\n * {\n * \"type\": \"minecraft:ore\",\n * \"config\": {\n * \"size\": 9,\n * \"discard_chance_on_air_exposure\": 0.0,\n * \"targets\": [\n * {\n * \"target\": { \"predicate_type\": \"minecraft:block_match\", \"block\": \"minecraft:stone\" },\n * \"state\": { \"Name\": \"examplemod:example_block\" }\n * }\n * ]\n * }\n * }\n *\n * data/examplemod/worldgen/placed_feature/ore_example_gem_ore.json\n * {\n * \"feature\": \"examplemod:ore_example_gem_ore\",\n * \"placement\": [\n * { \"type\": \"minecraft:count\", \"count\": 4 },\n * { \"type\": \"minecraft:in_square\" },\n * { \"type\": \"minecraft:height_range\",\n * \"height\": { \"type\": \"minecraft:trapezoid\", \"min_inclusive\": { \"absolute\": -32 }, \"max_inclusive\": { \"absolute\": 32 } } },\n * { \"type\": \"minecraft:biome\" }\n * ]\n * }\n */\n"
}

Xet Storage Details

Size:
2.18 kB
·
Xet hash:
92ffb26ac3934bd1cad2cb4ddb3299626b6211355b435306f7972e8a8452a77c

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.