// Path: src/main/java/net/silentchaos512/scalinghealth/init/ModBlocks.java
// @Mod.EventBusSubscriber(modid = ScalingHealth.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
// public enum ModBlocks implements IBlockProvider {
//     HEART_CRYSTAL_ORE(ShardOreBlock::new),
//     POWER_CRYSTAL_ORE(ShardOreBlock::new);
// 
//     private final Lazy<Block> block;
// 
//     ModBlocks(Supplier<Block> factory) {
//         this.block = Lazy.of(factory);
//     }
// 
//     @Override
//     public Block asBlock() {
//         return block.get();
//     }
// 
//     @Override
//     public Item asItem() {
//         return asBlock().asItem();
//     }
// 
//     public String getName() {
//         return name().toLowerCase(Locale.ROOT);
//     }
// 
//     @SubscribeEvent
//     public static void registerAll(RegistryEvent.Register<Block> event) {
//         for (ModBlocks block : values()) {
//             register(block.getName(), block.asBlock());
//         }
//     }
// 
//     private static void register(String name, Block block) {
//         ResourceLocation registryName = new ResourceLocation(ScalingHealth.MOD_ID, name);
//         block.setRegistryName(registryName);
//         ForgeRegistries.BLOCKS.register(block);
// 
//         BlockItem item = new BlockItem(block, new Item.Properties().group(ScalingHealth.SH));
//         item.setRegistryName(registryName);
//         ModItems.blocksToRegister.add(item);
//     }
// }
// 
// Path: src/main/java/net/silentchaos512/scalinghealth/init/ModItems.java
// @Mod.EventBusSubscriber(modid = ScalingHealth.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
// public enum ModItems implements IItemProvider {
//     HEART_CRYSTAL(HeartCrystal::new),
//     HEART_CRYSTAL_SHARD(() -> new Item(new Item.Properties().group(ScalingHealth.SH))),
//     HEART_DUST(() -> new Item(new Item.Properties().group(ScalingHealth.SH))),
//     POWER_CRYSTAL(PowerCrystal::new),
//     POWER_CRYSTAL_SHARD(() -> new Item(new Item.Properties().group(ScalingHealth.SH))),
//     BANDAGES(() -> new HealingItem(0.3f, 1)),
//     MEDKIT(() -> new HealingItem(0.7f, 4)),
//     CURSED_HEART(() -> new DifficultyMutatorItem(DifficultyMutatorItem.Type.CURSED)),
//     ENCHANTED_HEART(() -> new DifficultyMutatorItem(DifficultyMutatorItem.Type.ENCHANTED)),
//     CHANCE_HEART(() -> new DifficultyMutatorItem(DifficultyMutatorItem.Type.CHANCE));
// 
//     private final Lazy<Item> item;
// 
//     ModItems(Supplier<Item> factory) {
//         item = Lazy.of(factory);
//     }
// 
//     @Override
//     public Item asItem() {
//         return item.get();
//     }
// 
//     public String getName() {
//         return name().toLowerCase(Locale.ROOT);
//     }
// 
//     static final Collection<BlockItem> blocksToRegister = new ArrayList<>();
// 
//     @SubscribeEvent
//     public static void registerAll(RegistryEvent.Register<Item> event) {
//         blocksToRegister.forEach(ForgeRegistries.ITEMS::register);
// 
//         for (ModItems item : values()) {
//             register(item.getName(), item.asItem());
//         }
//     }
// 
//     private static void register(String name, Item item) {
//         ResourceLocation registryName = new ResourceLocation(ScalingHealth.MOD_ID, name);
//         item.setRegistryName(registryName);
//         ForgeRegistries.ITEMS.register(item);
//     }
// }
// 
// Path: src/main/java/net/silentchaos512/scalinghealth/lib/EntityGroup.java
// public enum EntityGroup {
//     PEACEFUL,
//     HOSTILE,
//     BOSS,
//     BLIGHT,
//     PLAYER;
// 
//     public static EntityGroup from(String name) {
//         for(EntityGroup group : values()){
//             if(group.name().equalsIgnoreCase(name)){
//                 return group;
//             }
//         }
//         throw new RuntimeException("Could not get an entity group from name: " + name);
//     }
// 
//     public static EntityGroup from(LivingEntity entity) {
//         return from(entity, false);
//     }
// 
//     public static EntityGroup from(LivingEntity entity, boolean ignoreBlightStatus) {
//         if (entity instanceof PlayerEntity)
//             return PLAYER;
//         if (!entity.isNonBoss())
//             return BOSS;
//         if (entity instanceof IMob) {
//         if (!ignoreBlightStatus && SHMobs.isBlight((MobEntity) entity))
//             return BLIGHT;
//         return HOSTILE;
//     }
//         return PEACEFUL;
// }
// 
//     public double getPotionChance() {
//         if (this == PEACEFUL)
//             return SHMobs.passivePotionChance();
//         return SHMobs.hostilePotionChance();
//     }
// 
//     public MobHealthMode getHealthMode() {
//         return SHMobs.healthMode();
//     }
// 
//     public boolean isAffectedByDamageScaling() {
//         switch (this) {
//             case PLAYER:
//                 return EnabledFeatures.playerDamageScalingEnabled();
//             case PEACEFUL:
//                 return Config.GENERAL.damageScaling.affectPeacefuls.get();
//             default:
//                 return Config.GENERAL.damageScaling.affectHostiles.get();
//         }
//     }
// }


