1.1.1!
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
// 1.21 2024-12-31T12:23:21.3888366 Registries
|
||||
// 1.21 2025-01-04T16:52:56.0700567 Registries
|
||||
53aea7bfe12c9e17903617fdc8946ce53057c9da data/nuggetmod/forge/biome_modifier/add_nugget_ore.json
|
||||
12edbe7dddaf2b8379bdf3bc1f3552c83a86e3b2 data/nuggetmod/trim_material/nugget.json
|
||||
c26c02f523d403aa4352b30b1a97a95a69a4d97c data/nuggetmod/trim_pattern/nugget.json
|
||||
8b0873c1ad86c61c7c0dfd0749909cc9982639de data/nuggetmod/worldgen/configured_feature/nugget_ore.json
|
||||
c86e299467433ed0c44ce94a9a75e4352f8ce6ca data/nuggetmod/worldgen/placed_feature/nugget_ore_placed.json
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "forge:add_features",
|
||||
"biomes": "#minecraft:is_overworld",
|
||||
"features": "nuggetmod:nugget_ore_placed",
|
||||
"step": "underground_ores"
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"config": {
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 9,
|
||||
"targets": [
|
||||
{
|
||||
"state": {
|
||||
"Name": "nuggetmod:nugget_ore"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": {
|
||||
"Name": "nuggetmod:nugget_deepslate_ore"
|
||||
},
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "nuggetmod:nugget_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 12
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"max_inclusive": {
|
||||
"absolute": 80
|
||||
},
|
||||
"min_inclusive": {
|
||||
"absolute": -64
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
package xyz.sillyangel.nugget.worldgen;
|
||||
|
||||
import net.minecraft.core.HolderSet;
|
||||
import net.minecraft.tags.BiomeTags;
|
||||
import net.minecraft.world.level.levelgen.GenerationStep;
|
||||
import net.minecraftforge.common.world.ForgeBiomeModifiers;
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
import net.minecraft.data.worldgen.BootstrapContext;
|
||||
@@ -9,11 +13,17 @@ import net.minecraftforge.common.world.BiomeModifier;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
public class ModBiomeModifiers {
|
||||
public static final ResourceKey<BiomeModifier> ADD_NUGGET_ORE = registerKey("add_nugget_ore");
|
||||
|
||||
public static void bootstrap(BootstrapContext<BiomeModifier> context) {
|
||||
var placedFeature = context.lookup(Registries.PLACED_FEATURE);
|
||||
var biomes = context.lookup(Registries.BIOME);
|
||||
|
||||
context.register(ADD_NUGGET_ORE, new ForgeBiomeModifiers.AddFeaturesBiomeModifier(
|
||||
biomes.getOrThrow(BiomeTags.IS_OVERWORLD),
|
||||
HolderSet.direct(placedFeature.getOrThrow(ModPlacedFeatures.NUGGET_ORE_PLACED_KEY)),
|
||||
GenerationStep.Decoration.UNDERGROUND_ORES));
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.List;
|
||||
|
||||
public class ModConfiguredFeatures {
|
||||
|
||||
public static final ResourceKey<ConfiguredFeature<?, ?>> OVERWORLD_NUGGET_ORE = registerKey("nugget_ore");
|
||||
public static final ResourceKey<ConfiguredFeature<?, ?>> OVERWORLD_NUGGET_ORE_KEY = registerKey("nugget_ore");
|
||||
|
||||
|
||||
public static void bootstrap(BootstrapContext<ConfiguredFeature<?, ?>> context) {
|
||||
@@ -29,7 +29,7 @@ public class ModConfiguredFeatures {
|
||||
OreConfiguration.target(stoneReplaceables, ModBlocks.NUGGET_ORE.get().defaultBlockState()),
|
||||
OreConfiguration.target(deepslateReplaceables, ModBlocks.NUGGET_DEEPSLATE_ORE.get().defaultBlockState()));
|
||||
|
||||
register(context, OVERWORLD_NUGGET_ORE, Feature.ORE, new OreConfiguration(overworldNuggetOres, 9));
|
||||
register(context, OVERWORLD_NUGGET_ORE_KEY, Feature.ORE, new OreConfiguration(overworldNuggetOres, 9));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package xyz.sillyangel.nugget.worldgen;
|
||||
|
||||
import net.minecraft.world.level.levelgen.VerticalAnchor;
|
||||
import net.minecraft.world.level.levelgen.placement.HeightRangePlacement;
|
||||
import xyz.sillyangel.nugget.NuggetMod;
|
||||
import net.minecraft.core.Holder;
|
||||
import net.minecraft.core.registries.Registries;
|
||||
@@ -14,10 +16,15 @@ import java.util.List;
|
||||
|
||||
public class ModPlacedFeatures {
|
||||
|
||||
public static final ResourceKey<PlacedFeature> NUGGET_ORE_PLACED_KEY = registerKey("nugget_ore_placed");
|
||||
|
||||
|
||||
public static void bootstrap(BootstrapContext<PlacedFeature> context) {
|
||||
var configuredFeatures = context.lookup(Registries.CONFIGURED_FEATURE);
|
||||
|
||||
|
||||
register(context, NUGGET_ORE_PLACED_KEY, configuredFeatures.getOrThrow(ModConfiguredFeatures.OVERWORLD_NUGGET_ORE_KEY),
|
||||
ModOrePlacement.commonOrePlacement(12,
|
||||
HeightRangePlacement.uniform(VerticalAnchor.absolute(-64), VerticalAnchor.absolute(80))));
|
||||
}
|
||||
|
||||
private static ResourceKey<PlacedFeature> registerKey(String name) {
|
||||
|
||||
Reference in New Issue
Block a user