uranium ore spawns

This commit is contained in:
2026-02-11 17:58:00 +01:00
parent 53dd405852
commit 4a817f8c21
9 changed files with 88 additions and 4 deletions

View File

@@ -6,7 +6,7 @@ minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.18.3
# Mod Properties
mod_version=26.2.10
mod_version=26.2.11
maven_group=dev.tggamesyt
archives_base_name=szar
# Dependencies

View File

@@ -2,6 +2,7 @@ package dev.tggamesyt.szar.client;
import dev.tggamesyt.szar.ModItemTagProvider;
import dev.tggamesyt.szar.ModPoiTagProvider;
import dev.tggamesyt.szar.ModWorldGenerator;
import dev.tggamesyt.szar.Szar;
import net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint;
import net.fabricmc.fabric.api.datagen.v1.FabricDataGenerator;
@@ -16,6 +17,7 @@ public class SzarDataGenerator implements DataGeneratorEntrypoint {
FabricDataGenerator.Pack pack = fabricDataGenerator.createPack();
pack.addProvider(ModPoiTagProvider::new);
pack.addProvider(ModItemTagProvider::new);
pack.addProvider(ModWorldGenerator::new);
}
@Override
public void buildRegistry(RegistryBuilder registryBuilder) {

View File

@@ -0,0 +1,3 @@
// 1.20.1 2026-02-11T16:16:44.8131744 szar/World Gen
1d26b5da3b0a2ea6b23d456d1f0b82455a788ca1 data\szar\worldgen\configured_feature\uranium_ore.json
32864170bdb41310f9ee5d06f5720dfdb3badb6d data\szar\worldgen\placed_feature\uranium_ore_placed.json

View File

@@ -1,2 +1,2 @@
// 1.20.1 2026-02-11T09:35:00.8808882 szar/Tags for minecraft:point_of_interest_type
// 1.20.1 2026-02-11T16:16:44.8131744 szar/Tags for minecraft:point_of_interest_type
eba137b51c50a7143a3668876f41adaa1447b1d1 data\minecraft\tags\point_of_interest_type\acquirable_job_site.json

View File

@@ -1,2 +1,2 @@
// 1.20.1 2026-02-11T09:35:00.8798931 szar/Tags for minecraft:item
// 1.20.1 2026-02-11T16:16:44.81217 szar/Tags for minecraft:item
6995bcff12c66325bf8878f8f536d542b4b8776e data\minecraft\tags\items\music_discs.json

View File

@@ -0,0 +1,27 @@
{
"type": "minecraft:ore",
"config": {
"discard_chance_on_air_exposure": 0.0,
"size": 4,
"targets": [
{
"state": {
"Name": "szar:uranium_ore"
},
"target": {
"predicate_type": "minecraft:tag_match",
"tag": "minecraft:stone_ore_replaceables"
}
},
{
"state": {
"Name": "szar:uranium_ore"
},
"target": {
"predicate_type": "minecraft:tag_match",
"tag": "minecraft:deepslate_ore_replaceables"
}
}
]
}
}

View File

@@ -0,0 +1,27 @@
{
"feature": "szar:uranium_ore",
"placement": [
{
"type": "minecraft:count",
"count": 2
},
{
"type": "minecraft:in_square"
},
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:uniform",
"max_inclusive": {
"absolute": -58
},
"min_inclusive": {
"absolute": -63
}
}
},
{
"type": "minecraft:biome"
}
]
}

View File

@@ -0,0 +1,25 @@
package dev.tggamesyt.szar;
import net.fabricmc.fabric.api.datagen.v1.FabricDataOutput;
import net.fabricmc.fabric.api.datagen.v1.provider.FabricDynamicRegistryProvider;
import net.minecraft.registry.RegistryKeys;
import net.minecraft.registry.RegistryWrapper;
import java.util.concurrent.CompletableFuture;
public class ModWorldGenerator extends FabricDynamicRegistryProvider {
public ModWorldGenerator(FabricDataOutput output, CompletableFuture<RegistryWrapper.WrapperLookup> registriesFuture) {
super(output, registriesFuture);
}
@Override
protected void configure(RegistryWrapper.WrapperLookup registries, Entries entries) {
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.CONFIGURED_FEATURE));
entries.addAll(registries.getWrapperOrThrow(RegistryKeys.PLACED_FEATURE));
}
@Override
public String getName() {
return "World Gen";
}
}

View File

@@ -984,7 +984,7 @@ public class Szar implements ModInitializer {
List.of(
CountPlacementModifier.of(2),
SquarePlacementModifier.of(),
HeightRangePlacementModifier.uniform(YOffset.fixed(-63), YOffset.fixed(-20)),
HeightRangePlacementModifier.uniform(YOffset.fixed(-63), YOffset.fixed(-58)),
BiomePlacementModifier.of()
)
));