import net.minecraft.data.DataGenerator;
import net.silentchaos512.scalinghealth.init.ModBlocks;
import net.silentchaos512.scalinghealth.init.ModItems;
import net.silentchaos512.scalinghealth.lib.EntityGroup;
package net.silentchaos512.scalinghealth.datagen;


public class LootTables extends BaseLootTable {
    public LootTables(DataGenerator generator) {
        super(generator);
    }

    @Override
    protected void addTables() {
        lootTables.put(ModBlocks.HEART_CRYSTAL_ORE.asBlock(), createSilkTouchTable("heart_crystal_ore", ModBlocks.HEART_CRYSTAL_ORE.asBlock(), ModItems.HEART_CRYSTAL_SHARD.asItem()));
// Path: src/main/java/net/silentchaos512/scalinghealth/init/ModBlocks.java
// @Mod.EventBusSubscriber(modid = ScalingHealth.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
// public enum ModBlocks implements IBlockProvider {
//     HEART_CRYSTAL_ORE(ShardOreBlock::new),
//     POWER_CRYSTAL_ORE(ShardOreBlock::new);
// 
//     private final Lazy<Block> block;
// 
//     ModBlocks(Supplier<Block> factory) {
//         this.block = Lazy.of(factory);
//     }
// 
//     @Override
//     public Block asBlock() {
//         return block.get();
//     }
// 
//     @Override
//     public Item asItem() {
//         return asBlock().asItem();
//     }
// 
//     public String getName() {
//         return name().toLowerCase(Locale.ROOT);
//     }
// 
//     @SubscribeEvent
//     public static void registerAll(RegistryEvent.Register<Block> event) {
//         for (ModBlocks block : values()) {
//             register(block.getName(), block.asBlock());
//         }
//     }
// 
//     private static void register(String name, Block block) {
//         ResourceLocation registryName = new ResourceLocation(ScalingHealth.MOD_ID, name);
//         block.setRegistryName(registryName);
//         ForgeRegistries.BLOCKS.register(block);
// 
//         BlockItem item = new BlockItem(block, new Item.Properties().group(ScalingHealth.SH));
//         item.setRegistryName(registryName);
//         ModItems.blocksToRegister.add(item);
//     }
// }
// 
// Path: src/main/java/net/silentchaos512/scalinghealth/init/ModItems.java
// @Mod.EventBusSubscriber(modid = ScalingHealth.MOD_ID, bus = Mod.EventBusSubscriber.Bus.MOD)
// public enum ModItems implements IItemProvider {
//     HEART_CRYSTAL(HeartCrystal::new),
//     HEART_CRYSTAL_SHARD(() -> new Item(new Item.Properties().group(ScalingHealth.SH))),
//     HEART_DUST(() -> new Item(new Item.Properties().group(ScalingHealth.SH))),
//     POWER_CRYSTAL(PowerCrystal::new),
//     POWER_CRYSTAL_SHARD(() -> new Item(new Item.Properties().group(ScalingHealth.SH))),
//     BANDAGES(() -> new HealingItem(0.3f, 1)),
//     MEDKIT(() -> new HealingItem(0.7f, 4)),
//     CURSED_HEART(() -> new DifficultyMutatorItem(DifficultyMutatorItem.Type.CURSED)),
//     ENCHANTED_HEART(() -> new DifficultyMutatorItem(DifficultyMutatorItem.Type.ENCHANTED)),
//     CHANCE_HEART(() -> new DifficultyMutatorItem(DifficultyMutatorItem.Type.CHANCE));
// 
//     private final Lazy<Item> item;
// 
//     ModItems(Supplier<Item> factory) {
//         item = Lazy.of(factory);
//     }
// 
//     @Override
//     public Item asItem() {
//         return item.get();
//     }
// 
//     public String getName() {
//         return name().toLowerCase(Locale.ROOT);
//     }
// 
//     static final Collection<BlockItem> blocksToRegister = new ArrayList<>();
// 
//     @SubscribeEvent
//     public static void registerAll(RegistryEvent.Register<Item> event) {
//         blocksToRegister.forEach(ForgeRegistries.ITEMS::register);
// 
//         for (ModItems item : values()) {
//             register(item.getName(), item.asItem());
//         }
//     }
// 
//     private static void register(String name, Item item) {
//         ResourceLocation registryName = new ResourceLocation(ScalingHealth.MOD_ID, name);
//         item.setRegistryName(registryName);
//         ForgeRegistries.ITEMS.register(item);
//     }
// }
// 
// Path: src/main/java/net/silentchaos512/scalinghealth/lib/EntityGroup.java
// public enum EntityGroup {
//     PEACEFUL,
//     HOSTILE,
//     BOSS,
//     BLIGHT,
//     PLAYER;
// 
//     public static EntityGroup from(String name) {
//         for(EntityGroup group : values()){
//             if(group.name().equalsIgnoreCase(name)){
//                 return group;
//             }
//         }
//         throw new RuntimeException("Could not get an entity group from name: " + name);
//     }
// 
//     public static EntityGroup from(LivingEntity entity) {
//         return from(entity, false);
//     }
// 
//     public static EntityGroup from(LivingEntity entity, boolean ignoreBlightStatus) {
//         if (entity instanceof PlayerEntity)
//             return PLAYER;
//         if (!entity.isNonBoss())
//             return BOSS;
//         if (entity instanceof IMob) {
//         if (!ignoreBlightStatus && SHMobs.isBlight((MobEntity) entity))
//             return BLIGHT;
//         return HOSTILE;
//     }
//         return PEACEFUL;
// }
// 
//     public double getPotionChance() {
//         if (this == PEACEFUL)
//             return SHMobs.passivePotionChance();
//         return SHMobs.hostilePotionChance();
//     }
// 
//     public MobHealthMode getHealthMode() {
//         return SHMobs.healthMode();
//     }
// 
//     public boolean isAffectedByDamageScaling() {
//         switch (this) {
//             case PLAYER:
//                 return EnabledFeatures.playerDamageScalingEnabled();
//             case PEACEFUL:
//                 return Config.GENERAL.damageScaling.affectPeacefuls.get();
//             default:
//                 return Config.GENERAL.damageScaling.affectHostiles.get();
//         }
//     }
// }


// Path: src/main/java/net/silentchaos512/scalinghealth/datagen/LootTables.java
import net.minecraft.data.DataGenerator;
import net.silentchaos512.scalinghealth.init.ModBlocks;
import net.silentchaos512.scalinghealth.init.ModItems;
import net.silentchaos512.scalinghealth.lib.EntityGroup;

package net.silentchaos512.scalinghealth.datagen;


public class LootTables extends BaseLootTable {
    public LootTables(DataGenerator generator) {
        super(generator);
    }

    @Override
    protected void addTables() {
        lootTables.put(ModBlocks.HEART_CRYSTAL_ORE.asBlock(), createSilkTouchTable("heart_crystal_ore", ModBlocks.HEART_CRYSTAL_ORE.asBlock(), ModItems.HEART_CRYSTAL_SHARD.asItem()));
        lootTables.put(ModBlocks.POWER_CRYSTAL_ORE.asBlock(), createSilkTouchTable("power_crystal_ore", ModBlocks.POWER_CRYSTAL_ORE.asBlock(), ModItems.POWER_CRYSTAL_SHARD.asItem()));