Pala 0.1.0: portage contenu (116 items, 38 blocs, 95 recipes, 7 filons) + atlas optionalon
This commit is contained in:
@@ -10,5 +10,6 @@ public final class PalaRegistries {
|
||||
PalaItems.register();
|
||||
PalaBlocks.register();
|
||||
PalaTabs.register();
|
||||
PalaWorldgen.register();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package fr.surviepote.pala;
|
||||
|
||||
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.placement.PlacedFeature;
|
||||
|
||||
// Worldgen des minerais Pala (MC 26.3).
|
||||
//
|
||||
// Approche data-driven : les filons sont décrits en JSON datapack
|
||||
// (data/pala/worldgen/feature/*.json + placed_feature/*.json) et cette classe
|
||||
// ne fait qu'injecter les placed features dans les biomes via
|
||||
// BiomeModifications.addFeature. C'est l'approche robuste en 26.3 car :
|
||||
// - ConfiguredFeature n'existe plus (vérifié au bytecode : Feature est une
|
||||
// interface, OreFeature prend List<BlockReplacement>) ;
|
||||
// - FEATURE/PLACED_FEATURE sont des registres datapack dynamiques, pas des
|
||||
// registres statiques : tout-en-code via Registry.register est impossible.
|
||||
// - Signatures vérifiées au javap contre 26.3.jar :
|
||||
// BiomeModifications.addFeature(Predicate<BiomeSelectionContext>,
|
||||
// GenerationStep$Decoration, ResourceKey<PlacedFeature>),
|
||||
// BiomeSelectors.foundInOverworld/foundInTheEnd,
|
||||
// GenerationStep$Decoration.UNDERGROUND_ORES,
|
||||
// ResourceKey.create(ResourceKey<Registry<T>>, Identifier),
|
||||
// Identifier.fromNamespaceAndPath(String, String).
|
||||
public final class PalaWorldgen {
|
||||
|
||||
private PalaWorldgen() {
|
||||
}
|
||||
|
||||
private static ResourceKey<PlacedFeature> key(String path) {
|
||||
return ResourceKey.create(Registries.PLACED_FEATURE, Identifier.fromNamespaceAndPath("pala", path));
|
||||
}
|
||||
|
||||
private static void addOverworld(String path) {
|
||||
BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(),
|
||||
GenerationStep.Decoration.UNDERGROUND_ORES, key(path));
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
addOverworld("amethyst_ore");
|
||||
addOverworld("findium_ore");
|
||||
addOverworld("kisakay_ore");
|
||||
addOverworld("paladium_ore");
|
||||
addOverworld("paladium_green_ore");
|
||||
// Titane : Surface + End (spawnWorldTypes ["End","Surface"]).
|
||||
BiomeModifications.addFeature(
|
||||
BiomeSelectors.foundInOverworld().or(BiomeSelectors.foundInTheEnd()),
|
||||
GenerationStep.Decoration.UNDERGROUND_ORES, key("titane_ore"));
|
||||
addOverworld("trixium_ore");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 5,
|
||||
"targets": [
|
||||
{
|
||||
"state": "pala:amethyst_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:amethyst_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:amethyst_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:amethyst_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:gravel"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 3,
|
||||
"targets": [
|
||||
{
|
||||
"state": "pala:findium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:findium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:findium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:findium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:gravel"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 1,
|
||||
"targets": [
|
||||
{
|
||||
"state": "pala:kisakay_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:kisakay_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:kisakay_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:kisakay_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:gravel"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 4,
|
||||
"targets": [
|
||||
{
|
||||
"state": "pala:paladium_green_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:paladium_green_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:paladium_green_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:paladium_green_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:gravel"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 4,
|
||||
"targets": [
|
||||
{
|
||||
"state": "pala:paladium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:paladium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:paladium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:paladium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:gravel"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 4,
|
||||
"targets": [
|
||||
{
|
||||
"state": "pala:titane_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:titane_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:titane_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:titane_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:gravel"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:titane_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:end_stone"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"type": "minecraft:ore",
|
||||
"discard_chance_on_air_exposure": 0.0,
|
||||
"size": 8,
|
||||
"targets": [
|
||||
{
|
||||
"state": "pala:trixium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:stone_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:trixium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:tag_match",
|
||||
"tag": "minecraft:deepslate_ore_replaceables"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:trixium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:dirt"
|
||||
}
|
||||
},
|
||||
{
|
||||
"state": "pala:trixium_ore",
|
||||
"target": {
|
||||
"predicate_type": "minecraft:block_match",
|
||||
"block": "minecraft:gravel"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "pala:amethyst_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 5
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"min_inclusive": {
|
||||
"absolute": 1
|
||||
},
|
||||
"max_inclusive": {
|
||||
"absolute": 25
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "pala:findium_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 5
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"min_inclusive": {
|
||||
"absolute": 1
|
||||
},
|
||||
"max_inclusive": {
|
||||
"absolute": 33
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "pala:kisakay_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"min_inclusive": {
|
||||
"absolute": 1
|
||||
},
|
||||
"max_inclusive": {
|
||||
"absolute": 16
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "pala:paladium_green_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 4
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"min_inclusive": {
|
||||
"absolute": 1
|
||||
},
|
||||
"max_inclusive": {
|
||||
"absolute": 18
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "pala:paladium_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 3
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"min_inclusive": {
|
||||
"absolute": 1
|
||||
},
|
||||
"max_inclusive": {
|
||||
"absolute": 18
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "pala:titane_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 6
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"min_inclusive": {
|
||||
"absolute": 1
|
||||
},
|
||||
"max_inclusive": {
|
||||
"absolute": 19
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"feature": "pala:trixium_ore",
|
||||
"placement": [
|
||||
{
|
||||
"type": "minecraft:count",
|
||||
"count": 3
|
||||
},
|
||||
{
|
||||
"type": "minecraft:in_square"
|
||||
},
|
||||
{
|
||||
"type": "minecraft:height_range",
|
||||
"height": {
|
||||
"type": "minecraft:uniform",
|
||||
"min_inclusive": {
|
||||
"absolute": 1
|
||||
},
|
||||
"max_inclusive": {
|
||||
"absolute": 25
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "minecraft:biome"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user