| 1 | package net.minecraft.data.loot.packs;
|
| 2 |
|
| 3 | import net.minecraft.advancements.predicates.LocationPredicate;
|
| 4 | import net.minecraft.core.Holder;
|
| 5 | import net.minecraft.core.HolderGetter;
|
| 6 | import net.minecraft.core.HolderSet;
|
| 7 | import net.minecraft.core.registries.Registries;
|
| 8 | import net.minecraft.data.loot.LootTableSubProvider;
|
| 9 | import net.minecraft.network.chat.Component;
|
| 10 | import net.minecraft.tags.InstrumentTags;
|
| 11 | import net.minecraft.tags.StructureTags;
|
| 12 | import net.minecraft.tags.TagKey;
|
| 13 | import net.minecraft.world.effect.MobEffects;
|
| 14 | import net.minecraft.world.item.Instrument;
|
| 15 | import net.minecraft.world.item.Item;
|
| 16 | import net.minecraft.world.item.Items;
|
| 17 | import net.minecraft.world.item.alchemy.Potions;
|
| 18 | import net.minecraft.world.item.enchantment.Enchantment;
|
| 19 | import net.minecraft.world.item.enchantment.Enchantments;
|
| 20 | import net.minecraft.world.item.trading.VillagerTrades;
|
| 21 | import net.minecraft.world.level.biome.Biome;
|
| 22 | import net.minecraft.world.level.biome.Biomes;
|
| 23 | import net.minecraft.world.level.block.Blocks;
|
| 24 | import net.minecraft.world.level.levelgen.structure.Structure;
|
| 25 | import net.minecraft.world.level.saveddata.maps.MapDecorationType;
|
| 26 | import net.minecraft.world.level.saveddata.maps.MapDecorationTypes;
|
| 27 | import net.minecraft.world.level.storage.loot.BuiltInLootTables;
|
| 28 | import net.minecraft.world.level.storage.loot.LootPool;
|
| 29 | import net.minecraft.world.level.storage.loot.LootTable;
|
| 30 | import net.minecraft.world.level.storage.loot.entries.EmptyLootItem;
|
| 31 | import net.minecraft.world.level.storage.loot.entries.LootItem;
|
| 32 | import net.minecraft.world.level.storage.loot.entries.NestedLootTable;
|
| 33 | import net.minecraft.world.level.storage.loot.entries.UniformContainerBase;
|
| 34 | import net.minecraft.world.level.storage.loot.functions.DiscardItem;
|
| 35 | import net.minecraft.world.level.storage.loot.functions.EnchantRandomlyFunction;
|
| 36 | import net.minecraft.world.level.storage.loot.functions.EnchantWithLevelsFunction;
|
| 37 | import net.minecraft.world.level.storage.loot.functions.ExplorationMapFunction;
|
| 38 | import net.minecraft.world.level.storage.loot.functions.FilteredFunction;
|
| 39 | import net.minecraft.world.level.storage.loot.functions.SetEnchantmentsFunction;
|
| 40 | import net.minecraft.world.level.storage.loot.functions.SetInstrumentFunction;
|
| 41 | import net.minecraft.world.level.storage.loot.functions.SetItemCountFunction;
|
| 42 | import net.minecraft.world.level.storage.loot.functions.SetItemDamageFunction;
|
| 43 | import net.minecraft.world.level.storage.loot.functions.SetNameFunction;
|
| 44 | import net.minecraft.world.level.storage.loot.functions.SetOminousBottleAmplifierFunction;
|
| 45 | import net.minecraft.world.level.storage.loot.functions.SetPotionFunction;
|
| 46 | import net.minecraft.world.level.storage.loot.functions.SetStewEffectFunction;
|
| 47 | import net.minecraft.world.level.storage.loot.predicates.LocationCheck;
|
| 48 | import net.minecraft.world.level.storage.loot.predicates.LootItemRandomChanceCondition;
|
| 49 | import net.minecraft.world.level.storage.loot.providers.number.floats.ContextFloatProviders;
|
| 50 | import net.minecraft.world.level.storage.loot.providers.number.ints.ContextIntProviders;
|
| 51 | import org.jspecify.annotations.Nullable;
|
| 52 |
|
| 53 | public class VanillaChestLoot implements LootTableSubProvider {
|
| 54 | private final LootTableSubProvider.Context output;
|
| 55 | private final HolderGetter<Biome> biomes;
|
| 56 | private final HolderGetter<Enchantment> enchantments;
|
| 57 | private final HolderGetter<Instrument> instruments;
|
| 58 | private final HolderGetter<Structure> structures;
|
| 59 |
|
| 60 | public VanillaChestLoot(final LootTableSubProvider.Context output) {
|
| 61 | this.output = output;
|
| 62 | this.biomes = output.lookup(Registries.BIOME);
|
| 63 | this.enchantments = output.lookup(Registries.ENCHANTMENT);
|
| 64 | this.instruments = output.lookup(Registries.INSTRUMENT);
|
| 65 | this.structures = output.lookup(Registries.STRUCTURE);
|
| 66 | }
|
| 67 |
|
| 68 | @Override
|
| 69 | public void run() {
|
| 70 | this.output
|
| 71 | .accept(
|
| 72 | BuiltInLootTables.ABANDONED_MINESHAFT,
|
| 73 | LootTable.lootTable()
|
| 74 | .withPool(
|
| 75 | LootPool.lootPool()
|
| 76 | .setRolls(ContextIntProviders.exactly(1))
|
| 77 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(20))
|
| 78 | .add(LootItem.lootTableItem(Items.ENCHANTED_GOLDEN_APPLE))
|
| 79 | .add(LootItem.lootTableItem(Items.NAME_TAG).setWeight(30))
|
| 80 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(10).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 81 | .add(LootItem.lootTableItem(Items.IRON_PICKAXE).setWeight(5))
|
| 82 | .add(EmptyLootItem.emptyItem().setWeight(5))
|
| 83 | )
|
| 84 | .withPool(
|
| 85 | LootPool.lootPool()
|
| 86 | .setRolls(ContextIntProviders.between(2, 4))
|
| 87 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 88 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 89 | .add(LootItem.lootTableItem(Items.REDSTONE).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 9))))
|
| 90 | .add(LootItem.lootTableItem(Items.LAPIS_LAZULI).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 9))))
|
| 91 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 92 | .add(LootItem.lootTableItem(Items.COAL).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 8))))
|
| 93 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 94 | .add(LootItem.lootTableItem(Items.GLOW_BERRIES).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 6))))
|
| 95 | .add(LootItem.lootTableItem(Items.MELON_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 96 | .add(LootItem.lootTableItem(Items.PUMPKIN_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 97 | .add(LootItem.lootTableItem(Items.BEETROOT_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 98 | )
|
| 99 | .withPool(
|
| 100 | LootPool.lootPool()
|
| 101 | .setRolls(ContextIntProviders.exactly(3))
|
| 102 | .add(LootItem.lootTableItem(Blocks.RAIL).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))))
|
| 103 | .add(LootItem.lootTableItem(Blocks.POWERED_RAIL).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 104 | .add(LootItem.lootTableItem(Blocks.DETECTOR_RAIL).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 105 | .add(LootItem.lootTableItem(Blocks.ACTIVATOR_RAIL).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 106 | .add(LootItem.lootTableItem(Blocks.TORCH).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 16))))
|
| 107 | .add(
|
| 108 | LootItem.lootTableItem(Items.MUSIC_DISC_BOUNCE)
|
| 109 | .when(LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiomes(HolderSet.direct(this.biomes.getOrThrow(Biomes.SULFUR_CAVES)))))
|
| 110 | .setWeight(10)
|
| 111 | )
|
| 112 | )
|
| 113 | );
|
| 114 | this.output.accept(BuiltInLootTables.BASTION_BRIDGE, this.bastionBridgeLootTable());
|
| 115 | this.output.accept(BuiltInLootTables.BASTION_HOGLIN_STABLE, this.bastionHoglinStableLootTable());
|
| 116 | this.output.accept(BuiltInLootTables.BASTION_OTHER, this.bastionOtherLootTable());
|
| 117 | this.output.accept(BuiltInLootTables.BASTION_TREASURE, this.bastionTreasureLootTable());
|
| 118 | this.output
|
| 119 | .accept(
|
| 120 | BuiltInLootTables.BURIED_TREASURE,
|
| 121 | LootTable.lootTable()
|
| 122 | .withPool(LootPool.lootPool().setRolls(ContextIntProviders.exactly(1)).add(LootItem.lootTableItem(Items.HEART_OF_THE_SEA)))
|
| 123 | .withPool(
|
| 124 | LootPool.lootPool()
|
| 125 | .setRolls(ContextIntProviders.between(5, 8))
|
| 126 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 127 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 128 | .add(LootItem.lootTableItem(Blocks.TNT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 129 | )
|
| 130 | .withPool(
|
| 131 | LootPool.lootPool()
|
| 132 | .setRolls(ContextIntProviders.between(1, 3))
|
| 133 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))))
|
| 134 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 135 | .add(LootItem.lootTableItem(Items.PRISMARINE_CRYSTALS).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 136 | )
|
| 137 | .withPool(
|
| 138 | LootPool.lootPool()
|
| 139 | .setRolls(ContextIntProviders.between(0, 1))
|
| 140 | .add(LootItem.lootTableItem(Items.LEATHER_CHESTPLATE))
|
| 141 | .add(LootItem.lootTableItem(Items.IRON_SWORD))
|
| 142 | .add(LootItem.lootTableItem(Items.IRON_SPEAR))
|
| 143 | )
|
| 144 | .withPool(
|
| 145 | LootPool.lootPool()
|
| 146 | .setRolls(ContextIntProviders.exactly(2))
|
| 147 | .add(LootItem.lootTableItem(Items.COOKED_COD).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 148 | .add(LootItem.lootTableItem(Items.COOKED_SALMON).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 149 | )
|
| 150 | .withPool(
|
| 151 | LootPool.lootPool()
|
| 152 | .setRolls(ContextIntProviders.between(0, 2))
|
| 153 | .add(LootItem.lootTableItem(Items.POTION))
|
| 154 | .apply(SetPotionFunction.setPotion(Potions.WATER_BREATHING))
|
| 155 | )
|
| 156 | .withPool(
|
| 157 | LootPool.lootPool()
|
| 158 | .setRolls(ContextIntProviders.exactly(1))
|
| 159 | .add(EmptyLootItem.emptyItem().setWeight(148))
|
| 160 | .add(LootItem.lootTableItem(Items.COPPER_NAUTILUS_ARMOR).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 161 | .add(LootItem.lootTableItem(Items.IRON_NAUTILUS_ARMOR).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 162 | .add(LootItem.lootTableItem(Items.GOLDEN_NAUTILUS_ARMOR).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 163 | .add(LootItem.lootTableItem(Items.DIAMOND_NAUTILUS_ARMOR).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 164 | )
|
| 165 | );
|
| 166 | this.output.accept(BuiltInLootTables.ANCIENT_CITY, this.ancientCityLootTable());
|
| 167 | this.output
|
| 168 | .accept(
|
| 169 | BuiltInLootTables.ANCIENT_CITY_ICE_BOX,
|
| 170 | LootTable.lootTable()
|
| 171 | .withPool(
|
| 172 | LootPool.lootPool()
|
| 173 | .setRolls(ContextIntProviders.between(4, 10))
|
| 174 | .add(
|
| 175 | LootItem.lootTableItem(Items.SUSPICIOUS_STEW)
|
| 176 | .setWeight(1)
|
| 177 | .apply(
|
| 178 | SetStewEffectFunction.stewEffect()
|
| 179 | .withEffect(MobEffects.NIGHT_VISION, ContextIntProviders.between(7, 10))
|
| 180 | .withEffect(MobEffects.BLINDNESS, ContextIntProviders.between(5, 7))
|
| 181 | )
|
| 182 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6)))
|
| 183 | )
|
| 184 | .add(LootItem.lootTableItem(Items.GOLDEN_CARROT).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 10))))
|
| 185 | .add(LootItem.lootTableItem(Items.BAKED_POTATO).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 10))))
|
| 186 | .add(LootItem.lootTableItem(Items.PACKED_ICE).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 187 | .add(LootItem.lootTableItem(Items.SNOWBALL).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 188 | )
|
| 189 | );
|
| 190 | this.output.accept(BuiltInLootTables.DESERT_PYRAMID, this.desertPyramidLootTable());
|
| 191 | this.output.accept(BuiltInLootTables.END_CITY_TREASURE, this.endCityTreasureLootTable());
|
| 192 | this.output
|
| 193 | .accept(
|
| 194 | BuiltInLootTables.IGLOO_CHEST,
|
| 195 | LootTable.lootTable()
|
| 196 | .withPool(
|
| 197 | LootPool.lootPool()
|
| 198 | .setRolls(ContextIntProviders.between(2, 8))
|
| 199 | .add(LootItem.lootTableItem(Items.APPLE).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 200 | .add(LootItem.lootTableItem(Items.COAL).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 201 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 202 | .add(LootItem.lootTableItem(Items.STONE_AXE).setWeight(2))
|
| 203 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(10))
|
| 204 | .add(LootItem.lootTableItem(Items.EMERALD))
|
| 205 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 3))))
|
| 206 | )
|
| 207 | .withPool(LootPool.lootPool().setRolls(ContextIntProviders.exactly(1)).add(LootItem.lootTableItem(Items.GOLDEN_APPLE)))
|
| 208 | );
|
| 209 | this.output.accept(BuiltInLootTables.JUNGLE_TEMPLE, this.jungleTempleLootTable());
|
| 210 | this.output
|
| 211 | .accept(
|
| 212 | BuiltInLootTables.JUNGLE_TEMPLE_DISPENSER,
|
| 213 | LootTable.lootTable()
|
| 214 | .withPool(
|
| 215 | LootPool.lootPool()
|
| 216 | .setRolls(ContextIntProviders.between(1, 2))
|
| 217 | .add(LootItem.lootTableItem(Items.ARROW).setWeight(30).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 218 | )
|
| 219 | );
|
| 220 | this.output.accept(BuiltInLootTables.NETHER_BRIDGE, this.netherBridgeLootTable());
|
| 221 | this.output.accept(BuiltInLootTables.PILLAGER_OUTPOST, this.pillagerOutpostLootTable());
|
| 222 | this.output.accept(BuiltInLootTables.SHIPWRECK_MAP, this.shipwreckMapLootTable());
|
| 223 | this.output.accept(BuiltInLootTables.SHIPWRECK_SUPPLY, this.shipwreckSupplyLootTable());
|
| 224 | this.output.accept(BuiltInLootTables.SHIPWRECK_TREASURE, this.shipwreckTreasureLootTable());
|
| 225 | this.output
|
| 226 | .accept(
|
| 227 | BuiltInLootTables.SIMPLE_DUNGEON,
|
| 228 | LootTable.lootTable()
|
| 229 | .withPool(
|
| 230 | LootPool.lootPool()
|
| 231 | .setRolls(ContextIntProviders.between(1, 3))
|
| 232 | .add(LootItem.lootTableItem(Items.LEATHER).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 233 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(15))
|
| 234 | .add(LootItem.lootTableItem(Items.ENCHANTED_GOLDEN_APPLE).setWeight(2))
|
| 235 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_OTHERSIDE).setWeight(2))
|
| 236 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_13).setWeight(15))
|
| 237 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_CAT).setWeight(15))
|
| 238 | .add(LootItem.lootTableItem(Items.NAME_TAG).setWeight(20))
|
| 239 | .add(LootItem.lootTableItem(Items.GOLDEN_HORSE_ARMOR).setWeight(10))
|
| 240 | .add(LootItem.lootTableItem(Items.COPPER_HORSE_ARMOR).setWeight(15))
|
| 241 | .add(LootItem.lootTableItem(Items.IRON_HORSE_ARMOR).setWeight(15))
|
| 242 | .add(LootItem.lootTableItem(Items.DIAMOND_HORSE_ARMOR).setWeight(5))
|
| 243 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(10).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 244 | )
|
| 245 | .withPool(
|
| 246 | LootPool.lootPool()
|
| 247 | .setRolls(ContextIntProviders.between(1, 4))
|
| 248 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 249 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 250 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(20))
|
| 251 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 252 | .add(LootItem.lootTableItem(Items.BUCKET).setWeight(10))
|
| 253 | .add(LootItem.lootTableItem(Items.REDSTONE).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 254 | .add(LootItem.lootTableItem(Items.COAL).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 255 | .add(LootItem.lootTableItem(Items.MELON_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 256 | .add(LootItem.lootTableItem(Items.PUMPKIN_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 257 | .add(LootItem.lootTableItem(Items.BEETROOT_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 258 | )
|
| 259 | .withPool(
|
| 260 | LootPool.lootPool()
|
| 261 | .setRolls(ContextIntProviders.exactly(3))
|
| 262 | .add(LootItem.lootTableItem(Items.BONE).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 263 | .add(LootItem.lootTableItem(Items.GUNPOWDER).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 264 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 265 | .add(LootItem.lootTableItem(Items.STRING).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 266 | )
|
| 267 | );
|
| 268 | this.output
|
| 269 | .accept(
|
| 270 | BuiltInLootTables.SPAWN_BONUS_CHEST,
|
| 271 | LootTable.lootTable()
|
| 272 | .withPool(
|
| 273 | LootPool.lootPool()
|
| 274 | .setRolls(ContextIntProviders.exactly(1))
|
| 275 | .add(LootItem.lootTableItem(Items.STONE_AXE))
|
| 276 | .add(LootItem.lootTableItem(Items.WOODEN_AXE).setWeight(3))
|
| 277 | )
|
| 278 | .withPool(
|
| 279 | LootPool.lootPool()
|
| 280 | .setRolls(ContextIntProviders.exactly(1))
|
| 281 | .add(LootItem.lootTableItem(Items.STONE_PICKAXE))
|
| 282 | .add(LootItem.lootTableItem(Items.WOODEN_PICKAXE).setWeight(3))
|
| 283 | )
|
| 284 | .withPool(
|
| 285 | LootPool.lootPool()
|
| 286 | .setRolls(ContextIntProviders.exactly(3))
|
| 287 | .add(LootItem.lootTableItem(Items.APPLE).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 288 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 289 | .add(LootItem.lootTableItem(Items.SALMON).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 290 | )
|
| 291 | .withPool(
|
| 292 | LootPool.lootPool()
|
| 293 | .setRolls(ContextIntProviders.exactly(4))
|
| 294 | .add(LootItem.lootTableItem(Items.STICK).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 12))))
|
| 295 | .add(LootItem.lootTableItem(Blocks.OAK_PLANKS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 12))))
|
| 296 | .add(LootItem.lootTableItem(Blocks.OAK_LOG).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 297 | .add(LootItem.lootTableItem(Blocks.SPRUCE_LOG).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 298 | .add(LootItem.lootTableItem(Blocks.BIRCH_LOG).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 299 | .add(LootItem.lootTableItem(Blocks.JUNGLE_LOG).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 300 | .add(LootItem.lootTableItem(Blocks.ACACIA_LOG).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 301 | .add(LootItem.lootTableItem(Blocks.DARK_OAK_LOG).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 302 | .add(LootItem.lootTableItem(Blocks.MANGROVE_LOG).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 303 | )
|
| 304 | );
|
| 305 | this.output.accept(BuiltInLootTables.STRONGHOLD_CORRIDOR, this.strongholdCorridorLootTable());
|
| 306 | this.output
|
| 307 | .accept(
|
| 308 | BuiltInLootTables.STRONGHOLD_CROSSING,
|
| 309 | LootTable.lootTable()
|
| 310 | .withPool(
|
| 311 | LootPool.lootPool()
|
| 312 | .setRolls(ContextIntProviders.between(1, 4))
|
| 313 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 314 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 315 | .add(LootItem.lootTableItem(Items.REDSTONE).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 9))))
|
| 316 | .add(LootItem.lootTableItem(Items.COAL).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 8))))
|
| 317 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 318 | .add(LootItem.lootTableItem(Items.APPLE).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 319 | .add(LootItem.lootTableItem(Items.IRON_PICKAXE))
|
| 320 | .add(LootItem.lootTableItem(Items.BOOK).apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.exactly(30))))
|
| 321 | )
|
| 322 | );
|
| 323 | this.output.accept(BuiltInLootTables.STRONGHOLD_LIBRARY, this.strongholdLibraryLootTable());
|
| 324 | this.output
|
| 325 | .accept(
|
| 326 | BuiltInLootTables.UNDERWATER_RUIN_BIG,
|
| 327 | LootTable.lootTable()
|
| 328 | .withPool(
|
| 329 | LootPool.lootPool()
|
| 330 | .setRolls(ContextIntProviders.between(2, 8))
|
| 331 | .add(LootItem.lootTableItem(Items.COAL).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 332 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 333 | .add(LootItem.lootTableItem(Items.EMERALD))
|
| 334 | .add(LootItem.lootTableItem(Items.STONE_SPEAR).setWeight(2))
|
| 335 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 3))))
|
| 336 | )
|
| 337 | .withPool(
|
| 338 | LootPool.lootPool()
|
| 339 | .setRolls(ContextIntProviders.exactly(1))
|
| 340 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE))
|
| 341 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(5).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 342 | .add(LootItem.lootTableItem(Items.LEATHER_CHESTPLATE))
|
| 343 | .add(LootItem.lootTableItem(Items.GOLDEN_HELMET))
|
| 344 | .add(LootItem.lootTableItem(Items.FISHING_ROD).setWeight(5).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 345 | .add(this.buriedTreasureMapItem().setWeight(10))
|
| 346 | )
|
| 347 | .withPool(
|
| 348 | LootPool.lootPool()
|
| 349 | .setRolls(ContextIntProviders.exactly(1))
|
| 350 | .add(EmptyLootItem.emptyItem().setWeight(148))
|
| 351 | .add(LootItem.lootTableItem(Items.COPPER_NAUTILUS_ARMOR).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 352 | .add(LootItem.lootTableItem(Items.IRON_NAUTILUS_ARMOR).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 353 | .add(LootItem.lootTableItem(Items.GOLDEN_NAUTILUS_ARMOR).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 354 | .add(LootItem.lootTableItem(Items.DIAMOND_NAUTILUS_ARMOR).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 355 | )
|
| 356 | );
|
| 357 | this.output
|
| 358 | .accept(
|
| 359 | BuiltInLootTables.UNDERWATER_RUIN_SMALL,
|
| 360 | LootTable.lootTable()
|
| 361 | .withPool(
|
| 362 | LootPool.lootPool()
|
| 363 | .setRolls(ContextIntProviders.between(2, 8))
|
| 364 | .add(LootItem.lootTableItem(Items.COAL).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 365 | .add(LootItem.lootTableItem(Items.STONE_AXE).setWeight(2))
|
| 366 | .add(LootItem.lootTableItem(Items.STONE_SPEAR).setWeight(2))
|
| 367 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(5))
|
| 368 | .add(LootItem.lootTableItem(Items.EMERALD))
|
| 369 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 3))))
|
| 370 | )
|
| 371 | .withPool(
|
| 372 | LootPool.lootPool()
|
| 373 | .setRolls(ContextIntProviders.exactly(1))
|
| 374 | .add(LootItem.lootTableItem(Items.LEATHER_CHESTPLATE))
|
| 375 | .add(LootItem.lootTableItem(Items.GOLDEN_HELMET))
|
| 376 | .add(LootItem.lootTableItem(Items.FISHING_ROD).setWeight(5).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 377 | .add(this.buriedTreasureMapItem().setWeight(5))
|
| 378 | )
|
| 379 | .withPool(
|
| 380 | LootPool.lootPool()
|
| 381 | .setRolls(ContextIntProviders.exactly(1))
|
| 382 | .add(EmptyLootItem.emptyItem().setWeight(148))
|
| 383 | .add(LootItem.lootTableItem(Items.COPPER_NAUTILUS_ARMOR).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 384 | .add(LootItem.lootTableItem(Items.IRON_NAUTILUS_ARMOR).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 385 | .add(LootItem.lootTableItem(Items.GOLDEN_NAUTILUS_ARMOR).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 386 | .add(LootItem.lootTableItem(Items.DIAMOND_NAUTILUS_ARMOR).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 387 | )
|
| 388 | );
|
| 389 | this.output
|
| 390 | .accept(
|
| 391 | BuiltInLootTables.VILLAGE_WEAPONSMITH,
|
| 392 | LootTable.lootTable()
|
| 393 | .withPool(
|
| 394 | LootPool.lootPool()
|
| 395 | .setRolls(ContextIntProviders.between(3, 8))
|
| 396 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 397 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 398 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 399 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 400 | .add(LootItem.lootTableItem(Items.APPLE).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 401 | .add(LootItem.lootTableItem(Items.IRON_PICKAXE).setWeight(5))
|
| 402 | .add(LootItem.lootTableItem(Items.IRON_SWORD).setWeight(5))
|
| 403 | .add(LootItem.lootTableItem(Items.IRON_SPEAR).setWeight(5))
|
| 404 | .add(LootItem.lootTableItem(Items.COPPER_SPEAR).setWeight(7))
|
| 405 | .add(LootItem.lootTableItem(Items.IRON_CHESTPLATE).setWeight(5))
|
| 406 | .add(LootItem.lootTableItem(Items.IRON_HELMET).setWeight(5))
|
| 407 | .add(LootItem.lootTableItem(Items.IRON_LEGGINGS).setWeight(5))
|
| 408 | .add(LootItem.lootTableItem(Items.IRON_BOOTS).setWeight(5))
|
| 409 | .add(LootItem.lootTableItem(Blocks.OBSIDIAN).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 7))))
|
| 410 | .add(LootItem.lootTableItem(Blocks.OAK_SAPLING).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 7))))
|
| 411 | .add(LootItem.lootTableItem(Items.SADDLE).setWeight(3))
|
| 412 | .add(LootItem.lootTableItem(Items.COPPER_HORSE_ARMOR))
|
| 413 | .add(LootItem.lootTableItem(Items.IRON_HORSE_ARMOR))
|
| 414 | .add(LootItem.lootTableItem(Items.GOLDEN_HORSE_ARMOR))
|
| 415 | .add(LootItem.lootTableItem(Items.DIAMOND_HORSE_ARMOR))
|
| 416 | )
|
| 417 | .withPool(
|
| 418 | LootPool.lootPool()
|
| 419 | .setRolls(ContextIntProviders.exactly(1))
|
| 420 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 421 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 422 | )
|
| 423 | );
|
| 424 | this.output
|
| 425 | .accept(
|
| 426 | BuiltInLootTables.VILLAGE_TOOLSMITH,
|
| 427 | LootTable.lootTable()
|
| 428 | .withPool(
|
| 429 | LootPool.lootPool()
|
| 430 | .setRolls(ContextIntProviders.between(3, 8))
|
| 431 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 432 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 433 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 434 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 435 | .add(LootItem.lootTableItem(Items.IRON_PICKAXE).setWeight(5))
|
| 436 | .add(LootItem.lootTableItem(Items.COAL).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 437 | .add(LootItem.lootTableItem(Items.STICK).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 438 | .add(LootItem.lootTableItem(Items.IRON_SHOVEL).setWeight(5))
|
| 439 | )
|
| 440 | );
|
| 441 | this.output
|
| 442 | .accept(
|
| 443 | BuiltInLootTables.VILLAGE_CARTOGRAPHER,
|
| 444 | LootTable.lootTable()
|
| 445 | .withPool(
|
| 446 | LootPool.lootPool()
|
| 447 | .setRolls(ContextIntProviders.between(1, 5))
|
| 448 | .add(LootItem.lootTableItem(Items.MAP).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 449 | .add(LootItem.lootTableItem(Items.PAPER).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 450 | .add(LootItem.lootTableItem(Items.COMPASS).setWeight(5))
|
| 451 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 452 | .add(LootItem.lootTableItem(Items.STICK).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 453 | )
|
| 454 | .withPool(
|
| 455 | LootPool.lootPool()
|
| 456 | .setRolls(ContextIntProviders.exactly(1))
|
| 457 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 458 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 459 | )
|
| 460 | );
|
| 461 | this.output
|
| 462 | .accept(
|
| 463 | BuiltInLootTables.VILLAGE_MASON,
|
| 464 | LootTable.lootTable()
|
| 465 | .withPool(
|
| 466 | LootPool.lootPool()
|
| 467 | .setRolls(ContextIntProviders.between(1, 5))
|
| 468 | .add(LootItem.lootTableItem(Items.CLAY_BALL).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 469 | .add(LootItem.lootTableItem(Items.FLOWER_POT).setWeight(1))
|
| 470 | .add(LootItem.lootTableItem(Blocks.STONE).setWeight(2))
|
| 471 | .add(LootItem.lootTableItem(Blocks.STONE_BRICKS).setWeight(2))
|
| 472 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 473 | .add(LootItem.lootTableItem(Items.DYE.yellow()).setWeight(1))
|
| 474 | .add(LootItem.lootTableItem(Blocks.SMOOTH_STONE).setWeight(1))
|
| 475 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1))
|
| 476 | )
|
| 477 | );
|
| 478 | this.output
|
| 479 | .accept(
|
| 480 | BuiltInLootTables.VILLAGE_ARMORER,
|
| 481 | LootTable.lootTable()
|
| 482 | .withPool(
|
| 483 | LootPool.lootPool()
|
| 484 | .setRolls(ContextIntProviders.between(1, 5))
|
| 485 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 486 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 487 | .add(LootItem.lootTableItem(Items.IRON_HELMET).setWeight(1))
|
| 488 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1))
|
| 489 | )
|
| 490 | );
|
| 491 | this.output
|
| 492 | .accept(
|
| 493 | BuiltInLootTables.VILLAGE_SHEPHERD,
|
| 494 | LootTable.lootTable()
|
| 495 | .withPool(
|
| 496 | LootPool.lootPool()
|
| 497 | .setRolls(ContextIntProviders.between(1, 5))
|
| 498 | .add(LootItem.lootTableItem(Blocks.WOOL.white()).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 499 | .add(LootItem.lootTableItem(Blocks.WOOL.black()).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 500 | .add(LootItem.lootTableItem(Blocks.WOOL.gray()).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 501 | .add(LootItem.lootTableItem(Blocks.WOOL.brown()).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 502 | .add(LootItem.lootTableItem(Blocks.WOOL.lightGray()).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 503 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1))
|
| 504 | .add(LootItem.lootTableItem(Items.SHEARS).setWeight(1))
|
| 505 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 6))))
|
| 506 | )
|
| 507 | );
|
| 508 | this.output
|
| 509 | .accept(
|
| 510 | BuiltInLootTables.VILLAGE_BUTCHER,
|
| 511 | LootTable.lootTable()
|
| 512 | .withPool(
|
| 513 | LootPool.lootPool()
|
| 514 | .setRolls(ContextIntProviders.between(1, 5))
|
| 515 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1))
|
| 516 | .add(LootItem.lootTableItem(Items.PORKCHOP).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 517 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 518 | .add(LootItem.lootTableItem(Items.BEEF).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 519 | .add(LootItem.lootTableItem(Items.MUTTON).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 520 | .add(LootItem.lootTableItem(Items.COAL).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 521 | )
|
| 522 | );
|
| 523 | this.output
|
| 524 | .accept(
|
| 525 | BuiltInLootTables.VILLAGE_FLETCHER,
|
| 526 | LootTable.lootTable()
|
| 527 | .withPool(
|
| 528 | LootPool.lootPool()
|
| 529 | .setRolls(ContextIntProviders.between(1, 5))
|
| 530 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1))
|
| 531 | .add(LootItem.lootTableItem(Items.ARROW).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 532 | .add(LootItem.lootTableItem(Items.FEATHER).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 533 | .add(LootItem.lootTableItem(Items.EGG).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 534 | .add(LootItem.lootTableItem(Items.FLINT).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 535 | .add(LootItem.lootTableItem(Items.STICK).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 536 | )
|
| 537 | );
|
| 538 | this.output
|
| 539 | .accept(
|
| 540 | BuiltInLootTables.VILLAGE_FISHER,
|
| 541 | LootTable.lootTable()
|
| 542 | .withPool(
|
| 543 | LootPool.lootPool()
|
| 544 | .setRolls(ContextIntProviders.between(1, 5))
|
| 545 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1))
|
| 546 | .add(LootItem.lootTableItem(Items.COD).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 547 | .add(LootItem.lootTableItem(Items.SALMON).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 548 | .add(LootItem.lootTableItem(Items.WATER_BUCKET).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 549 | .add(LootItem.lootTableItem(Items.BARREL).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 550 | .add(LootItem.lootTableItem(Items.WHEAT_SEEDS).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 551 | .add(LootItem.lootTableItem(Items.COAL).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 552 | )
|
| 553 | );
|
| 554 | this.output
|
| 555 | .accept(
|
| 556 | BuiltInLootTables.VILLAGE_TANNERY,
|
| 557 | LootTable.lootTable()
|
| 558 | .withPool(
|
| 559 | LootPool.lootPool()
|
| 560 | .setRolls(ContextIntProviders.between(1, 5))
|
| 561 | .add(LootItem.lootTableItem(Items.LEATHER).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 562 | .add(LootItem.lootTableItem(Items.LEATHER_CHESTPLATE).setWeight(2))
|
| 563 | .add(LootItem.lootTableItem(Items.LEATHER_BOOTS).setWeight(2))
|
| 564 | .add(LootItem.lootTableItem(Items.LEATHER_HELMET).setWeight(2))
|
| 565 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 566 | .add(LootItem.lootTableItem(Items.LEATHER_LEGGINGS).setWeight(2))
|
| 567 | .add(LootItem.lootTableItem(Items.SADDLE).setWeight(1))
|
| 568 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 569 | )
|
| 570 | .withPool(
|
| 571 | LootPool.lootPool()
|
| 572 | .setRolls(ContextIntProviders.exactly(1))
|
| 573 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 574 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 575 | )
|
| 576 | );
|
| 577 | this.output
|
| 578 | .accept(
|
| 579 | BuiltInLootTables.VILLAGE_TEMPLE,
|
| 580 | LootTable.lootTable()
|
| 581 | .withPool(
|
| 582 | LootPool.lootPool()
|
| 583 | .setRolls(ContextIntProviders.between(3, 8))
|
| 584 | .add(LootItem.lootTableItem(Items.REDSTONE).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 585 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 586 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 587 | .add(LootItem.lootTableItem(Items.LAPIS_LAZULI).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 588 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 589 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 590 | )
|
| 591 | );
|
| 592 | this.output
|
| 593 | .accept(
|
| 594 | BuiltInLootTables.VILLAGE_PLAINS_HOUSE,
|
| 595 | LootTable.lootTable()
|
| 596 | .withPool(
|
| 597 | LootPool.lootPool()
|
| 598 | .setRolls(ContextIntProviders.between(3, 8))
|
| 599 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 600 | .add(LootItem.lootTableItem(Items.DANDELION).setWeight(2))
|
| 601 | .add(LootItem.lootTableItem(Items.POPPY).setWeight(1))
|
| 602 | .add(LootItem.lootTableItem(Items.POTATO).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 7))))
|
| 603 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 604 | .add(LootItem.lootTableItem(Items.APPLE).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 605 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(1))
|
| 606 | .add(LootItem.lootTableItem(Items.FEATHER).setWeight(1))
|
| 607 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 608 | .add(LootItem.lootTableItem(Blocks.OAK_SAPLING).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 609 | )
|
| 610 | .withPool(
|
| 611 | LootPool.lootPool()
|
| 612 | .setRolls(ContextIntProviders.exactly(1))
|
| 613 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 614 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 615 | )
|
| 616 | );
|
| 617 | this.output
|
| 618 | .accept(
|
| 619 | BuiltInLootTables.VILLAGE_TAIGA_HOUSE,
|
| 620 | LootTable.lootTable()
|
| 621 | .withPool(
|
| 622 | LootPool.lootPool()
|
| 623 | .setRolls(ContextIntProviders.between(3, 8))
|
| 624 | .add(LootItem.lootTableItem(Items.IRON_NUGGET).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 625 | .add(LootItem.lootTableItem(Items.FERN).setWeight(2))
|
| 626 | .add(LootItem.lootTableItem(Items.LARGE_FERN).setWeight(2))
|
| 627 | .add(LootItem.lootTableItem(Items.POTATO).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 7))))
|
| 628 | .add(LootItem.lootTableItem(Items.SWEET_BERRIES).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 7))))
|
| 629 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 630 | .add(LootItem.lootTableItem(Items.PUMPKIN_SEEDS).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 631 | .add(LootItem.lootTableItem(Items.PUMPKIN_PIE).setWeight(1))
|
| 632 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 633 | .add(LootItem.lootTableItem(Blocks.SPRUCE_SAPLING).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 634 | .add(LootItem.lootTableItem(Items.SPRUCE_SIGN).setWeight(1))
|
| 635 | .add(LootItem.lootTableItem(Items.SPRUCE_LOG).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 636 | )
|
| 637 | .withPool(
|
| 638 | LootPool.lootPool()
|
| 639 | .setRolls(ContextIntProviders.exactly(1))
|
| 640 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 641 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 642 | )
|
| 643 | );
|
| 644 | this.output
|
| 645 | .accept(
|
| 646 | BuiltInLootTables.VILLAGE_SAVANNA_HOUSE,
|
| 647 | LootTable.lootTable()
|
| 648 | .withPool(
|
| 649 | LootPool.lootPool()
|
| 650 | .setRolls(ContextIntProviders.between(3, 8))
|
| 651 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 652 | .add(LootItem.lootTableItem(Items.SHORT_GRASS).setWeight(5))
|
| 653 | .add(LootItem.lootTableItem(Items.TALL_GRASS).setWeight(5))
|
| 654 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 655 | .add(LootItem.lootTableItem(Items.WHEAT_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 656 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 657 | .add(LootItem.lootTableItem(Blocks.ACACIA_SAPLING).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 658 | .add(LootItem.lootTableItem(Items.SADDLE).setWeight(1))
|
| 659 | .add(LootItem.lootTableItem(Blocks.TORCH).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 660 | .add(LootItem.lootTableItem(Items.BUCKET).setWeight(1))
|
| 661 | )
|
| 662 | .withPool(
|
| 663 | LootPool.lootPool()
|
| 664 | .setRolls(ContextIntProviders.exactly(1))
|
| 665 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 666 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 667 | )
|
| 668 | );
|
| 669 | this.output
|
| 670 | .accept(
|
| 671 | BuiltInLootTables.VILLAGE_SNOWY_HOUSE,
|
| 672 | LootTable.lootTable()
|
| 673 | .withPool(
|
| 674 | LootPool.lootPool()
|
| 675 | .setRolls(ContextIntProviders.between(3, 8))
|
| 676 | .add(LootItem.lootTableItem(Blocks.BLUE_ICE).setWeight(1))
|
| 677 | .add(LootItem.lootTableItem(Blocks.SNOW_BLOCK).setWeight(4))
|
| 678 | .add(LootItem.lootTableItem(Items.POTATO).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 7))))
|
| 679 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 680 | .add(LootItem.lootTableItem(Items.BEETROOT_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 681 | .add(LootItem.lootTableItem(Items.BEETROOT_SOUP).setWeight(1))
|
| 682 | .add(LootItem.lootTableItem(Items.FURNACE).setWeight(1))
|
| 683 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 684 | .add(LootItem.lootTableItem(Items.SNOWBALL).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 7))))
|
| 685 | .add(LootItem.lootTableItem(Items.COAL).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 686 | )
|
| 687 | .withPool(
|
| 688 | LootPool.lootPool()
|
| 689 | .setRolls(ContextIntProviders.exactly(1))
|
| 690 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 691 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 692 | )
|
| 693 | );
|
| 694 | this.output
|
| 695 | .accept(
|
| 696 | BuiltInLootTables.VILLAGE_DESERT_HOUSE,
|
| 697 | LootTable.lootTable()
|
| 698 | .withPool(
|
| 699 | LootPool.lootPool()
|
| 700 | .setRolls(ContextIntProviders.between(3, 8))
|
| 701 | .add(LootItem.lootTableItem(Items.CLAY_BALL).setWeight(1))
|
| 702 | .add(LootItem.lootTableItem(Items.DYE.green()).setWeight(1))
|
| 703 | .add(LootItem.lootTableItem(Blocks.CACTUS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 704 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 7))))
|
| 705 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 706 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(1))
|
| 707 | .add(LootItem.lootTableItem(Blocks.DEAD_BUSH).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 708 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 709 | )
|
| 710 | .withPool(
|
| 711 | LootPool.lootPool()
|
| 712 | .setRolls(ContextIntProviders.exactly(1))
|
| 713 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 714 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 715 | )
|
| 716 | );
|
| 717 | this.output.accept(BuiltInLootTables.WOODLAND_MANSION, this.woodlandMansionLootTable());
|
| 718 | this.output
|
| 719 | .accept(
|
| 720 | BuiltInLootTables.RUINED_PORTAL,
|
| 721 | LootTable.lootTable()
|
| 722 | .withPool(
|
| 723 | LootPool.lootPool()
|
| 724 | .setRolls(ContextIntProviders.between(4, 8))
|
| 725 | .add(LootItem.lootTableItem(Items.OBSIDIAN).setWeight(40).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 726 | .add(LootItem.lootTableItem(Items.FLINT).setWeight(40).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 727 | .add(LootItem.lootTableItem(Items.IRON_NUGGET).setWeight(40).apply(SetItemCountFunction.setCount(ContextIntProviders.between(9, 18))))
|
| 728 | .add(LootItem.lootTableItem(Items.FLINT_AND_STEEL).setWeight(40))
|
| 729 | .add(LootItem.lootTableItem(Items.FIRE_CHARGE).setWeight(40))
|
| 730 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(15))
|
| 731 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 24))))
|
| 732 | .add(LootItem.lootTableItem(Items.GOLDEN_SWORD).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 733 | .add(LootItem.lootTableItem(Items.GOLDEN_AXE).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 734 | .add(LootItem.lootTableItem(Items.GOLDEN_HOE).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 735 | .add(LootItem.lootTableItem(Items.GOLDEN_SHOVEL).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 736 | .add(LootItem.lootTableItem(Items.GOLDEN_PICKAXE).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 737 | .add(LootItem.lootTableItem(Items.GOLDEN_BOOTS).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 738 | .add(LootItem.lootTableItem(Items.GOLDEN_CHESTPLATE).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 739 | .add(LootItem.lootTableItem(Items.GOLDEN_HELMET).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 740 | .add(LootItem.lootTableItem(Items.GOLDEN_LEGGINGS).setWeight(15).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 741 | .add(LootItem.lootTableItem(Items.GLISTERING_MELON_SLICE).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 12))))
|
| 742 | .add(LootItem.lootTableItem(Items.GOLDEN_HORSE_ARMOR).setWeight(5))
|
| 743 | .add(LootItem.lootTableItem(Items.LIGHT_WEIGHTED_PRESSURE_PLATE).setWeight(5))
|
| 744 | .add(LootItem.lootTableItem(Items.GOLDEN_CARROT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 12))))
|
| 745 | .add(LootItem.lootTableItem(Items.CLOCK).setWeight(5))
|
| 746 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))))
|
| 747 | .add(LootItem.lootTableItem(Items.BELL).setWeight(1))
|
| 748 | .add(LootItem.lootTableItem(Items.ENCHANTED_GOLDEN_APPLE).setWeight(1))
|
| 749 | .add(LootItem.lootTableItem(Items.GOLD_BLOCK).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 750 | )
|
| 751 | .withPool(
|
| 752 | LootPool.lootPool()
|
| 753 | .setRolls(ContextIntProviders.exactly(1))
|
| 754 | .add(EmptyLootItem.emptyItem().setWeight(1))
|
| 755 | .add(LootItem.lootTableItem(Items.LODESTONE).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 756 | )
|
| 757 | );
|
| 758 | this.output
|
| 759 | .accept(
|
| 760 | BuiltInLootTables.TRIAL_CHAMBERS_CORRIDOR_DISPENSER,
|
| 761 | LootTable.lootTable()
|
| 762 | .withPool(
|
| 763 | LootPool.lootPool()
|
| 764 | .setRolls(ContextIntProviders.exactly(1))
|
| 765 | .add(LootItem.lootTableItem(Items.ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))))
|
| 766 | )
|
| 767 | );
|
| 768 | this.output
|
| 769 | .accept(
|
| 770 | BuiltInLootTables.TRIAL_CHAMBERS_WATER_DISPENSER,
|
| 771 | LootTable.lootTable()
|
| 772 | .withPool(
|
| 773 | LootPool.lootPool()
|
| 774 | .setRolls(ContextIntProviders.exactly(1))
|
| 775 | .add(LootItem.lootTableItem(Items.WATER_BUCKET).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 776 | )
|
| 777 | );
|
| 778 | this.output
|
| 779 | .accept(
|
| 780 | BuiltInLootTables.TRIAL_CHAMBERS_CHAMBER_DISPENSER,
|
| 781 | LootTable.lootTable()
|
| 782 | .withPool(
|
| 783 | LootPool.lootPool()
|
| 784 | .setRolls(ContextIntProviders.exactly(1))
|
| 785 | .add(LootItem.lootTableItem(Items.WATER_BUCKET).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))).setWeight(4))
|
| 786 | .add(LootItem.lootTableItem(Items.ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))).setWeight(4))
|
| 787 | .add(LootItem.lootTableItem(Items.SNOWBALL).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))).setWeight(6))
|
| 788 | .add(LootItem.lootTableItem(Items.EGG).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))).setWeight(2))
|
| 789 | .add(LootItem.lootTableItem(Items.FIRE_CHARGE).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))).setWeight(6))
|
| 790 | .add(
|
| 791 | LootItem.lootTableItem(Items.SPLASH_POTION)
|
| 792 | .apply(SetPotionFunction.setPotion(Potions.SLOWNESS))
|
| 793 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5)))
|
| 794 | .setWeight(1)
|
| 795 | )
|
| 796 | .add(
|
| 797 | LootItem.lootTableItem(Items.SPLASH_POTION)
|
| 798 | .apply(SetPotionFunction.setPotion(Potions.POISON))
|
| 799 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5)))
|
| 800 | .setWeight(1)
|
| 801 | )
|
| 802 | .add(
|
| 803 | LootItem.lootTableItem(Items.SPLASH_POTION)
|
| 804 | .apply(SetPotionFunction.setPotion(Potions.WEAKNESS))
|
| 805 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5)))
|
| 806 | .setWeight(1)
|
| 807 | )
|
| 808 | .add(
|
| 809 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 810 | .apply(SetPotionFunction.setPotion(Potions.SLOWNESS))
|
| 811 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5)))
|
| 812 | .setWeight(1)
|
| 813 | )
|
| 814 | .add(
|
| 815 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 816 | .apply(SetPotionFunction.setPotion(Potions.POISON))
|
| 817 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5)))
|
| 818 | .setWeight(1)
|
| 819 | )
|
| 820 | .add(
|
| 821 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 822 | .apply(SetPotionFunction.setPotion(Potions.WEAKNESS))
|
| 823 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5)))
|
| 824 | .setWeight(1)
|
| 825 | )
|
| 826 | .add(
|
| 827 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 828 | .apply(SetPotionFunction.setPotion(Potions.HEALING))
|
| 829 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5)))
|
| 830 | .setWeight(1)
|
| 831 | )
|
| 832 | )
|
| 833 | );
|
| 834 | this.output
|
| 835 | .accept(
|
| 836 | BuiltInLootTables.TRIAL_CHAMBERS_CORRIDOR_POT,
|
| 837 | LootTable.lootTable()
|
| 838 | .withPool(
|
| 839 | LootPool.lootPool()
|
| 840 | .setRolls(ContextIntProviders.exactly(1))
|
| 841 | .add(LootItem.lootTableItem(Items.EMERALD).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))).setWeight(125))
|
| 842 | .add(LootItem.lootTableItem(Items.ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))).setWeight(100))
|
| 843 | .add(LootItem.lootTableItem(Items.IRON_INGOT).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))).setWeight(100))
|
| 844 | .add(LootItem.lootTableItem(Items.TRIAL_KEY).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))).setWeight(10))
|
| 845 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_CREATOR_MUSIC_BOX).setWeight(5))
|
| 846 | .add(LootItem.lootTableItem(Items.DIAMOND).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))).setWeight(5))
|
| 847 | .add(LootItem.lootTableItem(Items.EMERALD_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))).setWeight(5))
|
| 848 | .add(LootItem.lootTableItem(Items.DIAMOND_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))).setWeight(1))
|
| 849 | )
|
| 850 | );
|
| 851 | this.output
|
| 852 | .accept(
|
| 853 | BuiltInLootTables.TRIAL_CHAMBERS_SUPPLY,
|
| 854 | LootTable.lootTable()
|
| 855 | .withPool(
|
| 856 | LootPool.lootPool()
|
| 857 | .setRolls(ContextIntProviders.between(3, 5))
|
| 858 | .add(LootItem.lootTableItem(Items.ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 14))).setWeight(2))
|
| 859 | .add(
|
| 860 | LootItem.lootTableItem(Items.TIPPED_ARROW)
|
| 861 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8)))
|
| 862 | .apply(SetPotionFunction.setPotion(Potions.POISON))
|
| 863 | .setWeight(1)
|
| 864 | )
|
| 865 | .add(
|
| 866 | LootItem.lootTableItem(Items.TIPPED_ARROW)
|
| 867 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8)))
|
| 868 | .apply(SetPotionFunction.setPotion(Potions.SLOWNESS))
|
| 869 | .setWeight(1)
|
| 870 | )
|
| 871 | .add(LootItem.lootTableItem(Items.BAKED_POTATO).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))).setWeight(2))
|
| 872 | .add(LootItem.lootTableItem(Items.GLOW_BERRIES).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 10))).setWeight(2))
|
| 873 | .add(LootItem.lootTableItem(Items.ACACIA_PLANKS).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 6))).setWeight(1))
|
| 874 | .add(LootItem.lootTableItem(Items.MOSS_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))).setWeight(1))
|
| 875 | .add(LootItem.lootTableItem(Items.BONE_MEAL).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))).setWeight(1))
|
| 876 | .add(LootItem.lootTableItem(Items.TUFF).apply(SetItemCountFunction.setCount(ContextIntProviders.between(5, 10))).setWeight(1))
|
| 877 | .add(LootItem.lootTableItem(Items.TORCH).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 6))).setWeight(1))
|
| 878 | .add(
|
| 879 | LootItem.lootTableItem(Items.POTION)
|
| 880 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2)))
|
| 881 | .apply(SetPotionFunction.setPotion(Potions.REGENERATION))
|
| 882 | )
|
| 883 | .add(
|
| 884 | LootItem.lootTableItem(Items.POTION)
|
| 885 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2)))
|
| 886 | .apply(SetPotionFunction.setPotion(Potions.STRENGTH))
|
| 887 | )
|
| 888 | .add(
|
| 889 | LootItem.lootTableItem(Items.STONE_PICKAXE)
|
| 890 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 891 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.8F)))
|
| 892 | .setWeight(2)
|
| 893 | )
|
| 894 | .add(LootItem.lootTableItem(Items.MILK_BUCKET).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 895 | )
|
| 896 | );
|
| 897 | this.output
|
| 898 | .accept(
|
| 899 | BuiltInLootTables.TRIAL_CHAMBERS_ENTRANCE,
|
| 900 | LootTable.lootTable()
|
| 901 | .withPool(
|
| 902 | LootPool.lootPool()
|
| 903 | .setRolls(ContextIntProviders.between(2, 3))
|
| 904 | .add(LootItem.lootTableItem(Items.TRIAL_KEY).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))).setWeight(1))
|
| 905 | .add(LootItem.lootTableItem(Items.STICK).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))).setWeight(5))
|
| 906 | .add(LootItem.lootTableItem(Items.WOODEN_AXE).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))).setWeight(10))
|
| 907 | .add(LootItem.lootTableItem(Items.HONEYCOMB).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))).setWeight(10))
|
| 908 | .add(LootItem.lootTableItem(Items.ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(5, 10))).setWeight(10))
|
| 909 | )
|
| 910 | );
|
| 911 | this.output
|
| 912 | .accept(
|
| 913 | BuiltInLootTables.TRIAL_CHAMBERS_INTERSECTION,
|
| 914 | LootTable.lootTable()
|
| 915 | .withPool(
|
| 916 | LootPool.lootPool()
|
| 917 | .setRolls(ContextIntProviders.between(1, 3))
|
| 918 | .add(LootItem.lootTableItem(Items.DIAMOND_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))).setWeight(1))
|
| 919 | .add(LootItem.lootTableItem(Items.EMERALD_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))).setWeight(5))
|
| 920 | .add(
|
| 921 | LootItem.lootTableItem(Items.DIAMOND_AXE)
|
| 922 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 923 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.1F, 0.5F)))
|
| 924 | .setWeight(5)
|
| 925 | )
|
| 926 | .add(
|
| 927 | LootItem.lootTableItem(Items.DIAMOND_PICKAXE)
|
| 928 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 929 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.1F, 0.5F)))
|
| 930 | .setWeight(5)
|
| 931 | )
|
| 932 | .add(LootItem.lootTableItem(Items.DIAMOND).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))).setWeight(10))
|
| 933 | .add(LootItem.lootTableItem(Items.CAKE).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))).setWeight(20))
|
| 934 | .add(LootItem.lootTableItem(Items.AMETHYST_SHARD).apply(SetItemCountFunction.setCount(ContextIntProviders.between(8, 20))).setWeight(20))
|
| 935 | .add(LootItem.lootTableItem(Items.IRON_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))).setWeight(20))
|
| 936 | )
|
| 937 | );
|
| 938 | this.output
|
| 939 | .accept(
|
| 940 | BuiltInLootTables.TRIAL_CHAMBERS_INTERSECTION_BARREL,
|
| 941 | LootTable.lootTable()
|
| 942 | .withPool(
|
| 943 | LootPool.lootPool()
|
| 944 | .setRolls(ContextIntProviders.between(1, 3))
|
| 945 | .add(
|
| 946 | LootItem.lootTableItem(Items.DIAMOND_AXE)
|
| 947 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 948 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.4F, 0.9F)))
|
| 949 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 950 | .setWeight(1)
|
| 951 | )
|
| 952 | .add(
|
| 953 | LootItem.lootTableItem(Items.DIAMOND_PICKAXE)
|
| 954 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 955 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.8F)))
|
| 956 | .setWeight(1)
|
| 957 | )
|
| 958 | .add(LootItem.lootTableItem(Items.DIAMOND).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))).setWeight(1))
|
| 959 | .add(
|
| 960 | LootItem.lootTableItem(Items.COMPASS)
|
| 961 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 962 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.8F)))
|
| 963 | .setWeight(1)
|
| 964 | )
|
| 965 | .add(LootItem.lootTableItem(Items.BUCKET).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))).setWeight(1))
|
| 966 | .add(
|
| 967 | LootItem.lootTableItem(Items.GOLDEN_AXE)
|
| 968 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 969 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.8F)))
|
| 970 | .setWeight(4)
|
| 971 | )
|
| 972 | .add(
|
| 973 | LootItem.lootTableItem(Items.GOLDEN_PICKAXE)
|
| 974 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 975 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.8F)))
|
| 976 | .setWeight(4)
|
| 977 | )
|
| 978 | .add(LootItem.lootTableItem(Items.BAMBOO_PLANKS).apply(SetItemCountFunction.setCount(ContextIntProviders.between(5, 15))).setWeight(10))
|
| 979 | .add(LootItem.lootTableItem(Items.BAKED_POTATO).apply(SetItemCountFunction.setCount(ContextIntProviders.between(6, 10))).setWeight(10))
|
| 980 | )
|
| 981 | );
|
| 982 | this.output
|
| 983 | .accept(
|
| 984 | BuiltInLootTables.TRIAL_CHAMBERS_CORRIDOR,
|
| 985 | LootTable.lootTable()
|
| 986 | .withPool(
|
| 987 | LootPool.lootPool()
|
| 988 | .setRolls(ContextIntProviders.between(1, 3))
|
| 989 | .add(
|
| 990 | LootItem.lootTableItem(Items.IRON_AXE)
|
| 991 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 992 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.4F, 0.9F)))
|
| 993 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 994 | .setWeight(1)
|
| 995 | )
|
| 996 | .add(LootItem.lootTableItem(Items.HONEYCOMB).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))).setWeight(1))
|
| 997 | .add(
|
| 998 | LootItem.lootTableItem(Items.STONE_AXE)
|
| 999 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1000 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.8F)))
|
| 1001 | .setWeight(2)
|
| 1002 | )
|
| 1003 | .add(
|
| 1004 | LootItem.lootTableItem(Items.STONE_PICKAXE)
|
| 1005 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1006 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.8F)))
|
| 1007 | .setWeight(2)
|
| 1008 | )
|
| 1009 | .add(LootItem.lootTableItem(Items.ENDER_PEARL).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))).setWeight(2))
|
| 1010 | .add(LootItem.lootTableItem(Items.BAMBOO_HANGING_SIGN).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))).setWeight(2))
|
| 1011 | .add(LootItem.lootTableItem(Items.BAMBOO_PLANKS).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 6))).setWeight(2))
|
| 1012 | .add(LootItem.lootTableItem(Items.SCAFFOLDING).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 10))).setWeight(2))
|
| 1013 | .add(LootItem.lootTableItem(Items.TORCH).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 6))).setWeight(2))
|
| 1014 | .add(LootItem.lootTableItem(Items.TUFF).apply(SetItemCountFunction.setCount(ContextIntProviders.between(8, 20))).setWeight(3))
|
| 1015 | )
|
| 1016 | );
|
| 1017 | Holder.Reference<LootTable> trialChambersRewardRare = this.output
|
| 1018 | .accept(
|
| 1019 | BuiltInLootTables.TRIAL_CHAMBERS_REWARD_RARE,
|
| 1020 | LootTable.lootTable()
|
| 1021 | .withPool(
|
| 1022 | LootPool.lootPool()
|
| 1023 | .setRolls(ContextIntProviders.exactly(1))
|
| 1024 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1025 | .add(LootItem.lootTableItem(Items.SHIELD).setWeight(3).apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.5F, 1.0F))))
|
| 1026 | .add(
|
| 1027 | LootItem.lootTableItem(Items.BOW)
|
| 1028 | .setWeight(3)
|
| 1029 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(5, 15)))
|
| 1030 | )
|
| 1031 | .add(
|
| 1032 | LootItem.lootTableItem(Items.CROSSBOW)
|
| 1033 | .setWeight(2)
|
| 1034 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(5, 20)))
|
| 1035 | )
|
| 1036 | .add(
|
| 1037 | LootItem.lootTableItem(Items.IRON_AXE)
|
| 1038 | .setWeight(2)
|
| 1039 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(0, 10)))
|
| 1040 | )
|
| 1041 | .add(
|
| 1042 | LootItem.lootTableItem(Items.IRON_CHESTPLATE)
|
| 1043 | .setWeight(2)
|
| 1044 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(0, 10)))
|
| 1045 | )
|
| 1046 | .add(LootItem.lootTableItem(Items.GOLDEN_CARROT).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 1047 | .add(
|
| 1048 | LootItem.lootTableItem(Items.BOOK)
|
| 1049 | .setWeight(2)
|
| 1050 | .apply(
|
| 1051 | new EnchantRandomlyFunction.Builder()
|
| 1052 | .withOneOf(
|
| 1053 | HolderSet.direct(
|
| 1054 | this.enchantments.getOrThrow(Enchantments.SHARPNESS),
|
| 1055 | this.enchantments.getOrThrow(Enchantments.BANE_OF_ARTHROPODS),
|
| 1056 | this.enchantments.getOrThrow(Enchantments.EFFICIENCY),
|
| 1057 | this.enchantments.getOrThrow(Enchantments.FORTUNE),
|
| 1058 | this.enchantments.getOrThrow(Enchantments.SILK_TOUCH),
|
| 1059 | this.enchantments.getOrThrow(Enchantments.FEATHER_FALLING)
|
| 1060 | )
|
| 1061 | )
|
| 1062 | )
|
| 1063 | )
|
| 1064 | .add(
|
| 1065 | LootItem.lootTableItem(Items.BOOK)
|
| 1066 | .setWeight(2)
|
| 1067 | .apply(
|
| 1068 | new EnchantRandomlyFunction.Builder()
|
| 1069 | .withOneOf(
|
| 1070 | HolderSet.direct(
|
| 1071 | this.enchantments.getOrThrow(Enchantments.RIPTIDE),
|
| 1072 | this.enchantments.getOrThrow(Enchantments.LOYALTY),
|
| 1073 | this.enchantments.getOrThrow(Enchantments.CHANNELING),
|
| 1074 | this.enchantments.getOrThrow(Enchantments.IMPALING),
|
| 1075 | this.enchantments.getOrThrow(Enchantments.MENDING)
|
| 1076 | )
|
| 1077 | )
|
| 1078 | )
|
| 1079 | )
|
| 1080 | .add(
|
| 1081 | LootItem.lootTableItem(Items.DIAMOND_CHESTPLATE)
|
| 1082 | .setWeight(1)
|
| 1083 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(5, 15)))
|
| 1084 | )
|
| 1085 | .add(
|
| 1086 | LootItem.lootTableItem(Items.DIAMOND_AXE)
|
| 1087 | .setWeight(1)
|
| 1088 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(5, 15)))
|
| 1089 | )
|
| 1090 | )
|
| 1091 | );
|
| 1092 | Holder.Reference<LootTable> trialChambersRewardCommon = this.output
|
| 1093 | .accept(
|
| 1094 | BuiltInLootTables.TRIAL_CHAMBERS_REWARD_COMMON,
|
| 1095 | LootTable.lootTable()
|
| 1096 | .withPool(
|
| 1097 | LootPool.lootPool()
|
| 1098 | .setRolls(ContextIntProviders.exactly(1))
|
| 1099 | .add(LootItem.lootTableItem(Items.ARROW).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))))
|
| 1100 | .add(
|
| 1101 | LootItem.lootTableItem(Items.TIPPED_ARROW)
|
| 1102 | .setWeight(4)
|
| 1103 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8)))
|
| 1104 | .apply(SetPotionFunction.setPotion(Potions.POISON))
|
| 1105 | )
|
| 1106 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1107 | .add(LootItem.lootTableItem(Items.WIND_CHARGE).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1108 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 1109 | .add(LootItem.lootTableItem(Items.HONEY_BOTTLE).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 1110 | .add(
|
| 1111 | LootItem.lootTableItem(Items.OMINOUS_BOTTLE)
|
| 1112 | .setWeight(2)
|
| 1113 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1114 | .apply(SetOminousBottleAmplifierFunction.setAmplifier(ContextIntProviders.between(0, 1)))
|
| 1115 | )
|
| 1116 | .add(LootItem.lootTableItem(Items.WIND_CHARGE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 12))))
|
| 1117 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 1118 | )
|
| 1119 | );
|
| 1120 | Holder.Reference<LootTable> trialChambersRewardUnique = this.output
|
| 1121 | .accept(
|
| 1122 | BuiltInLootTables.TRIAL_CHAMBERS_REWARD_UNIQUE,
|
| 1123 | LootTable.lootTable()
|
| 1124 | .withPool(
|
| 1125 | LootPool.lootPool()
|
| 1126 | .setRolls(ContextIntProviders.exactly(1))
|
| 1127 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(4))
|
| 1128 | .add(LootItem.lootTableItem(Items.BOLT_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(3))
|
| 1129 | .add(LootItem.lootTableItem(Items.GUSTER_BANNER_PATTERN).setWeight(2))
|
| 1130 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_PRECIPICE).setWeight(2))
|
| 1131 | .add(LootItem.lootTableItem(Items.TRIDENT).setWeight(1))
|
| 1132 | )
|
| 1133 | );
|
| 1134 | this.output
|
| 1135 | .accept(
|
| 1136 | BuiltInLootTables.TRIAL_CHAMBERS_REWARD,
|
| 1137 | LootTable.lootTable()
|
| 1138 | .withPool(
|
| 1139 | LootPool.lootPool()
|
| 1140 | .setRolls(ContextIntProviders.exactly(1))
|
| 1141 | .add(NestedLootTable.lootTableReference(trialChambersRewardRare).setWeight(8))
|
| 1142 | .add(NestedLootTable.lootTableReference(trialChambersRewardCommon).setWeight(2))
|
| 1143 | )
|
| 1144 | .withPool(LootPool.lootPool().setRolls(ContextIntProviders.between(1, 3)).add(NestedLootTable.lootTableReference(trialChambersRewardCommon)))
|
| 1145 | .withPool(
|
| 1146 | LootPool.lootPool()
|
| 1147 | .setRolls(ContextIntProviders.exactly(1))
|
| 1148 | .when(LootItemRandomChanceCondition.randomChance(0.25F))
|
| 1149 | .add(NestedLootTable.lootTableReference(trialChambersRewardUnique))
|
| 1150 | )
|
| 1151 | );
|
| 1152 | Holder.Reference<LootTable> trialChambersRewardOminousRare = this.output
|
| 1153 | .accept(
|
| 1154 | BuiltInLootTables.TRIAL_CHAMBERS_REWARD_OMINOUS_RARE,
|
| 1155 | LootTable.lootTable()
|
| 1156 | .withPool(
|
| 1157 | LootPool.lootPool()
|
| 1158 | .setRolls(ContextIntProviders.exactly(1))
|
| 1159 | .add(LootItem.lootTableItem(Items.EMERALD_BLOCK).setWeight(5))
|
| 1160 | .add(LootItem.lootTableItem(Items.IRON_BLOCK).setWeight(4))
|
| 1161 | .add(
|
| 1162 | LootItem.lootTableItem(Items.CROSSBOW)
|
| 1163 | .setWeight(4)
|
| 1164 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(5, 20)))
|
| 1165 | )
|
| 1166 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(3))
|
| 1167 | .add(
|
| 1168 | LootItem.lootTableItem(Items.DIAMOND_AXE)
|
| 1169 | .setWeight(3)
|
| 1170 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(10, 20)))
|
| 1171 | )
|
| 1172 | .add(
|
| 1173 | LootItem.lootTableItem(Items.DIAMOND_CHESTPLATE)
|
| 1174 | .setWeight(3)
|
| 1175 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(10, 20)))
|
| 1176 | )
|
| 1177 | .add(
|
| 1178 | LootItem.lootTableItem(Items.BOOK)
|
| 1179 | .setWeight(2)
|
| 1180 | .apply(
|
| 1181 | new EnchantRandomlyFunction.Builder()
|
| 1182 | .withOneOf(
|
| 1183 | HolderSet.direct(
|
| 1184 | this.enchantments.getOrThrow(Enchantments.KNOCKBACK),
|
| 1185 | this.enchantments.getOrThrow(Enchantments.PUNCH),
|
| 1186 | this.enchantments.getOrThrow(Enchantments.SMITE),
|
| 1187 | this.enchantments.getOrThrow(Enchantments.LOOTING),
|
| 1188 | this.enchantments.getOrThrow(Enchantments.MULTISHOT)
|
| 1189 | )
|
| 1190 | )
|
| 1191 | )
|
| 1192 | )
|
| 1193 | .add(
|
| 1194 | LootItem.lootTableItem(Items.BOOK)
|
| 1195 | .setWeight(2)
|
| 1196 | .apply(
|
| 1197 | new EnchantRandomlyFunction.Builder()
|
| 1198 | .withOneOf(HolderSet.direct(this.enchantments.getOrThrow(Enchantments.BREACH), this.enchantments.getOrThrow(Enchantments.DENSITY)))
|
| 1199 | )
|
| 1200 | )
|
| 1201 | .add(
|
| 1202 | LootItem.lootTableItem(Items.BOOK)
|
| 1203 | .setWeight(2)
|
| 1204 | .apply(new SetEnchantmentsFunction.Builder().withEnchantment(this.enchantments.getOrThrow(Enchantments.WIND_BURST), ContextIntProviders.exactly(1)))
|
| 1205 | )
|
| 1206 | .add(LootItem.lootTableItem(Items.DIAMOND_BLOCK).setWeight(1))
|
| 1207 | )
|
| 1208 | );
|
| 1209 | Holder.Reference<LootTable> trialChambersRewardOminousCommon = this.output
|
| 1210 | .accept(
|
| 1211 | BuiltInLootTables.TRIAL_CHAMBERS_REWARD_OMINOUS_COMMON,
|
| 1212 | LootTable.lootTable()
|
| 1213 | .withPool(
|
| 1214 | LootPool.lootPool()
|
| 1215 | .setRolls(ContextIntProviders.exactly(1))
|
| 1216 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 10))))
|
| 1217 | .add(LootItem.lootTableItem(Items.WIND_CHARGE).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(8, 12))))
|
| 1218 | .add(
|
| 1219 | LootItem.lootTableItem(Items.TIPPED_ARROW)
|
| 1220 | .setWeight(3)
|
| 1221 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 12)))
|
| 1222 | .apply(SetPotionFunction.setPotion(Potions.STRONG_SLOWNESS))
|
| 1223 | )
|
| 1224 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 3))))
|
| 1225 | .add(
|
| 1226 | LootItem.lootTableItem(Items.OMINOUS_BOTTLE)
|
| 1227 | .setWeight(1)
|
| 1228 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1229 | .apply(SetOminousBottleAmplifierFunction.setAmplifier(ContextIntProviders.between(2, 4)))
|
| 1230 | )
|
| 1231 | )
|
| 1232 | );
|
| 1233 | Holder.Reference<LootTable> trialChambersRewardOminousUnique = this.output
|
| 1234 | .accept(
|
| 1235 | BuiltInLootTables.TRIAL_CHAMBERS_REWARD_OMINOUS_UNIQUE,
|
| 1236 | LootTable.lootTable()
|
| 1237 | .withPool(
|
| 1238 | LootPool.lootPool()
|
| 1239 | .setRolls(ContextIntProviders.exactly(1))
|
| 1240 | .add(LootItem.lootTableItem(Items.ENCHANTED_GOLDEN_APPLE).setWeight(3))
|
| 1241 | .add(LootItem.lootTableItem(Items.FLOW_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(3))
|
| 1242 | .add(LootItem.lootTableItem(Items.FLOW_BANNER_PATTERN).setWeight(2))
|
| 1243 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_CREATOR).setWeight(1))
|
| 1244 | .add(LootItem.lootTableItem(Items.HEAVY_CORE).setWeight(1))
|
| 1245 | )
|
| 1246 | );
|
| 1247 | this.output
|
| 1248 | .accept(
|
| 1249 | BuiltInLootTables.TRIAL_CHAMBERS_REWARD_OMINOUS,
|
| 1250 | LootTable.lootTable()
|
| 1251 | .withPool(
|
| 1252 | LootPool.lootPool()
|
| 1253 | .setRolls(ContextIntProviders.exactly(1))
|
| 1254 | .add(NestedLootTable.lootTableReference(trialChambersRewardOminousRare).setWeight(8))
|
| 1255 | .add(NestedLootTable.lootTableReference(trialChambersRewardOminousCommon).setWeight(2))
|
| 1256 | )
|
| 1257 | .withPool(LootPool.lootPool().setRolls(ContextIntProviders.between(1, 3)).add(NestedLootTable.lootTableReference(trialChambersRewardOminousCommon)))
|
| 1258 | .withPool(
|
| 1259 | LootPool.lootPool()
|
| 1260 | .setRolls(ContextIntProviders.exactly(1))
|
| 1261 | .when(LootItemRandomChanceCondition.randomChance(0.75F))
|
| 1262 | .add(NestedLootTable.lootTableReference(trialChambersRewardOminousUnique))
|
| 1263 | )
|
| 1264 | );
|
| 1265 | this.spawnerLootTables();
|
| 1266 | this.abandonedCampLootTables();
|
| 1267 | }
|
| 1268 |
|
| 1269 | public void spawnerLootTables() {
|
| 1270 | this.output
|
| 1271 | .accept(
|
| 1272 | BuiltInLootTables.SPAWNER_TRIAL_CHAMBER_KEY,
|
| 1273 | LootTable.lootTable().withPool(LootPool.lootPool().setRolls(ContextIntProviders.exactly(1)).add(LootItem.lootTableItem(Items.TRIAL_KEY)))
|
| 1274 | );
|
| 1275 | this.output
|
| 1276 | .accept(
|
| 1277 | BuiltInLootTables.SPAWNER_TRIAL_CHAMBER_CONSUMABLES,
|
| 1278 | LootTable.lootTable()
|
| 1279 | .withPool(
|
| 1280 | LootPool.lootPool()
|
| 1281 | .setRolls(ContextIntProviders.exactly(1))
|
| 1282 | .add(LootItem.lootTableItem(Items.COOKED_CHICKEN).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1283 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1284 | .add(LootItem.lootTableItem(Items.BAKED_POTATO).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1285 | .add(
|
| 1286 | LootItem.lootTableItem(Items.POTION)
|
| 1287 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1288 | .apply(SetPotionFunction.setPotion(Potions.REGENERATION))
|
| 1289 | )
|
| 1290 | .add(
|
| 1291 | LootItem.lootTableItem(Items.POTION)
|
| 1292 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1293 | .apply(SetPotionFunction.setPotion(Potions.SWIFTNESS))
|
| 1294 | )
|
| 1295 | )
|
| 1296 | );
|
| 1297 | this.output
|
| 1298 | .accept(
|
| 1299 | BuiltInLootTables.SPAWNER_OMINOUS_TRIAL_CHAMBER_KEY,
|
| 1300 | LootTable.lootTable().withPool(LootPool.lootPool().setRolls(ContextIntProviders.exactly(1)).add(LootItem.lootTableItem(Items.OMINOUS_TRIAL_KEY)))
|
| 1301 | );
|
| 1302 | this.output
|
| 1303 | .accept(
|
| 1304 | BuiltInLootTables.SPAWNER_OMINOUS_TRIAL_CHAMBER_CONSUMABLES,
|
| 1305 | LootTable.lootTable()
|
| 1306 | .withPool(
|
| 1307 | LootPool.lootPool()
|
| 1308 | .setRolls(ContextIntProviders.exactly(1))
|
| 1309 | .add(LootItem.lootTableItem(Items.COOKED_BEEF).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 1310 | .add(LootItem.lootTableItem(Items.BAKED_POTATO).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1311 | .add(LootItem.lootTableItem(Items.GOLDEN_CARROT).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 1312 | .add(
|
| 1313 | LootItem.lootTableItem(Items.POTION)
|
| 1314 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1315 | .apply(SetPotionFunction.setPotion(Potions.REGENERATION))
|
| 1316 | )
|
| 1317 | .add(
|
| 1318 | LootItem.lootTableItem(Items.POTION)
|
| 1319 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1320 | .apply(SetPotionFunction.setPotion(Potions.STRENGTH))
|
| 1321 | )
|
| 1322 | )
|
| 1323 | );
|
| 1324 | this.output
|
| 1325 | .accept(
|
| 1326 | BuiltInLootTables.SPAWNER_TRIAL_ITEMS_TO_DROP_WHEN_OMINOUS,
|
| 1327 | LootTable.lootTable()
|
| 1328 | .withPool(
|
| 1329 | LootPool.lootPool()
|
| 1330 | .setRolls(ContextIntProviders.exactly(1))
|
| 1331 | .add(
|
| 1332 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 1333 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1334 | .apply(SetPotionFunction.setPotion(Potions.WIND_CHARGED))
|
| 1335 | )
|
| 1336 | .add(
|
| 1337 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 1338 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1339 | .apply(SetPotionFunction.setPotion(Potions.OOZING))
|
| 1340 | )
|
| 1341 | .add(
|
| 1342 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 1343 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1344 | .apply(SetPotionFunction.setPotion(Potions.WEAVING))
|
| 1345 | )
|
| 1346 | .add(
|
| 1347 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 1348 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1349 | .apply(SetPotionFunction.setPotion(Potions.INFESTED))
|
| 1350 | )
|
| 1351 | .add(
|
| 1352 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 1353 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1354 | .apply(SetPotionFunction.setPotion(Potions.STRENGTH))
|
| 1355 | )
|
| 1356 | .add(
|
| 1357 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 1358 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1359 | .apply(SetPotionFunction.setPotion(Potions.SWIFTNESS))
|
| 1360 | )
|
| 1361 | .add(
|
| 1362 | LootItem.lootTableItem(Items.LINGERING_POTION)
|
| 1363 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1364 | .apply(SetPotionFunction.setPotion(Potions.SLOW_FALLING))
|
| 1365 | )
|
| 1366 | )
|
| 1367 | .withPool(
|
| 1368 | LootPool.lootPool()
|
| 1369 | .setRolls(ContextIntProviders.exactly(1))
|
| 1370 | .add(LootItem.lootTableItem(Items.ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1371 | .add(
|
| 1372 | LootItem.lootTableItem(Items.ARROW)
|
| 1373 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1374 | .apply(SetPotionFunction.setPotion(Potions.POISON))
|
| 1375 | )
|
| 1376 | .add(
|
| 1377 | LootItem.lootTableItem(Items.ARROW)
|
| 1378 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1379 | .apply(SetPotionFunction.setPotion(Potions.STRONG_SLOWNESS))
|
| 1380 | )
|
| 1381 | .add(LootItem.lootTableItem(Items.FIRE_CHARGE).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1382 | .add(LootItem.lootTableItem(Items.WIND_CHARGE).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1383 | )
|
| 1384 | );
|
| 1385 | }
|
| 1386 |
|
| 1387 | public LootTable.Builder shipwreckSupplyLootTable() {
|
| 1388 | return LootTable.lootTable()
|
| 1389 | .withPool(
|
| 1390 | LootPool.lootPool()
|
| 1391 | .setRolls(ContextIntProviders.between(3, 10))
|
| 1392 | .add(LootItem.lootTableItem(Items.PAPER).setWeight(8).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 12))))
|
| 1393 | .add(LootItem.lootTableItem(Items.POTATO).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 1394 | .add(LootItem.lootTableItem(Items.MOSS_BLOCK).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 1395 | .add(LootItem.lootTableItem(Items.POISONOUS_POTATO).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 1396 | .add(LootItem.lootTableItem(Items.CARROT).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))))
|
| 1397 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(8, 21))))
|
| 1398 | .add(
|
| 1399 | LootItem.lootTableItem(Items.SUSPICIOUS_STEW)
|
| 1400 | .setWeight(10)
|
| 1401 | .apply(
|
| 1402 | SetStewEffectFunction.stewEffect()
|
| 1403 | .withEffect(MobEffects.NIGHT_VISION, ContextIntProviders.between(7, 10))
|
| 1404 | .withEffect(MobEffects.JUMP_BOOST, ContextIntProviders.between(7, 10))
|
| 1405 | .withEffect(MobEffects.WEAKNESS, ContextIntProviders.between(6, 8))
|
| 1406 | .withEffect(MobEffects.BLINDNESS, ContextIntProviders.between(5, 7))
|
| 1407 | .withEffect(MobEffects.POISON, ContextIntProviders.between(10, 20))
|
| 1408 | .withEffect(MobEffects.SATURATION, ContextIntProviders.between(7, 10))
|
| 1409 | )
|
| 1410 | )
|
| 1411 | .add(LootItem.lootTableItem(Items.COAL).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))))
|
| 1412 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(5, 24))))
|
| 1413 | .add(LootItem.lootTableItem(Blocks.PUMPKIN).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1414 | .add(LootItem.lootTableItem(Blocks.BAMBOO).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1415 | .add(LootItem.lootTableItem(Items.GUNPOWDER).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1416 | .add(LootItem.lootTableItem(Blocks.TNT).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 1417 | .add(LootItem.lootTableItem(Items.LEATHER_HELMET).setWeight(3).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 1418 | .add(LootItem.lootTableItem(Items.LEATHER_CHESTPLATE).setWeight(3).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 1419 | .add(LootItem.lootTableItem(Items.LEATHER_LEGGINGS).setWeight(3).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 1420 | .add(LootItem.lootTableItem(Items.LEATHER_BOOTS).setWeight(3).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 1421 | )
|
| 1422 | .withPool(
|
| 1423 | LootPool.lootPool()
|
| 1424 | .setRolls(ContextIntProviders.exactly(1))
|
| 1425 | .add(EmptyLootItem.emptyItem().setWeight(5))
|
| 1426 | .add(LootItem.lootTableItem(Items.COAST_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2))))
|
| 1427 | )
|
| 1428 | .withPool(
|
| 1429 | LootPool.lootPool()
|
| 1430 | .setRolls(ContextIntProviders.exactly(1))
|
| 1431 | .add(EmptyLootItem.emptyItem().setWeight(148))
|
| 1432 | .add(LootItem.lootTableItem(Items.COPPER_NAUTILUS_ARMOR).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1433 | .add(LootItem.lootTableItem(Items.IRON_NAUTILUS_ARMOR).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1434 | .add(LootItem.lootTableItem(Items.GOLDEN_NAUTILUS_ARMOR).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1435 | .add(LootItem.lootTableItem(Items.DIAMOND_NAUTILUS_ARMOR).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1436 | );
|
| 1437 | }
|
| 1438 |
|
| 1439 | public LootTable.Builder shipwreckMapLootTable() {
|
| 1440 | return LootTable.lootTable()
|
| 1441 | .withPool(LootPool.lootPool().setRolls(ContextIntProviders.exactly(1)).add(this.buriedTreasureMapItem()))
|
| 1442 | .withPool(
|
| 1443 | LootPool.lootPool()
|
| 1444 | .setRolls(ContextIntProviders.exactly(3))
|
| 1445 | .add(LootItem.lootTableItem(Items.COMPASS))
|
| 1446 | .add(LootItem.lootTableItem(Items.MAP))
|
| 1447 | .add(LootItem.lootTableItem(Items.CLOCK))
|
| 1448 | .add(LootItem.lootTableItem(Items.PAPER).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 10))))
|
| 1449 | .add(LootItem.lootTableItem(Items.FEATHER).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1450 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1451 | )
|
| 1452 | .withPool(
|
| 1453 | LootPool.lootPool()
|
| 1454 | .setRolls(ContextIntProviders.exactly(1))
|
| 1455 | .add(EmptyLootItem.emptyItem().setWeight(5))
|
| 1456 | .add(LootItem.lootTableItem(Items.COAST_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2))))
|
| 1457 | )
|
| 1458 | .withPool(
|
| 1459 | LootPool.lootPool()
|
| 1460 | .setRolls(ContextIntProviders.exactly(1))
|
| 1461 | .add(EmptyLootItem.emptyItem().setWeight(148))
|
| 1462 | .add(LootItem.lootTableItem(Items.COPPER_NAUTILUS_ARMOR).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1463 | .add(LootItem.lootTableItem(Items.IRON_NAUTILUS_ARMOR).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1464 | .add(LootItem.lootTableItem(Items.GOLDEN_NAUTILUS_ARMOR).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1465 | .add(LootItem.lootTableItem(Items.DIAMOND_NAUTILUS_ARMOR).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1466 | );
|
| 1467 | }
|
| 1468 |
|
| 1469 | public LootTable.Builder bastionHoglinStableLootTable() {
|
| 1470 | return LootTable.lootTable()
|
| 1471 | .withPool(
|
| 1472 | LootPool.lootPool()
|
| 1473 | .setRolls(ContextIntProviders.exactly(1))
|
| 1474 | .add(
|
| 1475 | LootItem.lootTableItem(Items.DIAMOND_SHOVEL)
|
| 1476 | .setWeight(15)
|
| 1477 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.8F)))
|
| 1478 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1479 | )
|
| 1480 | .add(
|
| 1481 | LootItem.lootTableItem(Items.DIAMOND_PICKAXE)
|
| 1482 | .setWeight(12)
|
| 1483 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.15F, 0.95F)))
|
| 1484 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1485 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1486 | )
|
| 1487 | .add(LootItem.lootTableItem(Items.NETHERITE_SCRAP).setWeight(8).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1488 | .add(LootItem.lootTableItem(Items.ANCIENT_DEBRIS).setWeight(12).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1489 | .add(LootItem.lootTableItem(Items.ANCIENT_DEBRIS).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2))))
|
| 1490 | .add(LootItem.lootTableItem(Items.SADDLE).setWeight(12).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1491 | .add(LootItem.lootTableItem(Blocks.GOLD_BLOCK).setWeight(16).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1492 | .add(LootItem.lootTableItem(Items.GOLDEN_CARROT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(8, 17))))
|
| 1493 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1494 | )
|
| 1495 | .withPool(
|
| 1496 | LootPool.lootPool()
|
| 1497 | .setRolls(ContextIntProviders.between(3, 4))
|
| 1498 | .add(
|
| 1499 | LootItem.lootTableItem(Items.GOLDEN_AXE)
|
| 1500 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1501 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1502 | )
|
| 1503 | .add(LootItem.lootTableItem(Blocks.CRYING_OBSIDIAN).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1504 | .add(LootItem.lootTableItem(Blocks.GLOWSTONE).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 6))))
|
| 1505 | .add(LootItem.lootTableItem(Blocks.GILDED_BLACKSTONE).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))))
|
| 1506 | .add(LootItem.lootTableItem(Blocks.SOUL_SAND).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 1507 | .add(LootItem.lootTableItem(Blocks.CRIMSON_NYLIUM).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 1508 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))))
|
| 1509 | .add(LootItem.lootTableItem(Items.LEATHER).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1510 | .add(LootItem.lootTableItem(Items.ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(5, 17))))
|
| 1511 | .add(LootItem.lootTableItem(Items.STRING).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 8))))
|
| 1512 | .add(LootItem.lootTableItem(Items.PORKCHOP).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))))
|
| 1513 | .add(LootItem.lootTableItem(Items.COOKED_PORKCHOP).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))))
|
| 1514 | .add(LootItem.lootTableItem(Blocks.CRIMSON_FUNGUS).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 1515 | .add(LootItem.lootTableItem(Blocks.CRIMSON_ROOTS).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 1516 | )
|
| 1517 | .withPool(
|
| 1518 | LootPool.lootPool()
|
| 1519 | .setRolls(ContextIntProviders.exactly(1))
|
| 1520 | .add(EmptyLootItem.emptyItem().setWeight(11))
|
| 1521 | .add(LootItem.lootTableItem(Items.SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 1522 | )
|
| 1523 | .withPool(
|
| 1524 | LootPool.lootPool()
|
| 1525 | .setRolls(ContextIntProviders.exactly(1))
|
| 1526 | .add(EmptyLootItem.emptyItem().setWeight(9))
|
| 1527 | .add(LootItem.lootTableItem(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE).setWeight(1))
|
| 1528 | );
|
| 1529 | }
|
| 1530 |
|
| 1531 | public LootTable.Builder bastionBridgeLootTable() {
|
| 1532 | return LootTable.lootTable()
|
| 1533 | .withPool(
|
| 1534 | LootPool.lootPool()
|
| 1535 | .setRolls(ContextIntProviders.exactly(1))
|
| 1536 | .add(LootItem.lootTableItem(Blocks.LODESTONE).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1537 | )
|
| 1538 | .withPool(
|
| 1539 | LootPool.lootPool()
|
| 1540 | .setRolls(ContextIntProviders.between(1, 2))
|
| 1541 | .add(
|
| 1542 | LootItem.lootTableItem(Items.CROSSBOW)
|
| 1543 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.1F, 0.5F)))
|
| 1544 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1545 | )
|
| 1546 | .add(LootItem.lootTableItem(Items.SPECTRAL_ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(10, 28))))
|
| 1547 | .add(LootItem.lootTableItem(Blocks.GILDED_BLACKSTONE).apply(SetItemCountFunction.setCount(ContextIntProviders.between(8, 12))))
|
| 1548 | .add(LootItem.lootTableItem(Blocks.CRYING_OBSIDIAN).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 8))))
|
| 1549 | .add(LootItem.lootTableItem(Blocks.GOLD_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1550 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 9))))
|
| 1551 | .add(LootItem.lootTableItem(Items.IRON_INGOT).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 9))))
|
| 1552 | .add(LootItem.lootTableItem(Items.GOLDEN_SWORD).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1553 | .add(
|
| 1554 | LootItem.lootTableItem(Items.GOLDEN_CHESTPLATE)
|
| 1555 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1556 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1557 | )
|
| 1558 | .add(
|
| 1559 | LootItem.lootTableItem(Items.GOLDEN_HELMET)
|
| 1560 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1561 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1562 | )
|
| 1563 | .add(
|
| 1564 | LootItem.lootTableItem(Items.GOLDEN_LEGGINGS)
|
| 1565 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1566 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1567 | )
|
| 1568 | .add(
|
| 1569 | LootItem.lootTableItem(Items.GOLDEN_BOOTS)
|
| 1570 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1571 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1572 | )
|
| 1573 | .add(
|
| 1574 | LootItem.lootTableItem(Items.GOLDEN_AXE)
|
| 1575 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1576 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1577 | )
|
| 1578 | )
|
| 1579 | .withPool(
|
| 1580 | LootPool.lootPool()
|
| 1581 | .setRolls(ContextIntProviders.between(2, 4))
|
| 1582 | .add(LootItem.lootTableItem(Items.STRING).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 6))))
|
| 1583 | .add(LootItem.lootTableItem(Items.LEATHER).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1584 | .add(LootItem.lootTableItem(Items.ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(5, 17))))
|
| 1585 | .add(LootItem.lootTableItem(Items.IRON_NUGGET).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 1586 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 1587 | )
|
| 1588 | .withPool(
|
| 1589 | LootPool.lootPool()
|
| 1590 | .setRolls(ContextIntProviders.exactly(1))
|
| 1591 | .add(EmptyLootItem.emptyItem().setWeight(11))
|
| 1592 | .add(LootItem.lootTableItem(Items.SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 1593 | )
|
| 1594 | .withPool(
|
| 1595 | LootPool.lootPool()
|
| 1596 | .setRolls(ContextIntProviders.exactly(1))
|
| 1597 | .add(EmptyLootItem.emptyItem().setWeight(9))
|
| 1598 | .add(LootItem.lootTableItem(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE).setWeight(1))
|
| 1599 | );
|
| 1600 | }
|
| 1601 |
|
| 1602 | public LootTable.Builder endCityTreasureLootTable() {
|
| 1603 | return LootTable.lootTable()
|
| 1604 | .withPool(
|
| 1605 | LootPool.lootPool()
|
| 1606 | .setRolls(ContextIntProviders.between(2, 6))
|
| 1607 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 1608 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 8))))
|
| 1609 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 1610 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 1611 | .add(LootItem.lootTableItem(Items.BEETROOT_SEEDS).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 10))))
|
| 1612 | .add(LootItem.lootTableItem(Items.SADDLE).setWeight(3))
|
| 1613 | .add(LootItem.lootTableItem(Items.COPPER_HORSE_ARMOR))
|
| 1614 | .add(LootItem.lootTableItem(Items.IRON_HORSE_ARMOR))
|
| 1615 | .add(LootItem.lootTableItem(Items.GOLDEN_HORSE_ARMOR))
|
| 1616 | .add(LootItem.lootTableItem(Items.DIAMOND_HORSE_ARMOR))
|
| 1617 | .add(
|
| 1618 | LootItem.lootTableItem(Items.DIAMOND_SWORD)
|
| 1619 | .setWeight(3)
|
| 1620 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1621 | )
|
| 1622 | .add(
|
| 1623 | LootItem.lootTableItem(Items.DIAMOND_SPEAR)
|
| 1624 | .setWeight(3)
|
| 1625 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1626 | )
|
| 1627 | .add(
|
| 1628 | LootItem.lootTableItem(Items.DIAMOND_BOOTS)
|
| 1629 | .setWeight(3)
|
| 1630 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1631 | )
|
| 1632 | .add(
|
| 1633 | LootItem.lootTableItem(Items.DIAMOND_CHESTPLATE)
|
| 1634 | .setWeight(3)
|
| 1635 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1636 | )
|
| 1637 | .add(
|
| 1638 | LootItem.lootTableItem(Items.DIAMOND_LEGGINGS)
|
| 1639 | .setWeight(3)
|
| 1640 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1641 | )
|
| 1642 | .add(
|
| 1643 | LootItem.lootTableItem(Items.DIAMOND_HELMET)
|
| 1644 | .setWeight(3)
|
| 1645 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1646 | )
|
| 1647 | .add(
|
| 1648 | LootItem.lootTableItem(Items.DIAMOND_PICKAXE)
|
| 1649 | .setWeight(3)
|
| 1650 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1651 | )
|
| 1652 | .add(
|
| 1653 | LootItem.lootTableItem(Items.DIAMOND_SHOVEL)
|
| 1654 | .setWeight(3)
|
| 1655 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1656 | )
|
| 1657 | .add(
|
| 1658 | LootItem.lootTableItem(Items.IRON_SWORD)
|
| 1659 | .setWeight(3)
|
| 1660 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1661 | )
|
| 1662 | .add(
|
| 1663 | LootItem.lootTableItem(Items.IRON_BOOTS)
|
| 1664 | .setWeight(3)
|
| 1665 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1666 | )
|
| 1667 | .add(
|
| 1668 | LootItem.lootTableItem(Items.IRON_CHESTPLATE)
|
| 1669 | .setWeight(3)
|
| 1670 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1671 | )
|
| 1672 | .add(
|
| 1673 | LootItem.lootTableItem(Items.IRON_LEGGINGS)
|
| 1674 | .setWeight(3)
|
| 1675 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1676 | )
|
| 1677 | .add(
|
| 1678 | LootItem.lootTableItem(Items.IRON_HELMET)
|
| 1679 | .setWeight(3)
|
| 1680 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1681 | )
|
| 1682 | .add(
|
| 1683 | LootItem.lootTableItem(Items.IRON_PICKAXE)
|
| 1684 | .setWeight(3)
|
| 1685 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1686 | )
|
| 1687 | .add(
|
| 1688 | LootItem.lootTableItem(Items.IRON_SHOVEL)
|
| 1689 | .setWeight(3)
|
| 1690 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 1691 | )
|
| 1692 | )
|
| 1693 | .withPool(
|
| 1694 | LootPool.lootPool()
|
| 1695 | .setRolls(ContextIntProviders.exactly(1))
|
| 1696 | .add(EmptyLootItem.emptyItem().setWeight(14))
|
| 1697 | .add(LootItem.lootTableItem(Items.SPIRE_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 1698 | );
|
| 1699 | }
|
| 1700 |
|
| 1701 | public LootTable.Builder netherBridgeLootTable() {
|
| 1702 | return LootTable.lootTable()
|
| 1703 | .withPool(
|
| 1704 | LootPool.lootPool()
|
| 1705 | .setRolls(ContextIntProviders.between(2, 4))
|
| 1706 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1707 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1708 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1709 | .add(LootItem.lootTableItem(Items.GOLDEN_SWORD).setWeight(5))
|
| 1710 | .add(LootItem.lootTableItem(Items.GOLDEN_CHESTPLATE).setWeight(5))
|
| 1711 | .add(LootItem.lootTableItem(Items.FLINT_AND_STEEL).setWeight(5))
|
| 1712 | .add(LootItem.lootTableItem(Items.NETHER_WART).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 7))))
|
| 1713 | .add(LootItem.lootTableItem(Items.SADDLE).setWeight(10))
|
| 1714 | .add(LootItem.lootTableItem(Items.GOLDEN_HORSE_ARMOR).setWeight(8))
|
| 1715 | .add(LootItem.lootTableItem(Items.COPPER_HORSE_ARMOR).setWeight(5))
|
| 1716 | .add(LootItem.lootTableItem(Items.IRON_HORSE_ARMOR).setWeight(5))
|
| 1717 | .add(LootItem.lootTableItem(Items.DIAMOND_HORSE_ARMOR).setWeight(3))
|
| 1718 | .add(LootItem.lootTableItem(Blocks.OBSIDIAN).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1719 | )
|
| 1720 | .withPool(
|
| 1721 | LootPool.lootPool()
|
| 1722 | .setRolls(ContextIntProviders.exactly(1))
|
| 1723 | .add(EmptyLootItem.emptyItem().setWeight(14))
|
| 1724 | .add(LootItem.lootTableItem(Items.RIB_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 1725 | );
|
| 1726 | }
|
| 1727 |
|
| 1728 | public LootTable.Builder bastionTreasureLootTable() {
|
| 1729 | return LootTable.lootTable()
|
| 1730 | .withPool(
|
| 1731 | LootPool.lootPool()
|
| 1732 | .setRolls(ContextIntProviders.exactly(3))
|
| 1733 | .add(LootItem.lootTableItem(Items.NETHERITE_INGOT).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1734 | .add(LootItem.lootTableItem(Blocks.ANCIENT_DEBRIS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1735 | .add(LootItem.lootTableItem(Items.NETHERITE_SCRAP).setWeight(8).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1736 | .add(LootItem.lootTableItem(Blocks.ANCIENT_DEBRIS).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2))))
|
| 1737 | .add(
|
| 1738 | LootItem.lootTableItem(Items.DIAMOND_SWORD)
|
| 1739 | .setWeight(6)
|
| 1740 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.8F, 1.0F)))
|
| 1741 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1742 | )
|
| 1743 | .add(
|
| 1744 | LootItem.lootTableItem(Items.DIAMOND_SPEAR)
|
| 1745 | .setWeight(6)
|
| 1746 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.8F, 1.0F)))
|
| 1747 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1748 | )
|
| 1749 | .add(
|
| 1750 | LootItem.lootTableItem(Items.DIAMOND_CHESTPLATE)
|
| 1751 | .setWeight(6)
|
| 1752 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.8F, 1.0F)))
|
| 1753 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1754 | )
|
| 1755 | .add(
|
| 1756 | LootItem.lootTableItem(Items.DIAMOND_HELMET)
|
| 1757 | .setWeight(6)
|
| 1758 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.8F, 1.0F)))
|
| 1759 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1760 | )
|
| 1761 | .add(
|
| 1762 | LootItem.lootTableItem(Items.DIAMOND_LEGGINGS)
|
| 1763 | .setWeight(6)
|
| 1764 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.8F, 1.0F)))
|
| 1765 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1766 | )
|
| 1767 | .add(
|
| 1768 | LootItem.lootTableItem(Items.DIAMOND_BOOTS)
|
| 1769 | .setWeight(6)
|
| 1770 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.8F, 1.0F)))
|
| 1771 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1772 | )
|
| 1773 | .add(LootItem.lootTableItem(Items.DIAMOND_SWORD).setWeight(6))
|
| 1774 | .add(LootItem.lootTableItem(Items.DIAMOND_SPEAR).setWeight(6))
|
| 1775 | .add(LootItem.lootTableItem(Items.DIAMOND_CHESTPLATE).setWeight(5))
|
| 1776 | .add(LootItem.lootTableItem(Items.DIAMOND_HELMET).setWeight(5))
|
| 1777 | .add(LootItem.lootTableItem(Items.DIAMOND_BOOTS).setWeight(5))
|
| 1778 | .add(LootItem.lootTableItem(Items.DIAMOND_LEGGINGS).setWeight(5))
|
| 1779 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 1780 | .add(LootItem.lootTableItem(Items.ENCHANTED_GOLDEN_APPLE).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1781 | )
|
| 1782 | .withPool(
|
| 1783 | LootPool.lootPool()
|
| 1784 | .setRolls(ContextIntProviders.between(3, 4))
|
| 1785 | .add(LootItem.lootTableItem(Items.SPECTRAL_ARROW).apply(SetItemCountFunction.setCount(ContextIntProviders.between(12, 25))))
|
| 1786 | .add(LootItem.lootTableItem(Blocks.GOLD_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))))
|
| 1787 | .add(LootItem.lootTableItem(Blocks.IRON_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))))
|
| 1788 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 9))))
|
| 1789 | .add(LootItem.lootTableItem(Items.IRON_INGOT).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 9))))
|
| 1790 | .add(LootItem.lootTableItem(Blocks.CRYING_OBSIDIAN).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 5))))
|
| 1791 | .add(LootItem.lootTableItem(Items.QUARTZ).apply(SetItemCountFunction.setCount(ContextIntProviders.between(8, 23))))
|
| 1792 | .add(LootItem.lootTableItem(Blocks.GILDED_BLACKSTONE).apply(SetItemCountFunction.setCount(ContextIntProviders.between(5, 15))))
|
| 1793 | .add(LootItem.lootTableItem(Items.MAGMA_CREAM).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 8))))
|
| 1794 | )
|
| 1795 | .withPool(
|
| 1796 | LootPool.lootPool()
|
| 1797 | .setRolls(ContextIntProviders.exactly(1))
|
| 1798 | .add(EmptyLootItem.emptyItem().setWeight(11))
|
| 1799 | .add(LootItem.lootTableItem(Items.SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 1800 | )
|
| 1801 | .withPool(LootPool.lootPool().setRolls(ContextIntProviders.exactly(1)).add(LootItem.lootTableItem(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE).setWeight(1)));
|
| 1802 | }
|
| 1803 |
|
| 1804 | public LootTable.Builder bastionOtherLootTable() {
|
| 1805 | return LootTable.lootTable()
|
| 1806 | .withPool(
|
| 1807 | LootPool.lootPool()
|
| 1808 | .setRolls(ContextIntProviders.exactly(1))
|
| 1809 | .add(
|
| 1810 | LootItem.lootTableItem(Items.DIAMOND_PICKAXE)
|
| 1811 | .setWeight(6)
|
| 1812 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1813 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1814 | )
|
| 1815 | .add(LootItem.lootTableItem(Items.DIAMOND_SHOVEL).setWeight(6).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1816 | .add(
|
| 1817 | LootItem.lootTableItem(Items.CROSSBOW)
|
| 1818 | .setWeight(6)
|
| 1819 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.1F, 0.9F)))
|
| 1820 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1821 | )
|
| 1822 | .add(LootItem.lootTableItem(Items.ANCIENT_DEBRIS).setWeight(12).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1823 | .add(LootItem.lootTableItem(Items.NETHERITE_SCRAP).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1824 | .add(LootItem.lootTableItem(Items.SPECTRAL_ARROW).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(10, 22))))
|
| 1825 | .add(LootItem.lootTableItem(Items.PIGLIN_BANNER_PATTERN).setWeight(9).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1826 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_PIGSTEP).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1827 | .add(LootItem.lootTableItem(Items.GOLDEN_CARROT).setWeight(12).apply(SetItemCountFunction.setCount(ContextIntProviders.between(6, 17))))
|
| 1828 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(9).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1829 | .add(
|
| 1830 | LootItem.lootTableItem(Items.BOOK)
|
| 1831 | .setWeight(10)
|
| 1832 | .apply(new EnchantRandomlyFunction.Builder().withEnchantment(this.enchantments.getOrThrow(Enchantments.SOUL_SPEED)))
|
| 1833 | )
|
| 1834 | )
|
| 1835 | .withPool(
|
| 1836 | LootPool.lootPool()
|
| 1837 | .setRolls(ContextIntProviders.exactly(2))
|
| 1838 | .add(
|
| 1839 | LootItem.lootTableItem(Items.IRON_SWORD)
|
| 1840 | .setWeight(2)
|
| 1841 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.1F, 0.9F)))
|
| 1842 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1843 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1844 | )
|
| 1845 | .add(LootItem.lootTableItem(Blocks.IRON_BLOCK).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1846 | .add(
|
| 1847 | LootItem.lootTableItem(Items.GOLDEN_BOOTS)
|
| 1848 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1849 | .apply(new EnchantRandomlyFunction.Builder().withEnchantment(this.enchantments.getOrThrow(Enchantments.SOUL_SPEED)))
|
| 1850 | )
|
| 1851 | .add(
|
| 1852 | LootItem.lootTableItem(Items.GOLDEN_AXE)
|
| 1853 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 1854 | .apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments))
|
| 1855 | )
|
| 1856 | .add(LootItem.lootTableItem(Blocks.GOLD_BLOCK).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1857 | .add(LootItem.lootTableItem(Items.CROSSBOW).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1858 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 6))))
|
| 1859 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 6))))
|
| 1860 | .add(LootItem.lootTableItem(Items.GOLDEN_SWORD).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1861 | .add(LootItem.lootTableItem(Items.GOLDEN_CHESTPLATE).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1862 | .add(LootItem.lootTableItem(Items.GOLDEN_HELMET).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1863 | .add(LootItem.lootTableItem(Items.GOLDEN_LEGGINGS).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1864 | .add(LootItem.lootTableItem(Items.GOLDEN_BOOTS).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1865 | .add(LootItem.lootTableItem(Blocks.CRYING_OBSIDIAN).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1866 | )
|
| 1867 | .withPool(
|
| 1868 | LootPool.lootPool()
|
| 1869 | .setRolls(ContextIntProviders.between(3, 4))
|
| 1870 | .add(LootItem.lootTableItem(Blocks.GILDED_BLACKSTONE).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1871 | .add(LootItem.lootTableItem(Blocks.IRON_CHAIN).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 10))))
|
| 1872 | .add(LootItem.lootTableItem(Items.MAGMA_CREAM).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 6))))
|
| 1873 | .add(LootItem.lootTableItem(Blocks.BONE_BLOCK).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 6))))
|
| 1874 | .add(LootItem.lootTableItem(Items.IRON_NUGGET).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))))
|
| 1875 | .add(LootItem.lootTableItem(Blocks.OBSIDIAN).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 6))))
|
| 1876 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 8))))
|
| 1877 | .add(LootItem.lootTableItem(Items.STRING).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 6))))
|
| 1878 | .add(LootItem.lootTableItem(Items.ARROW).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(5, 17))))
|
| 1879 | .add(LootItem.lootTableItem(Items.COOKED_PORKCHOP).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 1880 | )
|
| 1881 | .withPool(
|
| 1882 | LootPool.lootPool()
|
| 1883 | .setRolls(ContextIntProviders.exactly(1))
|
| 1884 | .add(EmptyLootItem.emptyItem().setWeight(11))
|
| 1885 | .add(LootItem.lootTableItem(Items.SNOUT_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 1886 | )
|
| 1887 | .withPool(
|
| 1888 | LootPool.lootPool()
|
| 1889 | .setRolls(ContextIntProviders.exactly(1))
|
| 1890 | .add(EmptyLootItem.emptyItem().setWeight(9))
|
| 1891 | .add(LootItem.lootTableItem(Items.NETHERITE_UPGRADE_SMITHING_TEMPLATE).setWeight(1))
|
| 1892 | );
|
| 1893 | }
|
| 1894 |
|
| 1895 | public LootTable.Builder woodlandMansionLootTable() {
|
| 1896 | return LootTable.lootTable()
|
| 1897 | .withPool(
|
| 1898 | LootPool.lootPool()
|
| 1899 | .setRolls(ContextIntProviders.between(1, 3))
|
| 1900 | .add(LootItem.lootTableItem(Items.LEAD).setWeight(20))
|
| 1901 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(15))
|
| 1902 | .add(LootItem.lootTableItem(Items.ENCHANTED_GOLDEN_APPLE).setWeight(2))
|
| 1903 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_13).setWeight(15))
|
| 1904 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_CAT).setWeight(15))
|
| 1905 | .add(LootItem.lootTableItem(Items.CHAINMAIL_CHESTPLATE).setWeight(10))
|
| 1906 | .add(LootItem.lootTableItem(Items.DIAMOND_HOE).setWeight(15))
|
| 1907 | .add(LootItem.lootTableItem(Items.DIAMOND_CHESTPLATE).setWeight(5))
|
| 1908 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(10).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 1909 | )
|
| 1910 | .withPool(
|
| 1911 | LootPool.lootPool()
|
| 1912 | .setRolls(ContextIntProviders.between(1, 4))
|
| 1913 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 1914 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 1915 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(20))
|
| 1916 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 1917 | .add(LootItem.lootTableItem(Items.BUCKET).setWeight(10))
|
| 1918 | .add(LootItem.lootTableItem(Items.REDSTONE).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 1919 | .add(LootItem.lootTableItem(Items.COAL).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 1920 | .add(LootItem.lootTableItem(Items.MELON_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1921 | .add(LootItem.lootTableItem(Items.PUMPKIN_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1922 | .add(LootItem.lootTableItem(Items.BEETROOT_SEEDS).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1923 | .add(LootItem.lootTableItem(Items.RESIN_CLUMP).setWeight(50).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 1924 | )
|
| 1925 | .withPool(
|
| 1926 | LootPool.lootPool()
|
| 1927 | .setRolls(ContextIntProviders.exactly(3))
|
| 1928 | .add(LootItem.lootTableItem(Items.BONE).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 1929 | .add(LootItem.lootTableItem(Items.GUNPOWDER).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 1930 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 1931 | .add(LootItem.lootTableItem(Items.STRING).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 1932 | )
|
| 1933 | .withPool(
|
| 1934 | LootPool.lootPool()
|
| 1935 | .setRolls(ContextIntProviders.exactly(1))
|
| 1936 | .add(EmptyLootItem.emptyItem().setWeight(1))
|
| 1937 | .add(LootItem.lootTableItem(Items.VEX_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 1938 | );
|
| 1939 | }
|
| 1940 |
|
| 1941 | public LootTable.Builder strongholdLibraryLootTable() {
|
| 1942 | return LootTable.lootTable()
|
| 1943 | .withPool(
|
| 1944 | LootPool.lootPool()
|
| 1945 | .setRolls(ContextIntProviders.between(2, 10))
|
| 1946 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1947 | .add(LootItem.lootTableItem(Items.PAPER).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 1948 | .add(LootItem.lootTableItem(Items.MAP))
|
| 1949 | .add(LootItem.lootTableItem(Items.COMPASS))
|
| 1950 | .add(
|
| 1951 | LootItem.lootTableItem(Items.BOOK).setWeight(10).apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.exactly(30)))
|
| 1952 | )
|
| 1953 | )
|
| 1954 | .withPool(LootPool.lootPool().setRolls(ContextIntProviders.exactly(1)).add(LootItem.lootTableItem(Items.EYE_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1)));
|
| 1955 | }
|
| 1956 |
|
| 1957 | public LootTable.Builder strongholdCorridorLootTable() {
|
| 1958 | return LootTable.lootTable()
|
| 1959 | .withPool(
|
| 1960 | LootPool.lootPool()
|
| 1961 | .setRolls(ContextIntProviders.between(2, 3))
|
| 1962 | .add(LootItem.lootTableItem(Items.ENDER_PEARL).setWeight(10))
|
| 1963 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1964 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1965 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1966 | .add(LootItem.lootTableItem(Items.REDSTONE).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 9))))
|
| 1967 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1968 | .add(LootItem.lootTableItem(Items.APPLE).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 1969 | .add(LootItem.lootTableItem(Items.IRON_PICKAXE).setWeight(5))
|
| 1970 | .add(LootItem.lootTableItem(Items.IRON_SWORD).setWeight(5))
|
| 1971 | .add(LootItem.lootTableItem(Items.IRON_CHESTPLATE).setWeight(5))
|
| 1972 | .add(LootItem.lootTableItem(Items.IRON_HELMET).setWeight(5))
|
| 1973 | .add(LootItem.lootTableItem(Items.IRON_LEGGINGS).setWeight(5))
|
| 1974 | .add(LootItem.lootTableItem(Items.IRON_BOOTS).setWeight(5))
|
| 1975 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE))
|
| 1976 | .add(LootItem.lootTableItem(Items.LEATHER).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 1977 | .add(LootItem.lootTableItem(Items.COPPER_HORSE_ARMOR))
|
| 1978 | .add(LootItem.lootTableItem(Items.IRON_HORSE_ARMOR))
|
| 1979 | .add(LootItem.lootTableItem(Items.GOLDEN_HORSE_ARMOR))
|
| 1980 | .add(LootItem.lootTableItem(Items.DIAMOND_HORSE_ARMOR))
|
| 1981 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_OTHERSIDE))
|
| 1982 | .add(LootItem.lootTableItem(Items.BOOK).apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.exactly(30))))
|
| 1983 | )
|
| 1984 | .withPool(
|
| 1985 | LootPool.lootPool()
|
| 1986 | .setRolls(ContextIntProviders.exactly(1))
|
| 1987 | .add(EmptyLootItem.emptyItem().setWeight(9))
|
| 1988 | .add(LootItem.lootTableItem(Items.EYE_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 1989 | );
|
| 1990 | }
|
| 1991 |
|
| 1992 | public LootTable.Builder ancientCityLootTable() {
|
| 1993 | return LootTable.lootTable()
|
| 1994 | .withPool(
|
| 1995 | LootPool.lootPool()
|
| 1996 | .setRolls(ContextIntProviders.between(5, 10))
|
| 1997 | .add(LootItem.lootTableItem(Items.ENCHANTED_GOLDEN_APPLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 1998 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_OTHERSIDE).setWeight(1))
|
| 1999 | .add(LootItem.lootTableItem(Items.COMPASS).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2000 | .add(LootItem.lootTableItem(Items.SCULK_CATALYST).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 2001 | .add(
|
| 2002 | LootItem.lootTableItem(Items.DIAMOND_HOE)
|
| 2003 | .setWeight(2)
|
| 2004 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 2005 | .apply(SetItemDamageFunction.setDamage(ContextFloatProviders.between(0.8F, 1.0F)))
|
| 2006 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(30, 50)))
|
| 2007 | )
|
| 2008 | .add(LootItem.lootTableItem(Items.LEAD).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2009 | .add(LootItem.lootTableItem(Items.DIAMOND_HORSE_ARMOR).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2010 | .add(LootItem.lootTableItem(Items.LEATHER).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 2011 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_13).setWeight(2))
|
| 2012 | .add(LootItem.lootTableItem(Items.MUSIC_DISC_CAT).setWeight(2))
|
| 2013 | .add(
|
| 2014 | LootItem.lootTableItem(Items.DIAMOND_LEGGINGS)
|
| 2015 | .setWeight(2)
|
| 2016 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(30, 50)))
|
| 2017 | )
|
| 2018 | .add(
|
| 2019 | LootItem.lootTableItem(Items.BOOK)
|
| 2020 | .setWeight(3)
|
| 2021 | .apply(new EnchantRandomlyFunction.Builder().withEnchantment(this.enchantments.getOrThrow(Enchantments.SWIFT_SNEAK)))
|
| 2022 | )
|
| 2023 | .add(LootItem.lootTableItem(Items.SCULK).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 10))))
|
| 2024 | .add(LootItem.lootTableItem(Items.SCULK_SENSOR).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2025 | .add(LootItem.lootTableItem(Items.CANDLE).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 2026 | .add(LootItem.lootTableItem(Items.AMETHYST_SHARD).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 15))))
|
| 2027 | .add(LootItem.lootTableItem(Items.EXPERIENCE_BOTTLE).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2028 | .add(LootItem.lootTableItem(Items.GLOW_BERRIES).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 15))))
|
| 2029 | .add(
|
| 2030 | LootItem.lootTableItem(Items.IRON_LEGGINGS)
|
| 2031 | .setWeight(3)
|
| 2032 | .apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.between(20, 39)))
|
| 2033 | )
|
| 2034 | .add(LootItem.lootTableItem(Items.ECHO_SHARD).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2035 | .add(LootItem.lootTableItem(Items.DISC_FRAGMENT_5).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2036 | .add(
|
| 2037 | LootItem.lootTableItem(Items.POTION)
|
| 2038 | .setWeight(5)
|
| 2039 | .apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3)))
|
| 2040 | .apply(SetPotionFunction.setPotion(Potions.STRONG_REGENERATION))
|
| 2041 | )
|
| 2042 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(5).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 2043 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 10))))
|
| 2044 | .add(LootItem.lootTableItem(Items.BONE).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 15))))
|
| 2045 | .add(LootItem.lootTableItem(Items.SOUL_TORCH).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 15))))
|
| 2046 | .add(LootItem.lootTableItem(Items.COAL).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(6, 15))))
|
| 2047 | )
|
| 2048 | .withPool(
|
| 2049 | LootPool.lootPool()
|
| 2050 | .setRolls(ContextIntProviders.exactly(1))
|
| 2051 | .add(EmptyLootItem.emptyItem().setWeight(75))
|
| 2052 | .add(LootItem.lootTableItem(Items.WARD_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(4))
|
| 2053 | .add(LootItem.lootTableItem(Items.SILENCE_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1))
|
| 2054 | );
|
| 2055 | }
|
| 2056 |
|
| 2057 | public LootTable.Builder jungleTempleLootTable() {
|
| 2058 | return LootTable.lootTable()
|
| 2059 | .withPool(
|
| 2060 | LootPool.lootPool()
|
| 2061 | .setRolls(ContextIntProviders.between(2, 6))
|
| 2062 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2063 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 2064 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 2065 | .add(LootItem.lootTableItem(Blocks.BAMBOO).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2066 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2067 | .add(LootItem.lootTableItem(Items.BONE).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 6))))
|
| 2068 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(16).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 7))))
|
| 2069 | .add(LootItem.lootTableItem(Items.LEATHER).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 2070 | .add(LootItem.lootTableItem(Items.COPPER_HORSE_ARMOR))
|
| 2071 | .add(LootItem.lootTableItem(Items.IRON_HORSE_ARMOR))
|
| 2072 | .add(LootItem.lootTableItem(Items.GOLDEN_HORSE_ARMOR))
|
| 2073 | .add(LootItem.lootTableItem(Items.DIAMOND_HORSE_ARMOR))
|
| 2074 | .add(LootItem.lootTableItem(Items.BOOK).apply(EnchantWithLevelsFunction.enchantWithLevels(this.enchantments, ContextIntProviders.exactly(30))))
|
| 2075 | )
|
| 2076 | .withPool(
|
| 2077 | LootPool.lootPool()
|
| 2078 | .setRolls(ContextIntProviders.exactly(1))
|
| 2079 | .add(EmptyLootItem.emptyItem().setWeight(2))
|
| 2080 | .add(LootItem.lootTableItem(Items.WILD_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2))))
|
| 2081 | );
|
| 2082 | }
|
| 2083 |
|
| 2084 | public LootTable.Builder shipwreckTreasureLootTable() {
|
| 2085 | return LootTable.lootTable()
|
| 2086 | .withPool(
|
| 2087 | LootPool.lootPool()
|
| 2088 | .setRolls(ContextIntProviders.between(3, 6))
|
| 2089 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(90).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 2090 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 2091 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(40).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 2092 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(5))
|
| 2093 | .add(LootItem.lootTableItem(Items.EXPERIENCE_BOTTLE).setWeight(5))
|
| 2094 | )
|
| 2095 | .withPool(
|
| 2096 | LootPool.lootPool()
|
| 2097 | .setRolls(ContextIntProviders.between(2, 5))
|
| 2098 | .add(LootItem.lootTableItem(Items.IRON_NUGGET).setWeight(50).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 10))))
|
| 2099 | .add(LootItem.lootTableItem(Items.GOLD_NUGGET).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 10))))
|
| 2100 | .add(LootItem.lootTableItem(Items.LAPIS_LAZULI).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 10))))
|
| 2101 | )
|
| 2102 | .withPool(
|
| 2103 | LootPool.lootPool()
|
| 2104 | .setRolls(ContextIntProviders.exactly(1))
|
| 2105 | .add(EmptyLootItem.emptyItem().setWeight(5))
|
| 2106 | .add(LootItem.lootTableItem(Items.COAST_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2))))
|
| 2107 | )
|
| 2108 | .withPool(
|
| 2109 | LootPool.lootPool()
|
| 2110 | .setRolls(ContextIntProviders.exactly(1))
|
| 2111 | .add(EmptyLootItem.emptyItem().setWeight(148))
|
| 2112 | .add(LootItem.lootTableItem(Items.COPPER_NAUTILUS_ARMOR).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2113 | .add(LootItem.lootTableItem(Items.IRON_NAUTILUS_ARMOR).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2114 | .add(LootItem.lootTableItem(Items.GOLDEN_NAUTILUS_ARMOR).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2115 | .add(LootItem.lootTableItem(Items.DIAMOND_NAUTILUS_ARMOR).setWeight(2).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2116 | );
|
| 2117 | }
|
| 2118 |
|
| 2119 | public LootTable.Builder pillagerOutpostLootTable() {
|
| 2120 | return LootTable.lootTable()
|
| 2121 | .withPool(LootPool.lootPool().setRolls(ContextIntProviders.between(0, 1)).add(LootItem.lootTableItem(Items.CROSSBOW)))
|
| 2122 | .withPool(
|
| 2123 | LootPool.lootPool()
|
| 2124 | .setRolls(ContextIntProviders.between(2, 3))
|
| 2125 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(7).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 5))))
|
| 2126 | .add(LootItem.lootTableItem(Items.POTATO).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 5))))
|
| 2127 | .add(LootItem.lootTableItem(Items.CARROT).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 5))))
|
| 2128 | )
|
| 2129 | .withPool(
|
| 2130 | LootPool.lootPool()
|
| 2131 | .setRolls(ContextIntProviders.between(1, 3))
|
| 2132 | .add(LootItem.lootTableItem(Blocks.DARK_OAK_LOG).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 3))))
|
| 2133 | )
|
| 2134 | .withPool(
|
| 2135 | LootPool.lootPool()
|
| 2136 | .setRolls(ContextIntProviders.between(2, 3))
|
| 2137 | .add(LootItem.lootTableItem(Items.EXPERIENCE_BOTTLE).setWeight(7))
|
| 2138 | .add(LootItem.lootTableItem(Items.STRING).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 6))))
|
| 2139 | .add(LootItem.lootTableItem(Items.ARROW).setWeight(4).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 2140 | .add(LootItem.lootTableItem(Items.TRIPWIRE_HOOK).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2141 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(3).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2142 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(1).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 2143 | )
|
| 2144 | .withPool(
|
| 2145 | LootPool.lootPool()
|
| 2146 | .setRolls(ContextIntProviders.between(0, 1))
|
| 2147 | .add(LootItem.lootTableItem(Items.GOAT_HORN))
|
| 2148 | .apply(SetInstrumentFunction.setInstrumentOptions(this.instruments.getOrThrow(InstrumentTags.REGULAR_GOAT_HORNS)))
|
| 2149 | )
|
| 2150 | .withPool(
|
| 2151 | LootPool.lootPool()
|
| 2152 | .setRolls(ContextIntProviders.exactly(1))
|
| 2153 | .add(EmptyLootItem.emptyItem().setWeight(3))
|
| 2154 | .add(LootItem.lootTableItem(Items.SENTRY_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2))))
|
| 2155 | );
|
| 2156 | }
|
| 2157 |
|
| 2158 | public LootTable.Builder desertPyramidLootTable() {
|
| 2159 | return LootTable.lootTable()
|
| 2160 | .withPool(
|
| 2161 | LootPool.lootPool()
|
| 2162 | .setRolls(ContextIntProviders.between(2, 4))
|
| 2163 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(5).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2164 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 2165 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 7))))
|
| 2166 | .add(LootItem.lootTableItem(Items.EMERALD).setWeight(15).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2167 | .add(LootItem.lootTableItem(Items.BONE).setWeight(25).apply(SetItemCountFunction.setCount(ContextIntProviders.between(4, 6))))
|
| 2168 | .add(LootItem.lootTableItem(Items.SPIDER_EYE).setWeight(25).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2169 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(25).apply(SetItemCountFunction.setCount(ContextIntProviders.between(3, 7))))
|
| 2170 | .add(LootItem.lootTableItem(Items.LEATHER).setWeight(20).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 5))))
|
| 2171 | .add(LootItem.lootTableItem(Items.COPPER_HORSE_ARMOR).setWeight(15))
|
| 2172 | .add(LootItem.lootTableItem(Items.IRON_HORSE_ARMOR).setWeight(15))
|
| 2173 | .add(LootItem.lootTableItem(Items.GOLDEN_HORSE_ARMOR).setWeight(10))
|
| 2174 | .add(LootItem.lootTableItem(Items.DIAMOND_HORSE_ARMOR).setWeight(5))
|
| 2175 | .add(LootItem.lootTableItem(Items.BOOK).setWeight(20).apply(EnchantRandomlyFunction.randomApplicableEnchantment(this.enchantments)))
|
| 2176 | .add(LootItem.lootTableItem(Items.GOLDEN_APPLE).setWeight(20))
|
| 2177 | .add(LootItem.lootTableItem(Items.ENCHANTED_GOLDEN_APPLE).setWeight(2))
|
| 2178 | .add(EmptyLootItem.emptyItem().setWeight(15))
|
| 2179 | )
|
| 2180 | .withPool(
|
| 2181 | LootPool.lootPool()
|
| 2182 | .setRolls(ContextIntProviders.exactly(4))
|
| 2183 | .add(LootItem.lootTableItem(Items.BONE).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 2184 | .add(LootItem.lootTableItem(Items.GUNPOWDER).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 2185 | .add(LootItem.lootTableItem(Items.ROTTEN_FLESH).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 2186 | .add(LootItem.lootTableItem(Items.STRING).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 2187 | .add(LootItem.lootTableItem(Blocks.SAND).setWeight(10).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 8))))
|
| 2188 | )
|
| 2189 | .withPool(
|
| 2190 | LootPool.lootPool()
|
| 2191 | .setRolls(ContextIntProviders.exactly(1))
|
| 2192 | .add(EmptyLootItem.emptyItem().setWeight(6))
|
| 2193 | .add(LootItem.lootTableItem(Items.DUNE_ARMOR_TRIM_SMITHING_TEMPLATE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(2))))
|
| 2194 | );
|
| 2195 | }
|
| 2196 |
|
| 2197 | private void abandonedCampLootTables() {
|
| 2198 | this.output
|
| 2199 | .accept(
|
| 2200 | BuiltInLootTables.ABANDONED_CAMP_BARREL,
|
| 2201 | LootTable.lootTable()
|
| 2202 | .withPool(
|
| 2203 | LootPool.lootPool()
|
| 2204 | .setRolls(ContextIntProviders.between(4, 8))
|
| 2205 | .add(LootItem.lootTableItem(Items.ARROW).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2206 | .add(LootItem.lootTableItem(Items.BONE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 2207 | .add(LootItem.lootTableItem(Items.BOWL).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 2208 | .add(LootItem.lootTableItem(Items.BREAD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2209 | .add(LootItem.lootTableItem(Items.COAL).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 2210 | .add(LootItem.lootTableItem(Items.COBWEB).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2211 | .add(LootItem.lootTableItem(Items.GLASS_BOTTLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2212 | .add(LootItem.lootTableItem(Items.LEATHER).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2213 | .add(LootItem.lootTableItem(Items.RABBIT_HIDE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 2214 | .add(LootItem.lootTableItem(Items.STRING).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 2215 | .add(LootItem.lootTableItem(Items.WHEAT).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 2216 | .add(LootItem.lootTableItem(Items.DYED_CANDLE.white()).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2217 | .add(LootItem.lootTableItem(Items.CUSHION.white()).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 2218 | .add(LootItem.lootTableItem(Items.STRAW_BED).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 2219 | )
|
| 2220 | .withPool(
|
| 2221 | LootPool.lootPool()
|
| 2222 | .setRolls(ContextIntProviders.exactly(1))
|
| 2223 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2224 | .add(LootItem.lootTableItem(Items.WOODEN_AXE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2225 | .add(LootItem.lootTableItem(Items.FISHING_ROD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2226 | )
|
| 2227 | );
|
| 2228 | this.output
|
| 2229 | .accept(
|
| 2230 | BuiltInLootTables.ABANDONED_CAMP_COMMON_CHEST,
|
| 2231 | LootTable.lootTable()
|
| 2232 | .withPool(
|
| 2233 | LootPool.lootPool()
|
| 2234 | .setRolls(ContextIntProviders.between(4, 6))
|
| 2235 | .add(LootItem.lootTableItem(Items.ARROW).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(4))))
|
| 2236 | .add(LootItem.lootTableItem(Items.MAP).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2237 | .add(LootItem.lootTableItem(Items.BONE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 2238 | .add(LootItem.lootTableItem(Items.COBWEB).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2239 | .add(LootItem.lootTableItem(Items.COMPASS).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2240 | .add(LootItem.lootTableItem(Items.MAP).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 2241 | .add(LootItem.lootTableItem(Items.GUNPOWDER).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(2, 4))))
|
| 2242 | .add(LootItem.lootTableItem(Items.FISHING_ROD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2243 | .add(LootItem.lootTableItem(Items.FLINT_AND_STEEL).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2244 | .add(LootItem.lootTableItem(Items.GLASS_BOTTLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 2245 | .add(LootItem.lootTableItem(Items.LEAD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2246 | .add(LootItem.lootTableItem(Items.LEATHER).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 2247 | .add(LootItem.lootTableItem(Items.BUNDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2248 | .add(LootItem.lootTableItem(Items.RABBIT_HIDE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 4))))
|
| 2249 | .add(LootItem.lootTableItem(Items.SADDLE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2250 | .add(LootItem.lootTableItem(Items.DYED_CANDLE.white()).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 3))))
|
| 2251 | )
|
| 2252 | .withPool(
|
| 2253 | LootPool.lootPool()
|
| 2254 | .setRolls(ContextIntProviders.exactly(2))
|
| 2255 | .add(LootItem.lootTableItem(Items.BOW).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2256 | .add(LootItem.lootTableItem(Items.BUCKET).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2257 | .add(LootItem.lootTableItem(Items.COPPER_AXE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2258 | .add(LootItem.lootTableItem(Items.COPPER_BOOTS).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2259 | .add(LootItem.lootTableItem(Items.COPPER_CHESTPLATE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2260 | .add(LootItem.lootTableItem(Items.COPPER_LEGGINGS).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2261 | .add(LootItem.lootTableItem(Items.COPPER_SPEAR).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2262 | .add(LootItem.lootTableItem(Items.COPPER_SWORD).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2263 | .add(LootItem.lootTableItem(Items.SPYGLASS).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2264 | .add(LootItem.lootTableItem(Items.SHEARS).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2265 | )
|
| 2266 | .withPool(
|
| 2267 | LootPool.lootPool()
|
| 2268 | .setRolls(ContextIntProviders.exactly(1))
|
| 2269 | .add(
|
| 2270 | this.explorationMapItemExcludingBiome(
|
| 2271 | StructureTags.ON_ABANDONED_CAMP_BAMBOO_JUNGLE_MAPS,
|
| 2272 | MapDecorationTypes.ABANDONED_CAMP,
|
| 2273 | Items.ABANDONED_CAMP_MAP,
|
| 2274 | "filled_map.bamboo_camp_map",
|
| 2275 | this.biomes.getOrThrow(Biomes.BAMBOO_JUNGLE)
|
| 2276 | )
|
| 2277 | )
|
| 2278 | .add(
|
| 2279 | this.explorationMapItemExcludingBiome(
|
| 2280 | StructureTags.ON_ABANDONED_CAMP_CHERRY_GROVE_MAPS,
|
| 2281 | MapDecorationTypes.ABANDONED_CAMP,
|
| 2282 | Items.ABANDONED_CAMP_MAP,
|
| 2283 | "filled_map.cherry_grove_camp_map",
|
| 2284 | this.biomes.getOrThrow(Biomes.CHERRY_GROVE)
|
| 2285 | )
|
| 2286 | )
|
| 2287 | .add(
|
| 2288 | this.explorationMapItemExcludingBiome(
|
| 2289 | StructureTags.ON_ABANDONED_CAMP_BIRCH_FOREST_MAPS,
|
| 2290 | MapDecorationTypes.ABANDONED_CAMP,
|
| 2291 | Items.ABANDONED_CAMP_MAP,
|
| 2292 | "filled_map.birch_forest_camp_map",
|
| 2293 | this.biomes.getOrThrow(Biomes.BIRCH_FOREST)
|
| 2294 | )
|
| 2295 | )
|
| 2296 | .add(
|
| 2297 | this.explorationMapItemExcludingBiome(
|
| 2298 | StructureTags.ON_ABANDONED_CAMP_DAPPLED_FOREST_MAPS,
|
| 2299 | MapDecorationTypes.ABANDONED_CAMP,
|
| 2300 | Items.ABANDONED_CAMP_MAP,
|
| 2301 | "filled_map.dappled_forest_camp_map",
|
| 2302 | this.biomes.getOrThrow(Biomes.DAPPLED_FOREST)
|
| 2303 | )
|
| 2304 | )
|
| 2305 | .add(
|
| 2306 | this.explorationMapItemExcludingBiome(
|
| 2307 | StructureTags.ON_ABANDONED_CAMP_FLOWER_FOREST_MAPS,
|
| 2308 | MapDecorationTypes.ABANDONED_CAMP,
|
| 2309 | Items.ABANDONED_CAMP_MAP,
|
| 2310 | "filled_map.flower_forest_camp_map",
|
| 2311 | this.biomes.getOrThrow(Biomes.FLOWER_FOREST)
|
| 2312 | )
|
| 2313 | )
|
| 2314 | .add(
|
| 2315 | this.explorationMapItemExcludingBiome(
|
| 2316 | StructureTags.ON_ABANDONED_CAMP_PALE_GARDEN_MAPS,
|
| 2317 | MapDecorationTypes.ABANDONED_CAMP,
|
| 2318 | Items.ABANDONED_CAMP_MAP,
|
| 2319 | "filled_map.pale_garden_camp_map",
|
| 2320 | this.biomes.getOrThrow(Biomes.PALE_GARDEN)
|
| 2321 | )
|
| 2322 | )
|
| 2323 | .add(
|
| 2324 | this.explorationMapItemExcludingBiome(
|
| 2325 | StructureTags.ON_ABANDONED_CAMP_SWAMP_MAPS,
|
| 2326 | MapDecorationTypes.ABANDONED_CAMP,
|
| 2327 | Items.ABANDONED_CAMP_MAP,
|
| 2328 | "filled_map.swamp_camp_map",
|
| 2329 | this.biomes.getOrThrow(Biomes.SWAMP)
|
| 2330 | )
|
| 2331 | )
|
| 2332 | .add(
|
| 2333 | this.explorationMapItemExcludingBiome(
|
| 2334 | StructureTags.ON_ABANDONED_CAMP_WINDSWEPT_FOREST_MAPS,
|
| 2335 | MapDecorationTypes.ABANDONED_CAMP,
|
| 2336 | Items.ABANDONED_CAMP_MAP,
|
| 2337 | "filled_map.windswept_forest_camp_map",
|
| 2338 | this.biomes.getOrThrow(Biomes.WINDSWEPT_FOREST)
|
| 2339 | )
|
| 2340 | )
|
| 2341 | )
|
| 2342 | );
|
| 2343 | this.output
|
| 2344 | .accept(
|
| 2345 | BuiltInLootTables.ABANDONED_CAMP_SECRET_CHEST,
|
| 2346 | LootTable.lootTable()
|
| 2347 | .withPool(
|
| 2348 | LootPool.lootPool()
|
| 2349 | .setRolls(ContextIntProviders.exactly(2))
|
| 2350 | .add(LootItem.lootTableItem(Items.DIAMOND).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2351 | .add(
|
| 2352 | LootItem.lootTableItem(Items.POTION)
|
| 2353 | .setWeight(1)
|
| 2354 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 2355 | .apply(SetPotionFunction.setPotion(Potions.HEALING))
|
| 2356 | )
|
| 2357 | .add(
|
| 2358 | LootItem.lootTableItem(Items.POTION)
|
| 2359 | .setWeight(1)
|
| 2360 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 2361 | .apply(SetPotionFunction.setPotion(Potions.LEAPING))
|
| 2362 | )
|
| 2363 | .add(
|
| 2364 | LootItem.lootTableItem(Items.POTION)
|
| 2365 | .setWeight(1)
|
| 2366 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 2367 | .apply(SetPotionFunction.setPotion(Potions.NIGHT_VISION))
|
| 2368 | )
|
| 2369 | .add(
|
| 2370 | LootItem.lootTableItem(Items.POTION)
|
| 2371 | .setWeight(1)
|
| 2372 | .apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1)))
|
| 2373 | .apply(SetPotionFunction.setPotion(Potions.SWIFTNESS))
|
| 2374 | )
|
| 2375 | )
|
| 2376 | .withPool(
|
| 2377 | LootPool.lootPool()
|
| 2378 | .setRolls(ContextIntProviders.between(4, 6))
|
| 2379 | .add(LootItem.lootTableItem(Items.MAP).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2380 | .add(LootItem.lootTableItem(Items.COPPER_INGOT).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 2381 | .add(LootItem.lootTableItem(Items.GOLD_INGOT).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.between(1, 2))))
|
| 2382 | .add(LootItem.lootTableItem(Items.IRON_INGOT).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2383 | )
|
| 2384 | .withPool(
|
| 2385 | LootPool.lootPool()
|
| 2386 | .setRolls(ContextIntProviders.between(0, 1))
|
| 2387 | .add(LootItem.lootTableItem(Items.IRON_AXE).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2388 | .add(LootItem.lootTableItem(Items.IRON_BOOTS).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2389 | .add(LootItem.lootTableItem(Items.IRON_LEGGINGS).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2390 | .add(LootItem.lootTableItem(Items.IRON_SPEAR).setWeight(1).apply(SetItemCountFunction.setCount(ContextIntProviders.exactly(1))))
|
| 2391 | )
|
| 2392 | .withPool(
|
| 2393 | LootPool.lootPool()
|
| 2394 | .setRolls(ContextIntProviders.exactly(1))
|
| 2395 | .add(this.explorationMapItem(StructureTags.ON_ANCIENT_CITY_MAPS, MapDecorationTypes.ANCIENT_CITY, Items.BURIED_ANCIENT_CITY_MAP))
|
| 2396 | .add(this.explorationMapItem(StructureTags.ON_BURIED_TRIAL_CHAMBERS_MAPS, MapDecorationTypes.TRIAL_CHAMBERS, Items.BURIED_TRIAL_CHAMBERS_MAP))
|
| 2397 | .add(this.explorationMapItem(StructureTags.ON_MINESHAFT_MAPS, MapDecorationTypes.MINESHAFT, Items.BURIED_MINESHAFT_MAP))
|
| 2398 | .add(this.explorationMapItem(StructureTags.ON_DESERT_PYRAMID_MAPS, MapDecorationTypes.DESERT_PYRAMID, Items.DESERT_PYRAMID_MAP))
|
| 2399 | .add(this.explorationMapItem(StructureTags.ON_JUNGLE_PYRAMID_MAPS, MapDecorationTypes.JUNGLE_TEMPLE, Items.JUNGLE_PYRAMID_MAP))
|
| 2400 | .add(this.explorationMapItem(StructureTags.ON_OCEAN_RUIN_WARM_MAPS, MapDecorationTypes.OCEAN_RUIN_WARM, Items.WARM_OCEAN_RUINS_MAP))
|
| 2401 | .add(this.explorationMapItem(StructureTags.ON_WOODLAND_MANSION_MAPS, MapDecorationTypes.WOODLAND_MANSION, Items.WOODLAND_MANSION_MAP))
|
| 2402 | )
|
| 2403 | );
|
| 2404 | }
|
| 2405 |
|
| 2406 | private UniformContainerBase.Builder<?> explorationMapItem(
|
| 2407 | final TagKey<Structure> structureTag, final Holder<MapDecorationType> decoration, final Item mapItem
|
| 2408 | ) {
|
| 2409 | return this.explorationMapItem(structureTag, decoration, mapItem, null);
|
| 2410 | }
|
| 2411 |
|
| 2412 | private UniformContainerBase.Builder<?> explorationMapItem(
|
| 2413 | final TagKey<Structure> structureTag, final Holder<MapDecorationType> decoration, final Item mapItem, final @Nullable String translationKey
|
| 2414 | ) {
|
| 2415 | UniformContainerBase.Builder<?> entry = LootItem.lootTableItem(mapItem).setWeight(1);
|
| 2416 | if (translationKey != null) {
|
| 2417 | entry = entry.apply(SetNameFunction.setName(Component.translatable(translationKey), SetNameFunction.Target.ITEM_NAME));
|
| 2418 | }
|
| 2419 |
|
| 2420 | return entry.apply(
|
| 2421 | ExplorationMapFunction.makeExplorationMap(this.structures.getOrThrow(structureTag)).setMapDecoration(decoration).setSkipKnownStructures(true)
|
| 2422 | )
|
| 2423 | .apply(discardIfNotValidMap());
|
| 2424 | }
|
| 2425 |
|
| 2426 | private UniformContainerBase.Builder<?> explorationMapItemExcludingBiome(
|
| 2427 | final TagKey<Structure> structureTag,
|
| 2428 | final Holder<MapDecorationType> decoration,
|
| 2429 | final Item mapItem,
|
| 2430 | final String translationKey,
|
| 2431 | final Holder<Biome> excludedBiome
|
| 2432 | ) {
|
| 2433 | return this.explorationMapItem(structureTag, decoration, mapItem, translationKey)
|
| 2434 | .when(LocationCheck.checkLocation(LocationPredicate.Builder.location().setBiomes(HolderSet.direct(excludedBiome))).invert());
|
| 2435 | }
|
| 2436 |
|
| 2437 | private UniformContainerBase.Builder<?> buriedTreasureMapItem() {
|
| 2438 | return LootItem.lootTableItem(Items.BURIED_TREASURE_MAP)
|
| 2439 | .apply(
|
| 2440 | ExplorationMapFunction.makeExplorationMap(this.structures.getOrThrow(StructureTags.ON_TREASURE_MAPS))
|
| 2441 | .setMapDecoration(MapDecorationTypes.RED_X)
|
| 2442 | .setZoom((byte)1)
|
| 2443 | .setSkipKnownStructures(false)
|
| 2444 | )
|
| 2445 | .apply(discardIfNotValidMap());
|
| 2446 | }
|
| 2447 |
|
| 2448 | private static FilteredFunction.Builder discardIfNotValidMap() {
|
| 2449 | return FilteredFunction.filtered(VillagerTrades.anyValidMap().build()).onFail(DiscardItem.discardItem().build());
|
| 2450 | }
|
| 2451 | }
|
| 2452 |
|