diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt index a881040a7..fe4d8bfec 100644 --- a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/DataGen.kt @@ -34,6 +34,7 @@ import ru.dbotthepony.mc.otm.datagen.recipes.MatteryRecipeProvider import ru.dbotthepony.mc.otm.datagen.recipes.has import ru.dbotthepony.mc.otm.registry.* import ru.dbotthepony.mc.otm.* +import ru.dbotthepony.mc.otm.datagen.loot.addLootModifiers import ru.dbotthepony.mc.otm.datagen.recipes.addCraftingTableRecipes import ru.dbotthepony.mc.otm.registry.objects.ColoredDecorativeBlock import ru.dbotthepony.mc.otm.registry.objects.DecorativeBlock @@ -669,42 +670,7 @@ object DataGen { } lootModifier.lambda { - it.add("dungeon_pill", LootTableBasicAppender( - arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/simple_dungeon")).build()), - ItemStack(MItems.PILL_ANDROID, 1) to 0.4, - ItemStack(MItems.PILL_HEAL, 2) to 0.5, - ItemStack(MItems.PILL_HEAL, 1) to 0.75, - )) - - it.add("mineshaft_pill", LootTableBasicAppender( - arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/abandoned_mineshaft")).build()), - ItemStack(MItems.PILL_ANDROID, 1) to 0.075, - ItemStack(MItems.PILL_HEAL, 2) to 0.1, - ItemStack(MItems.PILL_HEAL, 1) to 0.4, - )) - - it.add("desert_pyramid_pill", LootTableBasicAppender( - arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/abandoned_mineshaft")).build()), - ItemStack(MItems.PILL_ANDROID, 1) to 0.05, - ItemStack(MItems.PILL_HEAL, 1) to 0.3, - )) - - it.add("jungle_temple_pill", LootTableBasicAppender( - arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/jungle_temple")).build()), - ItemStack(MItems.PILL_ANDROID, 1) to 0.5 - )) - - it.add("end_city_pill", LootTableBasicAppender( - arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/end_city_treasure")).build()), - ItemStack(MItems.PILL_ANDROID, 1) to 0.1, - ItemStack(MItems.PILL_HUMANE, 1) to 0.3, - ItemStack(MItems.PILL_OBLIVION, 1) to 0.5, - )) - - it.add("shipwreck_supply_pill", LootTableBasicAppender( - arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/shipwreck_supply")).build()), - ItemStack(MItems.PILL_HUMANE, 1) to 0.4 - )) + addLootModifiers(it) } } } diff --git a/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootModifiersData.kt b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootModifiersData.kt new file mode 100644 index 000000000..5e7bf7912 --- /dev/null +++ b/src/data/kotlin/ru/dbotthepony/mc/otm/datagen/loot/LootModifiersData.kt @@ -0,0 +1,61 @@ +package ru.dbotthepony.mc.otm.datagen.loot + +import net.minecraft.resources.ResourceLocation +import net.minecraft.world.item.ItemStack +import net.minecraftforge.common.loot.LootTableIdCondition +import ru.dbotthepony.mc.otm.data.LootTableBasicAppender +import ru.dbotthepony.mc.otm.registry.MItems + +fun addLootModifiers(it: LootModifiers) { + it.add("dungeon_pill", LootTableBasicAppender( + arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/simple_dungeon")).build()), + ItemStack(MItems.PILL_ANDROID, 1) to 0.4, + ItemStack(MItems.PILL_HEAL, 2) to 0.5, + ItemStack(MItems.PILL_HEAL, 1) to 0.75, + )) + + it.add("mineshaft_pill", LootTableBasicAppender( + arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/abandoned_mineshaft")).build()), + ItemStack(MItems.PILL_ANDROID, 1) to 0.075, + ItemStack(MItems.PILL_HEAL, 2) to 0.1, + ItemStack(MItems.PILL_HEAL, 1) to 0.4, + )) + + it.add("mineshaft_nutrient_paste", LootTableBasicAppender( + arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/abandoned_mineshaft")).build()), + ItemStack(MItems.NUTRIENT_PASTE, 6) to 0.5, + ItemStack(MItems.NUTRIENT_PASTE, 8) to 0.35, + ItemStack(MItems.NUTRIENT_PASTE, 12) to 0.15, + )) + + it.add("desert_pyramid_pill", LootTableBasicAppender( + arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/abandoned_mineshaft")).build()), + ItemStack(MItems.PILL_ANDROID, 1) to 0.05, + ItemStack(MItems.PILL_HEAL, 1) to 0.3, + )) + + it.add("jungle_temple_pill", LootTableBasicAppender( + arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/jungle_temple")).build()), + ItemStack(MItems.PILL_ANDROID, 1) to 0.5 + )) + + it.add("end_city_pill", LootTableBasicAppender( + arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/end_city_treasure")).build()), + ItemStack(MItems.PILL_ANDROID, 1) to 0.1, + ItemStack(MItems.PILL_HUMANE, 1) to 0.3, + ItemStack(MItems.PILL_OBLIVION, 1) to 0.5, + )) + + it.add("shipwreck_supply_pill", LootTableBasicAppender( + arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/shipwreck_supply")).build()), + ItemStack(MItems.PILL_HUMANE, 1) to 0.4, + ItemStack(MItems.PILL_HEAL, 1) to 0.6, + )) + + it.add("shipwreck_supply_nutrient_paste", LootTableBasicAppender( + arrayOf(LootTableIdCondition.Builder(ResourceLocation("chests/shipwreck_supply")).build()), + ItemStack(MItems.NUTRIENT_PASTE, 12) to 0.85, + ItemStack(MItems.NUTRIENT_PASTE, 24) to 0.35, + ItemStack(MItems.NUTRIENT_PASTE, 38) to 0.1, + )) +}