diff --git a/src/main/java/io/github/teampropulsive/Propulsive.java b/src/main/java/io/github/teampropulsive/Propulsive.java index e24c569..5150db7 100644 --- a/src/main/java/io/github/teampropulsive/Propulsive.java +++ b/src/main/java/io/github/teampropulsive/Propulsive.java @@ -6,6 +6,8 @@ import io.github.teampropulsive.space.spacecraft.SpacecraftEntity; import io.github.teampropulsive.types.Planet; import net.fabricmc.api.ModInitializer; +import net.fabricmc.fabric.api.biome.v1.BiomeModifications; +import net.fabricmc.fabric.api.biome.v1.BiomeSelectors; import net.fabricmc.fabric.api.object.builder.v1.entity.FabricDefaultAttributeRegistry; import net.fabricmc.fabric.api.object.builder.v1.entity.FabricEntityTypeBuilder; import net.fabricmc.loader.api.FabricLoader; @@ -20,6 +22,8 @@ import net.minecraft.util.Identifier; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; +import net.minecraft.world.gen.GenerationStep; +import net.minecraft.world.gen.feature.PlacedFeature; import qouteall.q_misc_util.my_util.Vec2d; import java.util.ArrayList; @@ -35,6 +39,7 @@ public class Propulsive implements ModInitializer { RocketEntity::new ).dimensions(EntityDimensions.fixed(0.75f, 0.75f)).build() ); + public static final RegistryKey ALUMINUM_ORE_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("propulsive","ore_aluminum")); @Override public void onInitialize() { @@ -55,6 +60,9 @@ public void onInitialize() { Items.register(); FabricDefaultAttributeRegistry.register(TEST_ROCKET, RocketEntity.createMobAttributes()); + + // Ores + BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, ALUMINUM_ORE_PLACED_KEY); } // Dimensions diff --git a/src/main/resources/data/propulsive/worldgen/configured_feature/ore_aluminum.json b/src/main/resources/data/propulsive/worldgen/configured_feature/ore_aluminum.json new file mode 100644 index 0000000..d62c0ac --- /dev/null +++ b/src/main/resources/data/propulsive/worldgen/configured_feature/ore_aluminum.json @@ -0,0 +1,28 @@ +{ + "type": "minecraft:ore", + "config": { + "discard_chance_on_air_exposure": 0.0, + "size": 12, + "targets": [ + { + "state": { + "Name": "propulsive:aluminum_ore" + }, + "target": { + "predicate_type": "minecraft:tag_match", + "tag": "minecraft:stone_ore_replaceables" + } + }, + { + "state": { + "Name": "propulsive:aluminum_ore_deepslate" + }, + "target": { + "predicate_type": "minecraft:tag_match", + "tag": "minecraft:deepslate_ore_replaceables" + } + } + ] + } +} + diff --git a/src/main/resources/data/propulsive/worldgen/placed_feature/ore_aluminum.json b/src/main/resources/data/propulsive/worldgen/placed_feature/ore_aluminum.json new file mode 100644 index 0000000..8e796ae --- /dev/null +++ b/src/main/resources/data/propulsive/worldgen/placed_feature/ore_aluminum.json @@ -0,0 +1,28 @@ +{ + "feature": "propulsive:ore_aluminum", + "placement": [ + { + "type": "minecraft:count", + "count": 3 + }, + { + "type": "minecraft:in_square" + }, + { + "type": "minecraft:height_range", + "height": { + "type": "minecraft:trapezoid", + "max_inclusive": { + "absolute": 70 + }, + "min_inclusive": { + "absolute": -24 + } + } + }, + { + "type": "minecraft:biome" + } + ] +} +