Buckets:
| package com.example.examplemod; | |
| import net.fabricmc.fabric.api.biome.v1.BiomeModifications; | |
| import net.fabricmc.fabric.api.biome.v1.BiomeSelectors; | |
| import net.minecraft.registry.RegistryKeys; | |
| import net.minecraft.registry.tag.BiomeTags; | |
| import net.minecraft.world.gen.GenerationStep; | |
| /** | |
| * Adds a custom ore feature to all "is_overworld" biomes using Fabric's | |
| * BiomeModifications API. The underlying ConfiguredFeature/PlacedFeature | |
| * are defined as JSON datapack files (see comment at bottom); | |
| * BiomeModifications API unchanged across 1.21.7 - 1.21.11. | |
| */ | |
| public final class ExampleWorldGen { | |
| private ExampleWorldGen() {} | |
| public static void register() { | |
| BiomeModifications.addFeature( | |
| BiomeSelectors.tag(BiomeTags.IS_OVERWORLD), | |
| GenerationStep.Feature.UNDERGROUND_ORES, | |
| net.minecraft.registry.RegistryKey.of( | |
| RegistryKeys.PLACED_FEATURE, | |
| net.minecraft.util.Identifier.of(ExampleMod.MOD_ID, "ore_example_gem_ore") | |
| ) | |
| ); | |
| } | |
| } | |
| /* | |
| * data/examplemod/worldgen/configured_feature/ore_example_gem_ore.json | |
| * { | |
| * "type": "minecraft:ore", | |
| * "config": { | |
| * "size": 9, | |
| * "discard_chance_on_air_exposure": 0.0, | |
| * "targets": [ | |
| * { | |
| * "target": { "predicate_type": "minecraft:block_match", "block": "minecraft:stone" }, | |
| * "state": { "Name": "examplemod:example_block" } | |
| * } | |
| * ] | |
| * } | |
| * } | |
| * | |
| * data/examplemod/worldgen/placed_feature/ore_example_gem_ore.json | |
| * { | |
| * "feature": "examplemod:ore_example_gem_ore", | |
| * "placement": [ | |
| * { "type": "minecraft:count", "count": 4 }, | |
| * { "type": "minecraft:in_square" }, | |
| * { "type": "minecraft:height_range", | |
| * "height": { "type": "minecraft:trapezoid", "min_inclusive": { "absolute": -32 }, "max_inclusive": { "absolute": 32 } } }, | |
| * { "type": "minecraft:biome" } | |
| * ] | |
| * } | |
| */ | |
Xet Storage Details
- Size:
- 1.95 kB
- Xet hash:
- 7f74f5617ae0c494c0419159c381b08f9618c3a92b97e922d393ed73522bbdc4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.