@@ -5,6 +5,7 @@ import org.apache.logging.log4j.Logger;
|
||||
|
||||
import de.jottyfan.minecraft.gta.block.UnoBlocks;
|
||||
import de.jottyfan.minecraft.gta.item.UnoItems;
|
||||
import de.jottyfan.minecraft.gta.feature.UnoFeatures;
|
||||
import net.fabricmc.api.ModInitializer;
|
||||
|
||||
public class Uno implements ModInitializer {
|
||||
@@ -17,5 +18,6 @@ public class Uno implements ModInitializer {
|
||||
LOGGER.info("initializing uno");
|
||||
UnoItems.registerUnoItems();
|
||||
UnoBlocks.registerModBlocks();
|
||||
UnoFeatures.registerFeatures();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package de.jottyfan.minecraft.gta.feature;
|
||||
|
||||
import de.jottyfan.minecraft.gta.Uno;
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeModifications;
|
||||
import net.fabricmc.fabric.api.biome.v1.BiomeSelectors;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.resources.Identifier;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep;
|
||||
import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
|
||||
import net.minecraft.world.level.levelgen.placement.PlacedFeature;
|
||||
|
||||
public class UnoFeatures {
|
||||
public static final ResourceKey<ConfiguredFeature<?, ?>> CF_RUBY_ORE = genCf("ruby_ore");
|
||||
|
||||
public static final ResourceKey<PlacedFeature> PF_RUBY_ORE = genPf("ruby_ore");
|
||||
|
||||
private static ResourceKey<ConfiguredFeature<?, ?>> genCf(String name) {
|
||||
return ResourceKey.create(Registries.CONFIGURED_FEATURE, Identifier.fromNamespaceAndPath(Uno.MOD_ID, name));
|
||||
}
|
||||
|
||||
private static ResourceKey<PlacedFeature> genPf(String name) {
|
||||
return ResourceKey.create(Registries.PLACED_FEATURE, Identifier.fromNamespaceAndPath(Uno.MOD_ID, name));
|
||||
}
|
||||
|
||||
public static final void registerFeatures() {
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Decoration.UNDERGROUND_ORES, PF_RUBY_ORE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"uno:ruby_ore"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"replace": false,
|
||||
"values": [
|
||||
"uno:ruby_ore"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"config": {
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 10,
|
||||
"targets": [
|
||||
{
|
||||
"state": {
|
||||
"Name": "uno:ruby_ore"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "uno:ruby_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 9
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:trapezoid",
|
||||
"max_inclusive": {
|
||||
"absolute": 128
|
||||
},
|
||||
"min_inclusive": {
|
||||
"absolute": -128
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user