diff --git a/mcreator.gradle b/mcreator.gradle deleted file mode 100644 index e69de29b..00000000 diff --git a/src/main/java/net/mcreator/customoregen/CustomOreGenMod.java b/src/main/java/net/mcreator/customoregen/CustomOreGenMod.java index 28ad76ad..6a6ab9a3 100644 --- a/src/main/java/net/mcreator/customoregen/CustomOreGenMod.java +++ b/src/main/java/net/mcreator/customoregen/CustomOreGenMod.java @@ -4,17 +4,8 @@ import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; import net.neoforged.fml.ModContainer; -import net.neoforged.fml.ModLoadingContext; -import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent; -import net.neoforged.fml.util.thread.SidedThreadGroups; import net.neoforged.fml.common.Mod; -import net.neoforged.bus.api.SubscribeEvent; import net.neoforged.bus.api.IEventBus; -import net.neoforged.neoforge.event.tick.ServerTickEvent; -import net.neoforged.neoforge.common.NeoForge; - -import net.minecraft.resources.ResourceLocation; -import net.minecraft.core.registries.Registries; import net.mcreator.customoregen.init.CustomOreGenModTabs; import net.mcreator.customoregen.init.CustomOreGenModItems; @@ -31,11 +22,6 @@ import net.neoforged.neoforge.registries.NeoForgeRegistries; import net.mcreator.customoregen.loot.CustomOreLootModifier; import net.mcreator.customoregen.worldgen.WorldGenRegistration; -import java.util.concurrent.ConcurrentLinkedQueue; -import java.util.List; -import java.util.Collection; -import java.util.ArrayList; -import java.util.AbstractMap; @Mod(CustomOreGenMod.MODID) public class CustomOreGenMod { @@ -49,8 +35,6 @@ public class CustomOreGenMod { LOOT_MODIFIERS.register("custom_ore_drops", () -> CustomOreLootModifier.CODEC); // End of user code block mod constructor - NeoForge.EVENT_BUS.register(this); - CustomOreGenModBlocks.REGISTRY.register(modEventBus); CustomOreGenModItems.REGISTRY.register(modEventBus); ShardDiamondArmorMaterial.REGISTRY.register(modEventBus); @@ -67,22 +51,4 @@ public class CustomOreGenMod { // Start of user code block mod methods // End of user code block mod methods - private static final Collection> workQueue = new ConcurrentLinkedQueue<>(); - - public static void queueServerWork(int tick, Runnable action) { - if (Thread.currentThread().getThreadGroup() == SidedThreadGroups.SERVER) - workQueue.add(new AbstractMap.SimpleEntry<>(action, tick)); - } - - @SubscribeEvent - public void tick(ServerTickEvent.Post event) { - List> actions = new ArrayList<>(); - workQueue.forEach(work -> { - work.setValue(work.getValue() - 1); - if (work.getValue() == 0) - actions.add(work); - }); - actions.forEach(e -> e.getKey().run()); - workQueue.removeAll(actions); - } } diff --git a/src/main/java/net/mcreator/customoregen/config/ConfigHelper.java b/src/main/java/net/mcreator/customoregen/config/ConfigHelper.java index ab4d2491..800ed51c 100644 --- a/src/main/java/net/mcreator/customoregen/config/ConfigHelper.java +++ b/src/main/java/net/mcreator/customoregen/config/ConfigHelper.java @@ -1,13 +1,9 @@ package net.mcreator.customoregen.config; -import net.neoforged.fml.ModList; - public class ConfigHelper { // Helper method to safely access config values public static boolean isFeatureEnabled(String featureName) { switch (featureName) { - case "shardDiamondTools": - return ModConfigs.FEATURES.enableShardDiamondTools.get(); case "shardDiamondOre": return ModConfigs.FEATURES.enableShardDiamondOre.get(); case "concentratedOres": @@ -26,43 +22,4 @@ public class ConfigHelper { return true; } } - - public static int getShardDiamondToolDurability(String toolType) { - switch (toolType) { - case "pickaxe": - return ModConfigs.TOOL_STATS.shardDiamondPickaxeDurability.get(); - case "axe": - return ModConfigs.TOOL_STATS.shardDiamondAxeDurability.get(); - case "shovel": - return ModConfigs.TOOL_STATS.shardDiamondShovelDurability.get(); - default: - return 200; - } - } - - public static float getShardDiamondToolSpeed(String toolType) { - switch (toolType) { - case "pickaxe": - return ModConfigs.TOOL_STATS.shardDiamondPickaxeSpeed.get().floatValue(); - case "axe": - return ModConfigs.TOOL_STATS.shardDiamondAxeSpeed.get().floatValue(); - case "shovel": - return ModConfigs.TOOL_STATS.shardDiamondShovelSpeed.get().floatValue(); - default: - return 7.0f; - } - } - - public static int getShardDiamondToolDamage(String toolType) { - switch (toolType) { - case "pickaxe": - return ModConfigs.TOOL_STATS.shardDiamondPickaxeAttackDamage.get(); - case "axe": - return ModConfigs.TOOL_STATS.shardDiamondAxeAttackDamage.get(); - case "shovel": - return ModConfigs.TOOL_STATS.shardDiamondShovelAttackDamage.get(); - default: - return 1; - } - } } diff --git a/src/main/java/net/mcreator/customoregen/config/ModConfigs.java b/src/main/java/net/mcreator/customoregen/config/ModConfigs.java index 78efda5d..8d58d8ce 100644 --- a/src/main/java/net/mcreator/customoregen/config/ModConfigs.java +++ b/src/main/java/net/mcreator/customoregen/config/ModConfigs.java @@ -104,9 +104,6 @@ public class ModConfigs { shardDiamondArmorToughness = builder .comment("Toughness of Shard Diamond Armor (default: 1.0)") .defineInRange("armorToughness", 1.0, 0.0, 10.0); - shardDiamondArmorKnockbackResistance = builder - .comment("Knockback resistance of Shard Diamond Armor (default: 0.0)") - .defineInRange("armorKnockbackResistance", 0.0, 0.0, 1.0); builder.pop(); builder.pop(); @@ -117,7 +114,6 @@ public class ModConfigs { public final ModConfigSpec.ConfigValue shardDiamondLeggingsDurability; public final ModConfigSpec.ConfigValue shardDiamondBootsDurability; public final ModConfigSpec.DoubleValue shardDiamondArmorToughness; - public final ModConfigSpec.DoubleValue shardDiamondArmorKnockbackResistance; } // Configuration pour les drops des minerais @@ -142,9 +138,6 @@ public class ModConfigs { public final ModConfigSpec.ConfigValue impureIronOreMaxDrops; public final ModConfigSpec.BooleanValue impureIronOreEnableFortune; - public final ModConfigSpec.ConfigValue impureGoldOreMinDrops; - public final ModConfigSpec.ConfigValue impureGoldOreMaxDrops; - public final ModConfigSpec.ConfigValue lapisOreMinDrops; public final ModConfigSpec.ConfigValue lapisOreMaxDrops; public final ModConfigSpec.BooleanValue lapisOreEnableFortune; @@ -160,9 +153,6 @@ public class ModConfigs { public final ModConfigSpec.ConfigValue copperOreMaxDrops; public final ModConfigSpec.BooleanValue copperOreEnableFortune; - public final ModConfigSpec.ConfigValue oreExperienceDrops; - - public DropsConfig(ModConfigSpec.Builder builder) { builder.push("drops"); @@ -224,12 +214,6 @@ public class ModConfigs { impureIronOreEnableFortune = builder .comment("Enable Fortune enchantment on Iron Ore (default: false) - vanilla iron/gold ores ignore Fortune") .define("enableFortune", false); - impureGoldOreMinDrops = builder - .comment("Minimum raw gold dropped by Impure Gold Ore (default: 1)") - .defineInRange("goldMinDrops", 1, 0, 64); - impureGoldOreMaxDrops = builder - .comment("Maximum raw gold dropped by Impure Gold Ore (default: 1)") - .defineInRange("goldMaxDrops", 1, 0, 64); builder.pop(); builder.push("vanilla_ore_variants"); @@ -267,19 +251,11 @@ public class ModConfigs { .comment("Enable Fortune enchantment on Copper Ore (default: true) - vanilla equivalent") .define("enableFortune", true); builder.pop(); - - oreExperienceDrops = builder - - .comment("Experience dropped when mining custom ores (default: 2)") - .defineInRange("oreExperience", 2, 0, 100); - - builder.pop(); } } // Configuration pour activer/désactiver les fonctionnalités public static class FeatureToggleConfig { - public final ModConfigSpec.ConfigValue enableShardDiamondTools; public final ModConfigSpec.ConfigValue enableShardDiamondOre; public final ModConfigSpec.ConfigValue enableConcentratedOres; public final ModConfigSpec.ConfigValue enableImpureOres; @@ -291,9 +267,6 @@ public class ModConfigs { public FeatureToggleConfig(ModConfigSpec.Builder builder) { builder.push("features"); - enableShardDiamondTools = builder - .comment("Enable Shard Diamond Tools (default: true)") - .define("enableShardDiamondTools", true); enableShardDiamondOre = builder .comment("Enable Shard Diamond Ore generation (default: true)") .define("enableShardDiamondOre", true); diff --git a/src/main/java/net/mcreator/customoregen/loot/CustomOreLootModifier.java b/src/main/java/net/mcreator/customoregen/loot/CustomOreLootModifier.java index b7fde16f..cd64e59e 100644 --- a/src/main/java/net/mcreator/customoregen/loot/CustomOreLootModifier.java +++ b/src/main/java/net/mcreator/customoregen/loot/CustomOreLootModifier.java @@ -14,7 +14,6 @@ import net.minecraft.world.level.storage.loot.predicates.LootItemCondition; import net.neoforged.neoforge.common.loot.IGlobalLootModifier; import net.neoforged.neoforge.common.loot.LootModifier; import net.minecraft.core.registries.Registries; -import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraft.world.item.enchantment.Enchantments; import net.mcreator.customoregen.init.CustomOreGenModBlocks; diff --git a/src/main/java/net/mcreator/customoregen/procedures/ConfigurableOreDropsProcedure.java b/src/main/java/net/mcreator/customoregen/procedures/ConfigurableOreDropsProcedure.java index 8e51df4b..bbc89aaa 100644 --- a/src/main/java/net/mcreator/customoregen/procedures/ConfigurableOreDropsProcedure.java +++ b/src/main/java/net/mcreator/customoregen/procedures/ConfigurableOreDropsProcedure.java @@ -2,173 +2,41 @@ package net.mcreator.customoregen.procedures; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraft.world.item.enchantment.Enchantments; -import net.minecraft.world.item.enchantment.Enchantment; -import net.minecraft.core.Holder; -import net.minecraft.core.RegistryAccess; import net.minecraft.core.registries.Registries; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.player.Player; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.level.Level; -import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.block.Blocks; -import net.minecraft.world.item.Items; -import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.entity.ExperienceOrb; -import net.mcreator.customoregen.config.ModConfigs; -import net.mcreator.customoregen.init.CustomOreGenModItems; - import java.util.Random; +/** + * Handles the experience dropped when a player mines one of the mod's ores. + * + *

Item drops are handled separately by {@code CustomOreLootModifier} (a Global Loot + * Modifier) so machines (Create drills, Mekanism Digital Miner, ...) also get them. + * This procedure only spawns the XP orb, mirroring vanilla 1.21: no XP when the block + * is harvested with Silk Touch, and no XP for non-player breakers.

+ */ public class ConfigurableOreDropsProcedure { public static void execute(LevelAccessor world, double x, double y, double z, Entity entity, String oreType) { if (world.isClientSide()) return; + if (!(entity instanceof Player player)) + return; - Random random = new Random(); - int fortuneLevel = 0; - boolean silkTouch = false; - - // Get fortune and silk touch from the tool if mining by player - if (entity instanceof Player) { - Player player = (Player) entity; - ItemStack mainHandItem = player.getMainHandItem(); - // 1.21: Enchantment API changed - use getAllEnchantments with registry lookup - var enchantmentRegistry = world.registryAccess().lookupOrThrow(Registries.ENCHANTMENT); - for (Holder enchantment : mainHandItem.getAllEnchantments(enchantmentRegistry).keySet()) { - if (enchantment.is(Enchantments.FORTUNE)) { - fortuneLevel = mainHandItem.getAllEnchantments(enchantmentRegistry).getLevel(enchantment); - } - if (enchantment.is(Enchantments.SILK_TOUCH)) { - silkTouch = mainHandItem.getAllEnchantments(enchantmentRegistry).getLevel(enchantment) > 0; - } - } + // Silk Touch: vanilla ores drop no XP when silk-touched + ItemStack tool = player.getMainHandItem(); + var enchantmentRegistry = world.registryAccess().lookupOrThrow(Registries.ENCHANTMENT); + if (tool.getEnchantmentLevel(enchantmentRegistry.getOrThrow(Enchantments.SILK_TOUCH)) > 0) { + return; } - // If silk touch, drop the block itself and return - if (silkTouch) { - return; // Let vanilla handle silk touch - } - - int minDrops = 1; - int maxDrops = 2; - boolean enableFortune = true; - ItemStack dropItem = ItemStack.EMPTY; - - // Configure drops based on ore type - switch (oreType) { - case "shard_diamond": - minDrops = ModConfigs.DROPS.shardDiamondOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.shardDiamondOreMaxDrops.get(); - enableFortune = ModConfigs.DROPS.shardDiamondOreEnableFortune.get(); - dropItem = new ItemStack(CustomOreGenModItems.DIAMONDSHARD.get()); - break; - - case "concentrated_diamond": - minDrops = ModConfigs.DROPS.concentratedDiamondOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.concentratedDiamondOreMaxDrops.get(); - enableFortune = ModConfigs.DROPS.concentratedDiamondOreEnableFortune.get(); - dropItem = new ItemStack(Items.DIAMOND); - break; - - case "concentrated_coal": - minDrops = ModConfigs.DROPS.concentratedCoalOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.concentratedCoalOreMaxDrops.get(); - enableFortune = ModConfigs.DROPS.concentratedCoalOreEnableFortune.get(); - dropItem = new ItemStack(Items.COAL); - break; - - case "pure_golden": - minDrops = ModConfigs.DROPS.pureGoldenOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.pureGoldenOreMaxDrops.get(); - enableFortune = ModConfigs.DROPS.pureGoldenOreEnableFortune.get(); - dropItem = new ItemStack(Items.RAW_GOLD); - break; - - case "impure_iron": - minDrops = ModConfigs.DROPS.impureIronOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.impureIronOreMaxDrops.get(); - enableFortune = ModConfigs.DROPS.impureIronOreEnableFortune.get(); - dropItem = new ItemStack(Items.RAW_IRON); - break; - - case "impure_gold": - minDrops = ModConfigs.DROPS.impureGoldOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.impureGoldOreMaxDrops.get(); - dropItem = new ItemStack(Items.RAW_GOLD); - break; - - case "lapis": - minDrops = ModConfigs.DROPS.lapisOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.lapisOreMaxDrops.get(); - enableFortune = ModConfigs.DROPS.lapisOreEnableFortune.get(); - dropItem = new ItemStack(Items.LAPIS_LAZULI); - break; - - case "redstone": - minDrops = ModConfigs.DROPS.redstoneOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.redstoneOreMaxDrops.get(); - enableFortune = ModConfigs.DROPS.redstoneOreEnableFortune.get(); - dropItem = new ItemStack(Items.REDSTONE); - break; - - case "emerald": - minDrops = ModConfigs.DROPS.emeraldOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.emeraldOreMaxDrops.get(); - dropItem = new ItemStack(Items.EMERALD); - break; - - case "copper": - minDrops = ModConfigs.DROPS.copperOreMinDrops.get(); - maxDrops = ModConfigs.DROPS.copperOreMaxDrops.get(); - enableFortune = ModConfigs.DROPS.copperOreEnableFortune.get(); - dropItem = new ItemStack(Items.RAW_COPPER); - break; - - default: - - return; - } - - // Calculate base drops + fortune (pure math, unit-tested via OreDropMath) - int dropCount = OreDropMath.dropCount(oreType, minDrops, maxDrops, enableFortune, fortuneLevel, random); - - /* - // ITEM DROPS ARE NOW HANDLED BY CustomLootModifier TO SUPPORT MACHINES (like Mekanism Digital Miner) - // This avoids duplicate drops for players and ensures machines get drops. - if (!dropItem.isEmpty() && dropCount > 0) { - dropItem.setCount(dropCount); - if (world instanceof ServerLevel) { - ItemEntity itemEntity = new ItemEntity( - (ServerLevel) world, - x + 0.5, y + 0.5, z + 0.5, - dropItem - ); - itemEntity.setDefaultPickUpDelay(); - ((ServerLevel) world).addFreshEntity(itemEntity); - } - } - */ - - // Drop experience based on ore type (Vanilla 1.21 values, pure math in OreDropMath) - int expAmount = 0; - if (entity instanceof Player) { - expAmount = OreDropMath.experienceFor(oreType, random); - - if (expAmount > 0 && world instanceof ServerLevel) { - ExperienceOrb expOrb = new ExperienceOrb( - (ServerLevel) world, - x + 0.5, y + 0.5, z + 0.5, - expAmount - ); - ((ServerLevel) world).addFreshEntity(expOrb); - } + int expAmount = OreDropMath.experienceFor(oreType, new Random()); + if (expAmount > 0 && world instanceof ServerLevel serverLevel) { + serverLevel.addFreshEntity(new ExperienceOrb(serverLevel, x + 0.5, y + 0.5, z + 0.5, expAmount)); } } } diff --git a/src/main/java/net/mcreator/customoregen/procedures/OreexperienceProcedure.java b/src/main/java/net/mcreator/customoregen/procedures/OreexperienceProcedure.java deleted file mode 100644 index dd5a432b..00000000 --- a/src/main/java/net/mcreator/customoregen/procedures/OreexperienceProcedure.java +++ /dev/null @@ -1,40 +0,0 @@ -package net.mcreator.customoregen.procedures; - -import net.minecraft.world.level.LevelAccessor; -import net.minecraft.world.item.enchantment.Enchantments; -import net.minecraft.world.item.enchantment.EnchantmentHelper; -import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.enchantment.Enchantment; -import net.minecraft.core.Holder; -import net.minecraft.core.RegistryAccess; -import net.minecraft.core.registries.Registries; -import net.minecraft.world.entity.LivingEntity; -import net.minecraft.world.entity.ExperienceOrb; -import net.minecraft.world.entity.Entity; -import net.minecraft.server.level.ServerLevel; -import net.minecraft.core.BlockPos; - -public class OreexperienceProcedure { - public static void execute(LevelAccessor world, double x, double y, double z, Entity entity) { - if (entity == null) - return; - // 1.21: Enchantment API changed - use getAllEnchantments with registry lookup - boolean hasSilkTouch = false; - if (entity instanceof LivingEntity _livEnt) { - ItemStack mainHandItem = _livEnt.getMainHandItem(); - var enchantmentRegistry = world.registryAccess().lookupOrThrow(Registries.ENCHANTMENT); - for (Holder enchantment : mainHandItem.getAllEnchantments(enchantmentRegistry).keySet()) { - if (enchantment.is(Enchantments.SILK_TOUCH)) { - hasSilkTouch = mainHandItem.getAllEnchantments(enchantmentRegistry).getLevel(enchantment) > 0; - break; - } - } - } - - if (!hasSilkTouch) { - // XP is now handled centrally in ConfigurableOreDropsProcedure to match Vanilla 1.21 values - // if (world instanceof ServerLevel _level) - // _level.addFreshEntity(new ExperienceOrb(_level, x, y, z, 2)); - } - } -} diff --git a/src/main/java/net/mcreator/customoregen/worldgen/LatitudeConfig.java b/src/main/java/net/mcreator/customoregen/worldgen/LatitudeConfig.java index dacbe6b7..8298e964 100644 --- a/src/main/java/net/mcreator/customoregen/worldgen/LatitudeConfig.java +++ b/src/main/java/net/mcreator/customoregen/worldgen/LatitudeConfig.java @@ -27,7 +27,7 @@ public final class LatitudeConfig { /** Z threshold below which is the cold zone. Negative = north. */ public static int getColdZoneZ() { try { - return net.mcreator.customoregen.config.ModConfigs.LATITUDE_ORE.coldZoneZ.get(); + return ModConfigs.LATITUDE_ORE.coldZoneZ.get(); } catch (Exception e) { return coldZoneZ; } @@ -36,18 +36,12 @@ public final class LatitudeConfig { /** Z threshold above which is the hot zone. Positive = south. */ public static int getHotZoneZ() { try { - return net.mcreator.customoregen.config.ModConfigs.LATITUDE_ORE.hotZoneZ.get(); + return ModConfigs.LATITUDE_ORE.hotZoneZ.get(); } catch (Exception e) { return hotZoneZ; } } - /** Called from the config load to update thresholds. */ - public static void update(int coldZ, int hotZ) { - coldZoneZ = coldZ; - hotZoneZ = hotZ; - } - /** Returns a human-readable description of the zone for a given Z. */ public static String zoneName(int z) { if (z < getColdZoneZ()) return "COLD"; diff --git a/src/main/resources/custom_ore_gen-common.toml b/src/main/resources/custom_ore_gen-common.toml deleted file mode 100644 index 215d0634..00000000 --- a/src/main/resources/custom_ore_gen-common.toml +++ /dev/null @@ -1,179 +0,0 @@ - -#========================== -# Custom Ore Gem - Configuration -#========================== -# Ce fichier permet de personnaliser le mod Custom Ore Gem -# Modifiez ces valeurs pour ajuster la génération des minerais, les stats des outils et plus encore! - - -#========================== -# Génération des Minerais -#========================== -[ore_generation] - - # Configuration du Minerai d'Éclats de Diamant - [ore_generation.shard_diamond_ore] - # Hauteur minimale de génération (par défaut: 0) - # Min: -64, Max: 320 - minHeight = 0 - # Hauteur maximale de génération (par défaut: 15) - # Min: -64, Max: 320 - maxHeight = 15 - # Nombre de filons par chunk (par défaut: 1) - # Min: 0, Max: 20 - veinsPerChunk = 1 - # Taille des filons (par défaut: 8) - # Min: 1, Max: 32 - veinSize = 8 - - # Configuration du Minerai de Diamant Concentré - [ore_generation.concentrated_diamond_ore] - # Nombre de filons par chunk (par défaut: 1) - veinsPerChunk = 1 - # Taille des filons (par défaut: 8) - veinSize = 8 - - # Configuration du Minerai d'Or Pur - [ore_generation.pure_golden_ore] - # Nombre de filons par chunk (par défaut: 4) - veinsPerChunk = 4 - # Hauteur minimale de génération (par défaut: 0) - minHeight = 0 - # Hauteur maximale de génération (par défaut: 256) - maxHeight = 256 - - # Configuration du Minerai de Charbon Concentré - [ore_generation.concentrated_coal_ore] - veinsPerChunk = 2 - - # Configuration des Minerais Impurs - [ore_generation.impure_ores] - # Nombre de filons de Fer Impur par chunk (par défaut: 2) - ironVeinsPerChunk = 2 - # Nombre de filons d'Or Impur par chunk (par défaut: 2) - goldVeinsPerChunk = 2 - - # Configuration des Minerais d'Émeraude - [ore_generation.emerald_ores] - # Nombre de filons de Haut Émeraude par chunk (par défaut: 1) - highVeinsPerChunk = 1 - # Nombre de filons de Bas Émeraude par chunk (par défaut: 1) - lowerVeinsPerChunk = 1 - - # Configuration des Minerais de Cuivre - [ore_generation.copper_ores] - # Nombre de filons de Haut Cuivre par chunk (par défaut: 2) - highVeinsPerChunk = 2 - # Nombre de filons de Bas Cuivre par chunk (par défaut: 2) - lowerVeinsPerChunk = 2 - - -#========================== -# Stats des Outils -#========================== -[tool_stats] - - # Configuration des Outils en Éclats de Diamant - [tool_stats.shard_diamond_tools] - # Durabilité de la Pioche (par défaut: 200) - # Min: 1, Max: 5000 - pickaxeDurability = 200 - # Vitesse de minage de la Pioche (par défaut: 7.0) - pickaxeSpeed = 7.0 - # Dégâts d'attaque de la Pioche (par défaut: 1) - pickaxeAttackDamage = 1 - - # Durabilité de la Hache (par défaut: 200) - axeDurability = 200 - # Vitesse de minage de la Hache (par défaut: 7.0) - axeSpeed = 7.0 - # Dégâts d'attaque de la Hache (par défaut: 6) - axeAttackDamage = 6 - - # Durabilité de la Pelle (par défaut: 200) - shovelDurability = 200 - # Vitesse de minage de la Pelle (par défaut: 4.0) - shovelSpeed = 4.0 - # Dégâts d'attaque de la Pelle (par défaut: 2) - shovelAttackDamage = 2 - - -#========================== -# Drops des Minerais -#========================== -[drops] - - # Configuration du Minerai d'Éclats de Diamant - [drops.shard_diamond_ore] - # Nombre minimum d'éclats droppés (par défaut: 1) - minDrops = 1 - # Nombre maximum d'éclats droppés (par défaut: 2) - maxDrops = 2 - # Activer l'enchantement Fortune (par défaut: true) - enableFortune = true - - # Configuration du Minerai de Diamant Concentré - [drops.concentrated_diamond_ore] - # Nombre minimum de diamants droppés (par défaut: 1) - minDrops = 1 - # Nombre maximum de diamants droppés (par défaut: 2) - maxDrops = 2 - # Activer l'enchantement Fortune (par défaut: true) - enableFortune = true - - # Configuration du Minerai de Charbon Concentré - [drops.concentrated_coal_ore] - # Nombre minimum de charbon droppé (par défaut: 2) - minDrops = 2 - # Nombre maximum de charbon droppé (par défaut: 4) - maxDrops = 4 - - # Configuration du Minerai d'Or Pur - [drops.pure_golden_ore] - # Nombre minimum de pépites d'or droppées (par défaut: 2) - minDrops = 2 - # Nombre maximum de pépites d'or droppées (par défaut: 4) - maxDrops = 4 - - # Configuration du Minerai de Charbon de Cendre - [drops.ash_coal_ore] - # Nombre minimum de charbon de cendre droppé (par défaut: 1) - minDrops = 1 - # Nombre maximum de charbon de cendre droppé (par défaut: 2) - maxDrops = 2 - - # Configuration des Minerais Impurs - [drops.impure_ores] - # Configuration du Fer Impur - ironMinDrops = 1 - ironMaxDrops = 2 - # Configuration de l'Or Impur - goldMinDrops = 1 - goldMaxDrops = 2 - - # Expérience droppée par les minerais personnalisés (par défaut: 2) - oreExperience = 2 - - -#========================== -# Activation des Fonctionnalités -#========================== -[features] - # Activer les Outils en Éclats de Diamant (par défaut: true) - enableShardDiamondTools = true - # Activer le Minerai d'Éclats de Diamant (par défaut: true) - enableShardDiamondOre = true - # Activer les Minerais Concentrés (Diamant, Charbon) (par défaut: true) - enableConcentratedOres = true - # Activer les Minerais Impurs (Fer, Or) (par défaut: true) - enableImpureOres = true - # Activer le Minerai de Charbon de Cendre (par défaut: true) - enableAshCoalOre = true - # Activer le Minerai d'Or Pur (par défaut: true) - enablePureGoldenOre = true - # Activer les Minerais d'Émeraude Personnalisés (Haut, Bas) (par défaut: true) - enableCustomEmeraldOres = true - # Activer les Minerais de Cuivre Personnalisés (Haut, Bas) (par défaut: true) - enableCustomCopperOres = true - # Activer les Variantes de Minerais Vanilla (Fer, Redstone, Lapis, etc.) (par défaut: true) - enableVanillaOreVariants = true diff --git a/src/main/resources/data/neoforge/loot_modifiers/global_loot_modifiers.json b/src/main/resources/data/neoforge/loot_modifiers/global_loot_modifiers.json deleted file mode 100644 index a71ad4c8..00000000 --- a/src/main/resources/data/neoforge/loot_modifiers/global_loot_modifiers.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "entries": [ - "custom_ore_gen:custom_ore_drops" - ] -} diff --git a/src/test/java/net/mcreator/customoregen/config/ModConfigsTest.java b/src/test/java/net/mcreator/customoregen/config/ModConfigsTest.java index 033f5e2a..6c23354e 100644 --- a/src/test/java/net/mcreator/customoregen/config/ModConfigsTest.java +++ b/src/test/java/net/mcreator/customoregen/config/ModConfigsTest.java @@ -104,7 +104,7 @@ class ModConfigsTest { @DisplayName("FeatureToggleConfig declares every toggle referenced by ConfigHelper") void testFeatureToggleConfig_declaresAllTogglesReferencedByConfigHelper() { String[] toggles = { - "shardDiamondTools", "shardDiamondOre", "concentratedOres", "impureOres", + "shardDiamondOre", "concentratedOres", "impureOres", "pureGoldenOre", "customEmeraldOres", "customCopperOres", "vanillaOreVariants" }; for (String toggle : toggles) {