feat: replace event-based drops with Global Loot Modifier (fix Create drill crash)

- Add CustomOreLootModifier (Global Loot Modifier) handling all ore drops,
  ensuring compatibility with machines (Create drill/contraptions) and avoiding
  duplication. Handles silk touch (vanilla block / shard diamond block) and
  fortune via config-driven min/max drops.
- Register GLM serializer via DeferredRegister in CustomOreGenMod (user code block)
- Rewrite OreBreakEventHandler: remove direct drops mutation that caused
  UnsupportedOperationException on immutable list when broken by Create drill.
  Drops are now fully GLM-driven; handler only triggers XP/procedure logic.
- Migrate loot tables from loot_table/ (singular, 1.20) to loot_tables/
  (plural, NeoForge 1.21 format) for all 16 ore blocks.
- Declare GLM in data/neoforge/loot_modifiers/global_loot_modifiers.json
- Add Create crushing + milling recipes for diamond -> diamond shards
- Config tweaks: tool durabilities (pickaxe/axe/shovel 450, paxel 800),
  Pure Golden Ore maxHeight 256 -> 320
- Refresh shard diamond armor/item textures
- Simplify unit tests for new drop system
This commit is contained in:
feldenr
2026-06-14 11:08:59 +02:00
parent 3ef6f03244
commit 74480d9d2c
58 changed files with 678 additions and 1238 deletions
@@ -24,6 +24,12 @@ import net.mcreator.customoregen.config.ModConfigs;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.neoforge.common.loot.IGlobalLootModifier;
import com.mojang.serialization.MapCodec;
import net.neoforged.neoforge.registries.DeferredRegister;
import net.neoforged.neoforge.registries.NeoForgeRegistries;
import net.mcreator.customoregen.loot.CustomOreLootModifier;
import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.List;
import java.util.Collection;
@@ -34,20 +40,22 @@ import java.util.AbstractMap;
public class CustomOreGenMod {
public static final Logger LOGGER = LogManager.getLogger(CustomOreGenMod.class);
public static final String MODID = "custom_ore_gen";
public static final DeferredRegister<MapCodec<? extends IGlobalLootModifier>> LOOT_MODIFIERS = DeferredRegister.create(NeoForgeRegistries.Keys.GLOBAL_LOOT_MODIFIER_SERIALIZERS, MODID);
public CustomOreGenMod(IEventBus modEventBus, ModContainer container) {
// Start of user code block mod constructor
container.registerConfig(ModConfig.Type.COMMON, ModConfigs.SPEC);
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);
CustomOreGenModTabs.REGISTRY.register(modEventBus);
LOOT_MODIFIERS.register(modEventBus);
// Start of user code block mod init
// End of user code block mod init
@@ -87,8 +87,8 @@ public class ModConfigs {
.comment("Minimum height for Pure Golden Ore generation (default: 0)")
.defineInRange("minHeight", 0, -64, 320);
pureGoldenOreMaxHeight = builder
.comment("Maximum height for Pure Golden Ore generation (default: 256)")
.defineInRange("maxHeight", 256, -64, 320);
.comment("Maximum height for Pure Golden Ore generation (default: 320)")
.defineInRange("maxHeight", 320, -64, 320);
builder.pop();
builder.push("concentrated_coal_ore");
@@ -150,8 +150,8 @@ public class ModConfigs {
builder.push("shard_diamond_tools");
shardDiamondPickaxeDurability = builder
.comment("Durability of Shard Diamond Pickaxe (default: 200)")
.defineInRange("pickaxeDurability", 200, 1, 5000);
.comment("Durability of Shard Diamond Pickaxe (default: 450)")
.defineInRange("pickaxeDurability", 450, 1, 5000);
shardDiamondPickaxeSpeed = builder
.comment("Mining speed of Shard Diamond Pickaxe (default: 7.0)")
.defineInRange("pickaxeSpeed", 7.0, 0.1, 20.0);
@@ -160,8 +160,8 @@ public class ModConfigs {
.defineInRange("pickaxeAttackDamage", 1, 0, 20);
shardDiamondAxeDurability = builder
.comment("Durability of Shard Diamond Axe (default: 200)")
.defineInRange("axeDurability", 200, 1, 5000);
.comment("Durability of Shard Diamond Axe (default: 450)")
.defineInRange("axeDurability", 450, 1, 5000);
shardDiamondAxeSpeed = builder
.comment("Mining speed of Shard Diamond Axe (default: 7.0)")
.defineInRange("axeSpeed", 7.0, 0.1, 20.0);
@@ -170,8 +170,8 @@ public class ModConfigs {
.defineInRange("axeAttackDamage", 6, 0, 20);
shardDiamondShovelDurability = builder
.comment("Durability of Shard Diamond Shovel (default: 200)")
.defineInRange("shovelDurability", 200, 1, 5000);
.comment("Durability of Shard Diamond Shovel (default: 450)")
.defineInRange("shovelDurability", 450, 1, 5000);
shardDiamondShovelSpeed = builder
.comment("Mining speed of Shard Diamond Shovel (default: 4.0)")
.defineInRange("shovelSpeed", 4.0, 0.1, 20.0);
@@ -180,8 +180,8 @@ public class ModConfigs {
.defineInRange("shovelAttackDamage", 2, 0, 20);
shardDiamondPaxelDurability = builder
.comment("Durability of Shard Diamond Paxel (default: 1000)")
.defineInRange("paxelDurability", 1000, 1, 5000);
.comment("Durability of Shard Diamond Paxel (default: 800)")
.defineInRange("paxelDurability", 800, 1, 5000);
shardDiamondPaxelSpeed = builder
.comment("Mining speed of Shard Diamond Paxel (default: 6.5)")
.defineInRange("paxelSpeed", 6.5, 0.1, 20.0);
@@ -1,52 +1,43 @@
package net.mcreator.customoregen.event;
import net.neoforged.neoforge.event.level.BlockEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.event.level.BlockDropsEvent;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.entity.player.Player;
import net.mcreator.customoregen.procedures.ConfigurableOreDropsProcedure;
import net.mcreator.customoregen.init.CustomOreGenModBlocks;
import net.mcreator.customoregen.CustomOreGenMod;
import net.mcreator.customoregen.procedures.ConfigurableOreDropsProcedure;
@EventBusSubscriber(modid = CustomOreGenMod.MODID)
@EventBusSubscriber
public class OreBreakEventHandler {
@SubscribeEvent
public static void onBlockBreak(BlockEvent.BreakEvent event) {
public static void onBlockDrops(BlockDropsEvent event) {
BlockState state = event.getState();
Block block = state.getBlock();
Player player = event.getPlayer();
String oreType = null;
if (block == CustomOreGenModBlocks.SHARDDIAMONDBLOCKORE.get() || block == CustomOreGenModBlocks.DEEPSLATESHARDDIAMONDORE.get()) {
oreType = "shard_diamond";
} else if (block == CustomOreGenModBlocks.CONCENTRATEDCOALORE.get()) {
oreType = "concentrated_coal";
} else if (block == CustomOreGenModBlocks.PUREGOLDENORE.get() || block == CustomOreGenModBlocks.DEEPSLATEPUREGOLDENORE.get()) {
oreType = "pure_golden";
} else if (block == CustomOreGenModBlocks.IRONORE.get() || block == CustomOreGenModBlocks.DEEPSLATEIRONORE.get()) {
oreType = "impure_iron";
} else if (block == CustomOreGenModBlocks.DEEPSLATEDIAMONDORE.get()) {
oreType = "concentrated_diamond";
} else if (block == CustomOreGenModBlocks.LAPISORE.get() || block == CustomOreGenModBlocks.DEEPSLATELAPISORE.get()) {
oreType = "lapis";
} else if (block == CustomOreGenModBlocks.REDSTONEORE.get() || block == CustomOreGenModBlocks.DEEPSLATEREDSTONEORE.get()) {
oreType = "redstone";
} else if (block == CustomOreGenModBlocks.HIGHEMERALDORE.get() || block == CustomOreGenModBlocks.LOWEREMERALDORE.get()) {
oreType = "emerald";
} else if (block == CustomOreGenModBlocks.COPPERHIGHORE.get() || block == CustomOreGenModBlocks.COPPERLOWERORE.get()) {
oreType = "copper";
}
String oreType = getOreType(block);
if (oreType != null) {
// Ensure the player is using the correct tool to get drops
if (player != null && player.hasCorrectToolForDrops(state)) {
ConfigurableOreDropsProcedure.execute(event.getLevel(), event.getPos().getX(), event.getPos().getY(), event.getPos().getZ(), player, oreType);
// Item drops are now handled by CustomOreLootModifier (Global Loot Modifier)
// to ensure compatibility with machines and avoid duplication.
if (event.getBreaker() != null) {
ConfigurableOreDropsProcedure.execute(event.getLevel(), event.getPos().getX(), event.getPos().getY(), event.getPos().getZ(), event.getBreaker(), oreType);
}
}
}
private static String getOreType(Block block) {
if (block == CustomOreGenModBlocks.SHARDDIAMONDBLOCKORE.get() || block == CustomOreGenModBlocks.DEEPSLATESHARDDIAMONDORE.get()) return "shard_diamond";
if (block == CustomOreGenModBlocks.CONCENTRATEDCOALORE.get()) return "concentrated_coal";
if (block == CustomOreGenModBlocks.PUREGOLDENORE.get() || block == CustomOreGenModBlocks.DEEPSLATEPUREGOLDENORE.get()) return "pure_golden";
if (block == CustomOreGenModBlocks.IRONORE.get() || block == CustomOreGenModBlocks.DEEPSLATEIRONORE.get()) return "impure_iron";
if (block == CustomOreGenModBlocks.DEEPSLATEDIAMONDORE.get()) return "concentrated_diamond";
if (block == CustomOreGenModBlocks.LAPISORE.get() || block == CustomOreGenModBlocks.DEEPSLATELAPISORE.get()) return "lapis";
if (block == CustomOreGenModBlocks.REDSTONEORE.get() || block == CustomOreGenModBlocks.DEEPSLATEREDSTONEORE.get()) return "redstone";
if (block == CustomOreGenModBlocks.HIGHEMERALDORE.get() || block == CustomOreGenModBlocks.LOWEREMERALDORE.get()) return "emerald";
if (block == CustomOreGenModBlocks.COPPERHIGHORE.get() || block == CustomOreGenModBlocks.COPPERLOWERORE.get()) return "copper";
return null;
}
}
@@ -0,0 +1,211 @@
package net.mcreator.customoregen.loot;
import com.mojang.serialization.MapCodec;
import com.mojang.serialization.codecs.RecordCodecBuilder;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.storage.loot.LootContext;
import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
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;
import net.mcreator.customoregen.init.CustomOreGenModItems;
import net.mcreator.customoregen.config.ModConfigs;
import net.mcreator.customoregen.CustomOreGenMod;
import javax.annotation.Nonnull;
public class CustomOreLootModifier extends LootModifier {
public static final MapCodec<CustomOreLootModifier> CODEC = RecordCodecBuilder.mapCodec(inst ->
codecStart(inst).apply(inst, CustomOreLootModifier::new)
);
public CustomOreLootModifier(LootItemCondition[] conditionsIn) {
super(conditionsIn);
}
@Override
public MapCodec<? extends IGlobalLootModifier> codec() {
return CODEC;
}
@Nonnull
@Override
protected ObjectArrayList<ItemStack> doApply(ObjectArrayList<ItemStack> generatedLoot, LootContext context) {
try {
BlockState state = context.getParamOrNull(LootContextParams.BLOCK_STATE);
if (state == null) return generatedLoot;
Block block = state.getBlock();
String oreType = getOreType(block);
if (oreType != null) {
ItemStack tool = context.getParamOrNull(LootContextParams.TOOL);
// Check for Silk Touch
if (tool != null && !tool.isEmpty()) {
var registry = context.getLevel().registryAccess().lookupOrThrow(Registries.ENCHANTMENT);
int silkLevel = tool.getEnchantmentLevel(registry.getOrThrow(Enchantments.SILK_TOUCH));
if (silkLevel > 0) {
// For Diamond Shard, we want to keep the modded block itself
if (oreType.equals("shard_diamond")) {
ObjectArrayList<ItemStack> shardLoot = new ObjectArrayList<>();
shardLoot.add(new ItemStack(block));
return shardLoot;
}
// For others, convert to vanilla block equivalent
ItemStack vanillaBlock = getVanillaBlockDrop(block);
if (!vanillaBlock.isEmpty()) {
ObjectArrayList<ItemStack> silkLoot = new ObjectArrayList<>();
silkLoot.add(vanillaBlock);
return silkLoot;
}
return generatedLoot;
}
}
// If not silk touch, replace with custom drops
ObjectArrayList<ItemStack> customDrops = new ObjectArrayList<>();
int fortuneLevel = 0;
if (tool != null && !tool.isEmpty()) {
var registry = context.getLevel().registryAccess().lookupOrThrow(Registries.ENCHANTMENT);
fortuneLevel = tool.getEnchantmentLevel(registry.getOrThrow(Enchantments.FORTUNE));
}
addCustomDrops(customDrops, oreType, fortuneLevel, context.getRandom());
// Only return custom drops if we generated some, otherwise fallback to original
if (!customDrops.isEmpty()) {
return customDrops;
}
}
} catch (Exception e) {
CustomOreGenMod.LOGGER.error("Error applying CustomOreLootModifier", e);
}
return generatedLoot;
}
private String getOreType(Block block) {
if (block == CustomOreGenModBlocks.SHARDDIAMONDBLOCKORE.get() || block == CustomOreGenModBlocks.DEEPSLATESHARDDIAMONDORE.get()) return "shard_diamond";
if (block == CustomOreGenModBlocks.CONCENTRATEDCOALORE.get()) return "concentrated_coal";
if (block == CustomOreGenModBlocks.PUREGOLDENORE.get() || block == CustomOreGenModBlocks.DEEPSLATEPUREGOLDENORE.get()) return "pure_golden";
if (block == CustomOreGenModBlocks.IRONORE.get() || block == CustomOreGenModBlocks.DEEPSLATEIRONORE.get()) return "impure_iron";
if (block == CustomOreGenModBlocks.DEEPSLATEDIAMONDORE.get()) return "concentrated_diamond";
if (block == CustomOreGenModBlocks.LAPISORE.get() || block == CustomOreGenModBlocks.DEEPSLATELAPISORE.get()) return "lapis";
if (block == CustomOreGenModBlocks.REDSTONEORE.get() || block == CustomOreGenModBlocks.DEEPSLATEREDSTONEORE.get()) return "redstone";
if (block == CustomOreGenModBlocks.HIGHEMERALDORE.get() || block == CustomOreGenModBlocks.LOWEREMERALDORE.get()) return "emerald";
if (block == CustomOreGenModBlocks.COPPERHIGHORE.get() || block == CustomOreGenModBlocks.COPPERLOWERORE.get()) return "copper";
return null;
}
private ItemStack getVanillaBlockDrop(Block block) {
if (block == CustomOreGenModBlocks.CONCENTRATEDCOALORE.get()) return new ItemStack(Blocks.COAL_ORE);
if (block == CustomOreGenModBlocks.IRONORE.get()) return new ItemStack(Blocks.IRON_ORE);
if (block == CustomOreGenModBlocks.DEEPSLATEIRONORE.get()) return new ItemStack(Blocks.DEEPSLATE_IRON_ORE);
if (block == CustomOreGenModBlocks.PUREGOLDENORE.get()) return new ItemStack(Blocks.GOLD_ORE);
if (block == CustomOreGenModBlocks.DEEPSLATEPUREGOLDENORE.get()) return new ItemStack(Blocks.DEEPSLATE_GOLD_ORE);
if (block == CustomOreGenModBlocks.LAPISORE.get()) return new ItemStack(Blocks.LAPIS_ORE);
if (block == CustomOreGenModBlocks.DEEPSLATELAPISORE.get()) return new ItemStack(Blocks.DEEPSLATE_LAPIS_ORE);
if (block == CustomOreGenModBlocks.REDSTONEORE.get()) return new ItemStack(Blocks.REDSTONE_ORE);
if (block == CustomOreGenModBlocks.DEEPSLATEREDSTONEORE.get()) return new ItemStack(Blocks.DEEPSLATE_REDSTONE_ORE);
if (block == CustomOreGenModBlocks.HIGHEMERALDORE.get()) return new ItemStack(Blocks.EMERALD_ORE);
if (block == CustomOreGenModBlocks.LOWEREMERALDORE.get()) return new ItemStack(Blocks.DEEPSLATE_EMERALD_ORE);
if (block == CustomOreGenModBlocks.COPPERHIGHORE.get()) return new ItemStack(Blocks.COPPER_ORE);
if (block == CustomOreGenModBlocks.COPPERLOWERORE.get()) return new ItemStack(Blocks.DEEPSLATE_COPPER_ORE);
if (block == CustomOreGenModBlocks.DEEPSLATEDIAMONDORE.get()) return new ItemStack(Blocks.DEEPSLATE_DIAMOND_ORE);
return ItemStack.EMPTY;
}
private void addCustomDrops(ObjectArrayList<ItemStack> drops, String oreType, int fortuneLevel, net.minecraft.util.RandomSource random) {
int minDrops = 1;
int maxDrops = 1;
boolean enableFortune = true;
ItemStack dropItem = ItemStack.EMPTY;
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();
dropItem = new ItemStack(Items.RAW_GOLD);
break;
case "impure_iron":
minDrops = ModConfigs.DROPS.impureIronOreMinDrops.get();
maxDrops = ModConfigs.DROPS.impureIronOreMaxDrops.get();
dropItem = new ItemStack(Items.RAW_IRON);
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;
}
if (dropItem.isEmpty()) return;
int dropCount = minDrops + (maxDrops > minDrops ? random.nextInt(maxDrops - minDrops + 1) : 0);
if (enableFortune && fortuneLevel > 0) {
if (oreType.equals("lapis") || oreType.equals("copper") || oreType.equals("redstone")) {
int multiplier = random.nextInt(fortuneLevel + 2) - 1;
if (multiplier < 0) multiplier = 0;
dropCount *= (multiplier + 1);
} else {
int fortuneBonus = random.nextInt(fortuneLevel + 2) - 1;
if (fortuneBonus < 0) fortuneBonus = 0;
dropCount += fortuneBonus;
}
}
if (dropCount > 0) {
dropItem.setCount(dropCount);
drops.add(dropItem);
}
}
}
@@ -159,7 +159,9 @@ public class ConfigurableOreDropsProcedure {
}
}
// Drop the items
/*
// 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) {
@@ -172,6 +174,7 @@ public class ConfigurableOreDropsProcedure {
((ServerLevel) world).addFreshEntity(itemEntity);
}
}
*/
// Drop experience based on ore type (Vanilla 1.21 values)
int expAmount = 0;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1022 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 869 B

After

Width:  |  Height:  |  Size: 552 B

@@ -0,0 +1,23 @@
{
"type": "create:crushing",
"ingredients": [
{
"item": "minecraft:diamond"
}
],
"results": [
{
"item": "custom_ore_gen:diamondshard",
"count": 5
},
{
"item": "custom_ore_gen:diamondshard",
"chance": 0.5
},
{
"item": "custom_ore_gen:diamondshard",
"chance": 0.5
}
],
"processingTime": 250
}
@@ -0,0 +1,23 @@
{
"type": "create:milling",
"ingredients": [
{
"item": "minecraft:diamond"
}
],
"results": [
{
"item": "custom_ore_gen:diamondshard",
"count": 5
},
{
"item": "custom_ore_gen:diamondshard",
"chance": 0.5
},
{
"item": "custom_ore_gen:diamondshard",
"chance": 0.5
}
],
"processingTime": 150
}
@@ -0,0 +1,5 @@
{
"conditions": [
],
"type": "custom_ore_gen:custom_ore_drops"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:concentratedcoalore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/concentratedcoalore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:copper_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/copperhighore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:deepslate_copper_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/copperlowerore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:diamond_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslatediamondore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:deepslateironore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslateironore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:deepslate_lapis_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslatelapisore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:gold_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslatepuregoldenore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:deepslate_redstone_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslateredstoneore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:deepslatesharddiamondore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslatesharddiamondore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:emerald_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/highemeraldore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:iron_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/ironore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:lapis_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/lapisore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:deepslate_emerald_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/loweremeraldore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:gold_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/puregoldenore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "minecraft:redstone_ore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/redstoneore"
}
@@ -1,42 +0,0 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:sharddiamondblockore",
"weight": 1,
"conditions": [
{
"condition": "minecraft:match_tool",
"predicate": {
"predicates": {
"minecraft:enchantments": [
{
"enchantments": "minecraft:silk_touch",
"levels": {
"min": 1
}
}
]
}
}
}
],
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/sharddiamondblockore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:concentratedcoalore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/concentratedcoalore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:copperhighore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/copperhighore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:copperlowerore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/copperlowerore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:deepslatediamondore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslatediamondore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:deepslateironore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslateironore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:deepslatelapisore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslatelapisore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:deepslatepuregoldenore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslatepuregoldenore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:deepslateredstoneore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslateredstoneore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:deepslatesharddiamondore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/deepslatesharddiamondore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:highemeraldore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/highemeraldore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:ironore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/ironore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:lapisore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/lapisore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:loweremeraldore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/loweremeraldore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:puregoldenore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/puregoldenore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:redstoneore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/redstoneore"
}
@@ -0,0 +1,15 @@
{
"type": "minecraft:block",
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "minecraft:item",
"name": "custom_ore_gen:sharddiamondblockore"
}
]
}
],
"random_sequence": "custom_ore_gen:blocks/sharddiamondblockore"
}
@@ -4,7 +4,6 @@
"type": "neoforge:any"
},
"features": [
"custom_ore_gen:sharddiamondblockore",
"custom_ore_gen:deepslatesharddiamondore"
],
"step": "underground_ores"
@@ -16,7 +16,7 @@
"absolute": 15
},
"max_inclusive": {
"absolute": 256
"absolute": 320
}
}
},
@@ -3,7 +3,7 @@
"placement": [
{
"type": "minecraft:count",
"count": 1
"count": 2
},
{
"type": "minecraft:in_square"
@@ -16,7 +16,7 @@
"absolute": 0
},
"max_inclusive": {
"absolute": 64
"absolute": 320
}
}
},
@@ -16,7 +16,7 @@
"absolute": 0
},
"max_inclusive": {
"absolute": 256
"absolute": 320
}
}
},
@@ -0,0 +1,6 @@
{
"replace": false,
"entries": [
"custom_ore_gen:custom_ore_drops"
]
}
@@ -0,0 +1,6 @@
{
"replace": false,
"entries": [
"custom_ore_gen:custom_ore_drops"
]
}