feat: Version 2.1.7 - Mekanism Compatibility & Ore Rebalance

- Added Forge tags (forge:ores/*) for all ores

- Added Shik Mekanism Enrichment recipe for Shard Diamond

- Rebalanced Lapis (0-32, 2x) and Diamond (Deepslate 6x) to match Vanilla

- Reduced Shard Diamond vein sizes for rarity

- Updated Biome Scanner & /ores to display Y-levels

- Fixed Shard Diamond Boots crafting recipe
This commit is contained in:
feldenr
2026-01-22 22:20:48 +01:00
parent 8699a36294
commit d64792d3d3
14168 changed files with 594967 additions and 157 deletions
@@ -20,72 +20,72 @@ import java.util.*;
public class OresCommand {
// Tags personnalisés du mod
private static final TagKey<Biome> COLD_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "cold_biomes"));
private static final TagKey<Biome> HOT_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "hot_biomes"));
private static final TagKey<Biome> MOUNTAIN_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "mountain_biomes"));
private static final TagKey<Biome> TEMPERED_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "tempered_biomes"));
private static final TagKey<Biome> RARE_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "rare_biomes"));
private static final TagKey<Biome> COLD_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "cold_biomes"));
private static final TagKey<Biome> HOT_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "hot_biomes"));
private static final TagKey<Biome> MOUNTAIN_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "mountain_biomes"));
private static final TagKey<Biome> TEMPERED_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "tempered_biomes"));
private static final TagKey<Biome> RARE_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "rare_biomes"));
// Minerais par catégorie (mappé avec les biome modifiers)
private static final List<String> COLD_ORES = Arrays.asList(
"Lapis (stone)",
"Lapis (deepslate)",
"Diamant Concentre"
);
"Lapis (stone) [Y: 0 à 32]",
"Lapis (deepslate) [Y: -64 à 0]",
"Diamant (deepslate) [Y: -64 à 0]");
private static final List<String> HOT_ORES = Arrays.asList(
"Or Pur (stone)",
"Or Pur (deepslate)",
"Redstone (stone)",
"Redstone (deepslate)",
"Cuivre (haut)",
"Cuivre (bas)"
);
"Or Pur (stone) [Y: 0 à 256]",
"Or Pur (deepslate) [Y: -64 à 0]",
"Redstone (stone) [Y: -10 à 20]",
"Redstone (deepslate) [Y: -80 à -30]",
"Cuivre (haut) [Y: 15 à 256]",
"Cuivre (bas) [Y: -64 à 0]");
private static final List<String> MOUNTAIN_ORES = Arrays.asList(
"Emeraude (haute altitude)"
);
"Emeraude (haute altitude) [Y: 0 à 64]");
private static final List<String> TEMPERED_ORES = Arrays.asList(
"Charbon Concentre",
"Fer (stone)",
"Fer (deepslate)"
);
"Charbon Concentre [Y: 0 à 70]",
"Fer (stone) [Y: 0 à 100]",
"Fer (deepslate) [Y: -64 à 0]");
private static final List<String> RARE_ORES = Arrays.asList(
"Emeraude (basse altitude)"
);
"Emeraude (basse altitude) [Y: -64 à 0]");
private static final List<String> EVERYWHERE_ORES = Arrays.asList(
"Diamant Shard (deepslate)",
"Bloc Diamant Shard"
);
"Diamant Shard (deepslate) [Y: -64 à -40]",
"Bloc Diamant Shard [Y: 0 à 15]");
@SubscribeEvent
public static void onRegisterCommands(RegisterCommandsEvent event) {
CommandDispatcher<CommandSourceStack> dispatcher = event.getDispatcher();
dispatcher.register(Commands.literal("ores")
.executes(OresCommand::executeOres)
);
.executes(OresCommand::executeOres));
dispatcher.register(Commands.literal("ore")
.executes(OresCommand::executeOres)
);
.executes(OresCommand::executeOres));
}
private static int executeOres(CommandContext<CommandSourceStack> context) {
if (!(context.getSource().getEntity() instanceof net.minecraft.world.entity.player.Player)) {
context.getSource().sendFailure(Component.literal("Cette commande ne peut etre utilisee que par un joueur"));
context.getSource()
.sendFailure(Component.literal("Cette commande ne peut etre utilisee que par un joueur"));
return 0;
}
net.minecraft.world.entity.player.Player player = (net.minecraft.world.entity.player.Player) context.getSource().getEntity();
net.minecraft.world.entity.player.Player player = (net.minecraft.world.entity.player.Player) context.getSource()
.getEntity();
net.minecraft.world.level.Level level = player.level();
net.minecraft.core.BlockPos pos = player.blockPosition();
var biomeHolder = level.getBiome(pos);
ResourceKey<Biome> biomeKey = biomeHolder.unwrapKey().orElse(ResourceKey.create(Registries.BIOME, new ResourceLocation("minecraft:plains")));
ResourceKey<Biome> biomeKey = biomeHolder.unwrapKey()
.orElse(ResourceKey.create(Registries.BIOME, new ResourceLocation("minecraft:plains")));
ResourceLocation biomeId = biomeKey.location();
String biomeName = biomeId.getPath();
@@ -123,7 +123,8 @@ public class OresCommand {
// Afficher les tags trouvés
if (!foundTags.isEmpty()) {
context.getSource().sendSuccess(() -> Component.literal("Tags du mod: " + String.join(", ", foundTags)), true);
context.getSource().sendSuccess(() -> Component.literal("Tags du mod: " + String.join(", ", foundTags)),
true);
} else {
context.getSource().sendSuccess(() -> Component.literal("Tags du mod: aucun"), true);
}
@@ -142,7 +143,8 @@ public class OresCommand {
return 1;
}
private static boolean isBiomeInTag(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos, TagKey<Biome> tag) {
private static boolean isBiomeInTag(net.minecraft.world.level.Level level, net.minecraft.core.BlockPos pos,
TagKey<Biome> tag) {
return level.getBiome(pos).is(tag);
}
}
@@ -19,46 +19,45 @@ import java.util.*;
public class OreBiomeFinderItem extends Item {
// Tags personnalisés du mod
private static final TagKey<Biome> COLD_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "cold_biomes"));
private static final TagKey<Biome> HOT_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "hot_biomes"));
private static final TagKey<Biome> MOUNTAIN_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "mountain_biomes"));
private static final TagKey<Biome> TEMPERED_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "tempered_biomes"));
private static final TagKey<Biome> RARE_BIOMES_TAG = TagKey.create(Registries.BIOME, new ResourceLocation("custom_ore_gen", "rare_biomes"));
private static final TagKey<Biome> COLD_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "cold_biomes"));
private static final TagKey<Biome> HOT_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "hot_biomes"));
private static final TagKey<Biome> MOUNTAIN_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "mountain_biomes"));
private static final TagKey<Biome> TEMPERED_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "tempered_biomes"));
private static final TagKey<Biome> RARE_BIOMES_TAG = TagKey.create(Registries.BIOME,
new ResourceLocation("custom_ore_gen", "rare_biomes"));
// Minerais par catégorie
private static final List<String> COLD_ORES = Arrays.asList(
"Lapis (stone)",
"Lapis (deepslate)",
"Diamant Concentre"
);
"Lapis (stone) [Y: 0 à 32]",
"Lapis (deepslate) [Y: -64 à 0]",
"Diamant (deepslate) [Y: -64 à 0]");
private static final List<String> HOT_ORES = Arrays.asList(
"Or Pur (stone)",
"Or Pur (deepslate)",
"Redstone (stone)",
"Redstone (deepslate)",
"Cuivre (haut)",
"Cuivre (bas)"
);
"Or Pur (stone) [Y: 0 à 256]",
"Or Pur (deepslate) [Y: -64 à 0]",
"Redstone (stone) [Y: -10 à 20]",
"Redstone (deepslate) [Y: -80 à -30]",
"Cuivre (haut) [Y: 15 à 256]",
"Cuivre (bas) [Y: -64 à 0]");
private static final List<String> MOUNTAIN_ORES = Arrays.asList(
"Emeraude (haute altitude)"
);
"Emeraude (haute altitude) [Y: 0 à 64]");
private static final List<String> TEMPERED_ORES = Arrays.asList(
"Charbon Concentre",
"Fer (stone)",
"Fer (deepslate)"
);
"Charbon Concentre [Y: 0 à 70]",
"Fer (stone) [Y: 0 à 100]",
"Fer (deepslate) [Y: -64 à 0]");
private static final List<String> RARE_ORES = Arrays.asList(
"Emeraude (basse altitude)"
);
"Emeraude (basse altitude) [Y: -64 à 0]");
private static final List<String> EVERYWHERE_ORES = Arrays.asList(
"Diamant Shard (deepslate)",
"Bloc Diamant Shard"
);
"Diamant Shard (deepslate) [Y: -64 à -40]",
"Bloc Diamant Shard [Y: 0 à 15]");
public OreBiomeFinderItem() {
super(new Item.Properties().stacksTo(1));
@@ -71,7 +70,8 @@ public class OreBiomeFinderItem extends Item {
if (!level.isClientSide) {
BlockPos pos = player.blockPosition();
var biomeHolder = level.getBiome(pos);
ResourceKey<Biome> biomeKey = biomeHolder.unwrapKey().orElse(ResourceKey.create(Registries.BIOME, new ResourceLocation("minecraft:plains")));
ResourceKey<Biome> biomeKey = biomeHolder.unwrapKey()
.orElse(ResourceKey.create(Registries.BIOME, new ResourceLocation("minecraft:plains")));
ResourceLocation biomeId = biomeKey.location();
String biomeName = biomeId.getPath();
@@ -2,8 +2,7 @@
"type": "minecraft:crafting_shaped",
"category": "equipment",
"pattern": [
" ",
"aaa",
"a a",
"a a"
],
"key": {
@@ -15,4 +14,4 @@
"item": "custom_ore_gen:sharddiamondboots",
"count": 1
}
}
}
@@ -1,7 +1,7 @@
{
"type": "minecraft:ore",
"config": {
"size": 9,
"size": 8,
"discard_chance_on_air_exposure": 0,
"targets": [
{
@@ -1,7 +1,7 @@
{
"type": "minecraft:ore",
"config": {
"size": 8,
"size": 7,
"discard_chance_on_air_exposure": 0,
"targets": [
{
@@ -1,7 +1,7 @@
{
"type": "minecraft:ore",
"config": {
"size": 16,
"size": 6,
"discard_chance_on_air_exposure": 0,
"targets": [
{
@@ -1,7 +1,7 @@
{
"type": "minecraft:ore",
"config": {
"size": 8,
"size": 7,
"discard_chance_on_air_exposure": 0,
"targets": [
{
@@ -1,7 +1,7 @@
{
"type": "minecraft:ore",
"config": {
"size": 8,
"size": 4,
"discard_chance_on_air_exposure": 0,
"targets": [
{
@@ -3,7 +3,7 @@
"placement": [
{
"type": "minecraft:count",
"count": 1
"count": 6
},
{
"type": "minecraft:in_square"
@@ -11,9 +11,9 @@
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:trapezoid",
"type": "minecraft:uniform",
"min_inclusive": {
"absolute": -90
"absolute": -64
},
"max_inclusive": {
"absolute": 0
@@ -3,7 +3,7 @@
"placement": [
{
"type": "minecraft:count",
"count": 10
"count": 2
},
{
"type": "minecraft:in_square"
@@ -13,10 +13,10 @@
"height": {
"type": "minecraft:uniform",
"min_inclusive": {
"absolute": -20
"absolute": -64
},
"max_inclusive": {
"absolute": 10
"absolute": 0
}
}
},
@@ -11,12 +11,12 @@
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:trapezoid",
"type": "minecraft:uniform",
"min_inclusive": {
"absolute": -70
"absolute": -64
},
"max_inclusive": {
"absolute": -35
"absolute": -40
}
}
},
@@ -11,12 +11,12 @@
{
"type": "minecraft:height_range",
"height": {
"type": "minecraft:trapezoid",
"type": "minecraft:uniform",
"min_inclusive": {
"absolute": -10
"absolute": 0
},
"max_inclusive": {
"absolute": 20
"absolute": 32
}
}
},
@@ -0,0 +1,14 @@
{
"replace": false,
"values": [
"#forge:ores/iron",
"#forge:ores/gold",
"#forge:ores/diamond",
"#forge:ores/emerald",
"#forge:ores/copper",
"#forge:ores/lapis",
"#forge:ores/redstone",
"#forge:ores/coal",
"#forge:ores/shard_diamond"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"custom_ore_gen:concentratedcoalore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:copperhighore",
"custom_ore_gen:copperlowerore"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"custom_ore_gen:deepslatediamondore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:highemeraldore",
"custom_ore_gen:loweremeraldore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:puregoldenore",
"custom_ore_gen:deepslatepuregoldenore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:ironore",
"custom_ore_gen:deepslateironore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:lapisore",
"custom_ore_gen:deepslatelapisore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:redstoneore",
"custom_ore_gen:deepslateredstoneore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:sharddiamondblockore",
"custom_ore_gen:deepslatesharddiamondore"
]
}
@@ -0,0 +1,14 @@
{
"replace": false,
"values": [
"#forge:ores/iron",
"#forge:ores/gold",
"#forge:ores/diamond",
"#forge:ores/emerald",
"#forge:ores/copper",
"#forge:ores/lapis",
"#forge:ores/redstone",
"#forge:ores/coal",
"#forge:ores/shard_diamond"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"custom_ore_gen:concentratedcoalore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:copperhighore",
"custom_ore_gen:copperlowerore"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"custom_ore_gen:deepslatediamondore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:highemeraldore",
"custom_ore_gen:loweremeraldore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:puregoldenore",
"custom_ore_gen:deepslatepuregoldenore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:ironore",
"custom_ore_gen:deepslateironore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:lapisore",
"custom_ore_gen:deepslatelapisore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:redstoneore",
"custom_ore_gen:deepslateredstoneore"
]
}
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"custom_ore_gen:sharddiamondblockore",
"custom_ore_gen:deepslatesharddiamondore"
]
}
@@ -0,0 +1,12 @@
{
"type": "mekanism:enriching",
"input": {
"ingredient": {
"tag": "forge:ores/shard_diamond"
}
},
"output": {
"item": "custom_ore_gen:diamondshard",
"count": 2
}
}