Add nutrient paste to loot tables, add heal pill to shipwreck

This commit is contained in:
DBotThePony 2022-08-28 19:01:11 +07:00
parent c8f098effb
commit 6a91a5fd2b
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 63 additions and 36 deletions

View File

@ -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)
}
}
}

View File

@ -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,
))
}