From 80f533359a48b2cbc8bd90b0f11149dcac7179e6 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 10 Jan 2020 16:18:08 -0500 Subject: [PATCH] added chest loot data --- .../seedcracker/cracker/ChestLootData.java | 86 +++++++++++++++++++ .../mixin/ClientPlayNetworkHandlerMixin.java | 3 + .../seedcracker/util/loot/LootBuilder.java | 53 ++++++++++++ .../seedcracker/util/loot/MCLootTables.java | 55 ++++++++++++ .../seedcracker/util/math/Predicates.java | 14 +++ 5 files changed, 211 insertions(+) create mode 100644 src/main/java/kaptainwutax/seedcracker/cracker/ChestLootData.java create mode 100644 src/main/java/kaptainwutax/seedcracker/util/loot/LootBuilder.java create mode 100644 src/main/java/kaptainwutax/seedcracker/util/loot/MCLootTables.java create mode 100644 src/main/java/kaptainwutax/seedcracker/util/math/Predicates.java diff --git a/src/main/java/kaptainwutax/seedcracker/cracker/ChestLootData.java b/src/main/java/kaptainwutax/seedcracker/cracker/ChestLootData.java new file mode 100644 index 0000000..d7055ce --- /dev/null +++ b/src/main/java/kaptainwutax/seedcracker/cracker/ChestLootData.java @@ -0,0 +1,86 @@ +package kaptainwutax.seedcracker.cracker; + +import kaptainwutax.seedcracker.util.loot.LootBuilder; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.loot.LootTable; +import net.minecraft.loot.context.LootContext; +import net.minecraft.loot.context.LootContextParameters; +import net.minecraft.loot.context.LootContextTypes; +import net.minecraft.util.math.BlockPos; + +import java.util.*; +import java.util.function.BiPredicate; + +public class ChestLootData { + + private LootTable lootTable; + private Map> stacksMap = new HashMap<>(); + + public ChestLootData(LootTable lootTable, Stack... stacks) { + this.lootTable = lootTable; + + for(Stack stack: stacks) { + Item item = stack.item; + + if(!this.stacksMap.containsKey(item)) { + this.stacksMap.put(item, new ArrayList<>()); + } + + this.stacksMap.get(item).add(stack); + } + } + + public boolean test(long seed) { + Random random = new Random(seed); + LootContext lootContext = new LootBuilder().setRandom(random).put(LootContextParameters.POSITION, new BlockPos(0, 0, 0)).build(LootContextTypes.CHEST); + List itemStacks = this.lootTable.getDrops(lootContext); + + Set foundItems = new HashSet<>(); + + for(ItemStack itemStack: itemStacks) { + Item item = itemStack.getItem(); + List stacks = this.stacksMap.get(item); + if(stacks == null)continue; + + boolean matches = true; + + for(Stack stack: stacks) { + if(!stack.test(itemStack.getCount())) { + matches = false; + break; + } + } + + if(matches) { + foundItems.add(item); + } + } + + return foundItems.size() == this.stacksMap.size(); + } + + public static class Stack { + + private Item item; + private BiPredicate predicate; + private int amount; + + public Stack(Item item, BiPredicate predicate, int amount) { + this.item = item; + this.predicate = predicate; + this.amount = amount; + } + + public boolean test(int count) { + return this.predicate.test(count, this.amount); + } + + @Override + public int hashCode() { + return item.hashCode() * 31 + this.amount; + } + + } + +} diff --git a/src/main/java/kaptainwutax/seedcracker/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/kaptainwutax/seedcracker/mixin/ClientPlayNetworkHandlerMixin.java index f88eca7..792ed5e 100644 --- a/src/main/java/kaptainwutax/seedcracker/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/kaptainwutax/seedcracker/mixin/ClientPlayNetworkHandlerMixin.java @@ -5,6 +5,7 @@ import com.mojang.brigadier.CommandDispatcher; import kaptainwutax.seedcracker.SeedCracker; import kaptainwutax.seedcracker.command.ClientCommands; import kaptainwutax.seedcracker.finder.FinderQueue; +import kaptainwutax.seedcracker.util.Log; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.network.ClientPlayNetworkHandler; @@ -35,6 +36,7 @@ public abstract class ClientPlayNetworkHandlerMixin { FinderQueue.get().onChunkData(this.world, new ChunkPos(chunkX, chunkZ)); } + @SuppressWarnings("unchecked") @Inject(method = "", at = @At("RETURN")) public void onInit(MinecraftClient mc, Screen screen, ClientConnection connection, GameProfile profile, CallbackInfo ci) { ClientCommands.registerCommands((CommandDispatcher)(Object)this.commandDispatcher); @@ -49,6 +51,7 @@ public abstract class ClientPlayNetworkHandlerMixin { @Inject(method = "onPlayerRespawn", at = @At("HEAD")) public void onPlayerRespawn(PlayerRespawnS2CPacket packet, CallbackInfo ci) { SeedCracker.get().hashedWorldSeed = packet.method_22425(); + Log.warn("Fetched hashed world seed [" + SeedCracker.get().hashedWorldSeed + "]."); } } diff --git a/src/main/java/kaptainwutax/seedcracker/util/loot/LootBuilder.java b/src/main/java/kaptainwutax/seedcracker/util/loot/LootBuilder.java new file mode 100644 index 0000000..31e38e8 --- /dev/null +++ b/src/main/java/kaptainwutax/seedcracker/util/loot/LootBuilder.java @@ -0,0 +1,53 @@ +package kaptainwutax.seedcracker.util.loot; + +import net.minecraft.client.MinecraftClient; +import net.minecraft.loot.context.LootContext; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.WorldGenerationProgressListener; +import net.minecraft.server.integrated.IntegratedServer; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.ChunkPos; +import net.minecraft.world.WorldSaveHandler; +import net.minecraft.world.chunk.ChunkStatus; +import net.minecraft.world.dimension.DimensionType; +import net.minecraft.world.level.LevelInfo; +import net.minecraft.world.level.LevelProperties; + +import java.io.File; + +public class LootBuilder extends LootContext.Builder { + + private static final FakeWorld FAKE_WORLD = new FakeWorld(); + + public LootBuilder() { + super(FAKE_WORLD); + } + + private static class FakeWorld extends ServerWorld { + public FakeWorld() { + super(new IntegratedServer( + MinecraftClient.getInstance(), null, null, + new LevelInfo(new LevelProperties(new CompoundTag(), null, 0, null)), + null, null, null, null, null + ), Runnable::run, new WorldSaveHandler(new File("foo"), "bar", null, null), + new LevelProperties(new CompoundTag(), null, 0, null), + DimensionType.OVERWORLD, null, new WorldGenerationProgressListener() { + @Override + public void start(ChunkPos var1) { + + } + + @Override + public void setChunkStatus(ChunkPos var1, ChunkStatus var2) { + + } + + @Override + public void stop() { + + } + }); + } + } + +} diff --git a/src/main/java/kaptainwutax/seedcracker/util/loot/MCLootTables.java b/src/main/java/kaptainwutax/seedcracker/util/loot/MCLootTables.java new file mode 100644 index 0000000..0e31ffe --- /dev/null +++ b/src/main/java/kaptainwutax/seedcracker/util/loot/MCLootTables.java @@ -0,0 +1,55 @@ +package kaptainwutax.seedcracker.util.loot; + +import net.minecraft.block.Blocks; +import net.minecraft.entity.effect.StatusEffects; +import net.minecraft.item.Items; +import net.minecraft.item.map.MapIcon; +import net.minecraft.loot.ConstantLootTableRange; +import net.minecraft.loot.LootPool; +import net.minecraft.loot.LootTable; +import net.minecraft.loot.UniformLootTableRange; +import net.minecraft.loot.entry.EmptyEntry; +import net.minecraft.loot.entry.ItemEntry; +import net.minecraft.loot.function.*; + +public class MCLootTables { + + public static LootTable ABANDONED_MINESHAFT_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(1)).withEntry(ItemEntry.builder(Items.GOLDEN_APPLE).setWeight(20)).withEntry(ItemEntry.builder(Items.ENCHANTED_GOLDEN_APPLE)).withEntry(ItemEntry.builder(Items.NAME_TAG).setWeight(30)).withEntry(ItemEntry.builder(Items.BOOK).setWeight(10).withFunction(EnchantRandomlyLootFunction.builder())).withEntry(ItemEntry.builder(Items.IRON_PICKAXE).setWeight(5)).withEntry(EmptyEntry.Serializer().setWeight(5))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 4.0F)).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.REDSTONE).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 9.0F)))).withEntry(ItemEntry.builder(Items.LAPIS_LAZULI).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 9.0F)))).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.MELON_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.PUMPKIN_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BEETROOT_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F))))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(3)).withEntry(ItemEntry.builder(Blocks.RAIL).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 8.0F)))).withEntry(ItemEntry.builder(Blocks.POWERED_RAIL).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Blocks.DETECTOR_RAIL).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Blocks.ACTIVATOR_RAIL).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Blocks.TORCH).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 16.0F))))).create(); + public static LootTable BURIED_TREASURE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(1)).withEntry(ItemEntry.builder(Items.HEART_OF_THE_SEA))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(5.0F, 8.0F)).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Blocks.TNT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F))))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 3.0F)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F)))).withEntry(ItemEntry.builder(Items.PRISMARINE_CRYSTALS).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F))))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(0.0F, 1.0F)).withEntry(ItemEntry.builder(Items.LEATHER_CHESTPLATE)).withEntry(ItemEntry.builder(Items.IRON_SWORD))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(2)).withEntry(ItemEntry.builder(Items.COOKED_COD).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.COOKED_SALMON).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F))))).create(); + public static LootTable DESERT_PYRAMID_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 4.0F)).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.BONE).setWeight(25).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 6.0F)))).withEntry(ItemEntry.builder(Items.SPIDER_EYE).setWeight(25).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(25).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.SADDLE).setWeight(20)).withEntry(ItemEntry.builder(Items.IRON_HORSE_ARMOR).setWeight(15)).withEntry(ItemEntry.builder(Items.GOLDEN_HORSE_ARMOR).setWeight(10)).withEntry(ItemEntry.builder(Items.DIAMOND_HORSE_ARMOR).setWeight(5)).withEntry(ItemEntry.builder(Items.BOOK).setWeight(20).withFunction(EnchantRandomlyLootFunction.builder())).withEntry(ItemEntry.builder(Items.GOLDEN_APPLE).setWeight(20)).withEntry(ItemEntry.builder(Items.ENCHANTED_GOLDEN_APPLE).setWeight(2)).withEntry(EmptyEntry.Serializer().setWeight(15))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(4)).withEntry(ItemEntry.builder(Items.BONE).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.GUNPOWDER).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.STRING).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Blocks.SAND).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F))))).create(); + public static LootTable END_CITY_TREASURE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 6.0F)).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 6.0F)))).withEntry(ItemEntry.builder(Items.BEETROOT_SEEDS).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 10.0F)))).withEntry(ItemEntry.builder(Items.SADDLE).setWeight(3)).withEntry(ItemEntry.builder(Items.IRON_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.GOLDEN_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.DIAMOND_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.DIAMOND_SWORD).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.DIAMOND_BOOTS).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.DIAMOND_CHESTPLATE).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.DIAMOND_LEGGINGS).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.DIAMOND_HELMET).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.DIAMOND_PICKAXE).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.DIAMOND_SHOVEL).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.IRON_SWORD).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.IRON_BOOTS).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.IRON_CHESTPLATE).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.IRON_LEGGINGS).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.IRON_HELMET).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.IRON_PICKAXE).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments())).withEntry(ItemEntry.builder(Items.IRON_SHOVEL).setWeight(3).withFunction(EnchantWithLevelsLootFunction.builder(UniformLootTableRange.between(20.0F, 39.0F)).allowTreasureEnchantments()))).create(); + public static LootTable IGLOO_CHEST_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 8.0F)).withEntry(ItemEntry.builder(Items.APPLE).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.GOLD_NUGGET).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.STONE_AXE).setWeight(2)).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(10)).withEntry(ItemEntry.builder(Items.EMERALD)).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 3.0F))))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(1)).withEntry(ItemEntry.builder(Items.GOLDEN_APPLE))).create(); + public static LootTable JUNGLE_TEMPLE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 6.0F)).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 7.0F)))).withEntry(ItemEntry.builder(Blocks.BAMBOO).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.BONE).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 6.0F)))).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(16).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.SADDLE).setWeight(3)).withEntry(ItemEntry.builder(Items.IRON_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.GOLDEN_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.DIAMOND_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.BOOK).withFunction(EnchantWithLevelsLootFunction.builder(ConstantLootTableRange.create(30)).allowTreasureEnchantments()))).create(); + public static LootTable JUNGLE_TEMPLE_DISPENSER_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 2.0F)).withEntry(ItemEntry.builder(Items.ARROW).setWeight(30).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 7.0F))))).create(); + public static LootTable NETHER_BRIDGE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 4.0F)).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.GOLDEN_SWORD).setWeight(5)).withEntry(ItemEntry.builder(Items.GOLDEN_CHESTPLATE).setWeight(5)).withEntry(ItemEntry.builder(Items.FLINT_AND_STEEL).setWeight(5)).withEntry(ItemEntry.builder(Items.NETHER_WART).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.SADDLE).setWeight(10)).withEntry(ItemEntry.builder(Items.GOLDEN_HORSE_ARMOR).setWeight(8)).withEntry(ItemEntry.builder(Items.IRON_HORSE_ARMOR).setWeight(5)).withEntry(ItemEntry.builder(Items.DIAMOND_HORSE_ARMOR).setWeight(3)).withEntry(ItemEntry.builder(Blocks.OBSIDIAN).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F))))).create(); + public static LootTable PILLAGER_OUTPOST_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(0.0F, 1.0F)).withEntry(ItemEntry.builder(Items.CROSSBOW))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 3.0F)).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(7).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.POTATO).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.CARROT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 5.0F))))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 3.0F)).withEntry(ItemEntry.builder(Blocks.DARK_OAK_LOG).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 3.0F))))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 3.0F)).withEntry(ItemEntry.builder(Items.EXPERIENCE_BOTTLE).setWeight(7)).withEntry(ItemEntry.builder(Items.STRING).setWeight(4).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 6.0F)))).withEntry(ItemEntry.builder(Items.ARROW).setWeight(4).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.TRIPWIRE_HOOK).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.BOOK).setWeight(1).withFunction(EnchantRandomlyLootFunction.builder()))).create(); + public static LootTable SHIPWRECK_MAP_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(1)).withEntry(ItemEntry.builder(Items.MAP).withFunction(ExplorationMapLootFunction.create().withDestination("buried_treasure").withDecoration(MapIcon.Type.RED_X).withZoom((byte)1).withSkipExistingChunks(false)))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(3)).withEntry(ItemEntry.builder(Items.COMPASS)).withEntry(ItemEntry.builder(Items.MAP)).withEntry(ItemEntry.builder(Items.CLOCK)).withEntry(ItemEntry.builder(Items.PAPER).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 10.0F)))).withEntry(ItemEntry.builder(Items.FEATHER).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.BOOK).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F))))).create(); + public static LootTable SHIPWRECK_SUPPLY_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 10.0F)).withEntry(ItemEntry.builder(Items.PAPER).setWeight(8).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 12.0F)))).withEntry(ItemEntry.builder(Items.POTATO).setWeight(7).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 6.0F)))).withEntry(ItemEntry.builder(Items.POISONOUS_POTATO).setWeight(7).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 6.0F)))).withEntry(ItemEntry.builder(Items.CARROT).setWeight(7).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(7).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(8.0F, 21.0F)))).withEntry(ItemEntry.builder(Items.SUSPICIOUS_STEW).setWeight(10).withFunction(SetStewEffectLootFunction.builder().withEffect(StatusEffects.NIGHT_VISION, UniformLootTableRange.between(7.0F, 10.0F)).withEffect(StatusEffects.JUMP_BOOST, UniformLootTableRange.between(7.0F, 10.0F)).withEffect(StatusEffects.WEAKNESS, UniformLootTableRange.between(6.0F, 8.0F)).withEffect(StatusEffects.BLINDNESS, UniformLootTableRange.between(5.0F, 7.0F)).withEffect(StatusEffects.POISON, UniformLootTableRange.between(10.0F, 20.0F)).withEffect(StatusEffects.SATURATION, UniformLootTableRange.between(7.0F, 10.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(5.0F, 24.0F)))).withEntry(ItemEntry.builder(Blocks.PUMPKIN).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.BAMBOO).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.GUNPOWDER).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Blocks.TNT).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F)))).withEntry(ItemEntry.builder(Items.LEATHER_HELMET).setWeight(3).withFunction(EnchantRandomlyLootFunction.builder())).withEntry(ItemEntry.builder(Items.LEATHER_CHESTPLATE).setWeight(3).withFunction(EnchantRandomlyLootFunction.builder())).withEntry(ItemEntry.builder(Items.LEATHER_LEGGINGS).setWeight(3).withFunction(EnchantRandomlyLootFunction.builder())).withEntry(ItemEntry.builder(Items.LEATHER_BOOTS).setWeight(3).withFunction(EnchantRandomlyLootFunction.builder()))).create(); + public static LootTable SHIPWRECK_TREASURE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 6.0F)).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(90).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(40).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(5)).withEntry(ItemEntry.builder(Items.EXPERIENCE_BOTTLE).setWeight(5))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 5.0F)).withEntry(ItemEntry.builder(Items.IRON_NUGGET).setWeight(50).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 10.0F)))).withEntry(ItemEntry.builder(Items.GOLD_NUGGET).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 10.0F)))).withEntry(ItemEntry.builder(Items.LAPIS_LAZULI).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 10.0F))))).create(); + public static LootTable SIMPLE_DUNGEON_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 3.0F)).withEntry(ItemEntry.builder(Items.SADDLE).setWeight(20)).withEntry(ItemEntry.builder(Items.GOLDEN_APPLE).setWeight(15)).withEntry(ItemEntry.builder(Items.ENCHANTED_GOLDEN_APPLE).setWeight(2)).withEntry(ItemEntry.builder(Items.MUSIC_DISC_13).setWeight(15)).withEntry(ItemEntry.builder(Items.MUSIC_DISC_CAT).setWeight(15)).withEntry(ItemEntry.builder(Items.NAME_TAG).setWeight(20)).withEntry(ItemEntry.builder(Items.GOLDEN_HORSE_ARMOR).setWeight(10)).withEntry(ItemEntry.builder(Items.IRON_HORSE_ARMOR).setWeight(15)).withEntry(ItemEntry.builder(Items.DIAMOND_HORSE_ARMOR).setWeight(5)).withEntry(ItemEntry.builder(Items.BOOK).setWeight(10).withFunction(EnchantRandomlyLootFunction.builder()))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 4.0F)).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(20)).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BUCKET).setWeight(10)).withEntry(ItemEntry.builder(Items.REDSTONE).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.MELON_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.PUMPKIN_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BEETROOT_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F))))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(3)).withEntry(ItemEntry.builder(Items.BONE).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.GUNPOWDER).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.STRING).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F))))).create(); + public static LootTable SPAWN_BONUS_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(1)).withEntry(ItemEntry.builder(Items.STONE_AXE)).withEntry(ItemEntry.builder(Items.WOODEN_AXE).setWeight(3))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(1)).withEntry(ItemEntry.builder(Items.STONE_PICKAXE)).withEntry(ItemEntry.builder(Items.WOODEN_PICKAXE).setWeight(3))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(3)).withEntry(ItemEntry.builder(Items.APPLE).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F)))).withEntry(ItemEntry.builder(Items.SALMON).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F))))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(4)).withEntry(ItemEntry.builder(Items.STICK).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 12.0F)))).withEntry(ItemEntry.builder(Blocks.OAK_PLANKS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 12.0F)))).withEntry(ItemEntry.builder(Blocks.OAK_LOG).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.SPRUCE_LOG).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.BIRCH_LOG).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.JUNGLE_LOG).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.ACACIA_LOG).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.DARK_OAK_LOG).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F))))).create(); + public static LootTable STRONGHOLD_CORRIDOR_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 3.0F)).withEntry(ItemEntry.builder(Items.ENDER_PEARL).setWeight(10)).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.REDSTONE).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 9.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.APPLE).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_PICKAXE).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_SWORD).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_CHESTPLATE).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_HELMET).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_LEGGINGS).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_BOOTS).setWeight(5)).withEntry(ItemEntry.builder(Items.GOLDEN_APPLE)).withEntry(ItemEntry.builder(Items.SADDLE)).withEntry(ItemEntry.builder(Items.IRON_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.GOLDEN_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.DIAMOND_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.BOOK).withFunction(EnchantWithLevelsLootFunction.builder(ConstantLootTableRange.create(30)).allowTreasureEnchantments()))).create(); + public static LootTable STRONGHOLD_CROSSING_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 4.0F)).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.REDSTONE).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(4.0F, 9.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.APPLE).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_PICKAXE)).withEntry(ItemEntry.builder(Items.BOOK).withFunction(EnchantWithLevelsLootFunction.builder(ConstantLootTableRange.create(30)).allowTreasureEnchantments()))).create(); + public static LootTable STRONGHOLD_LIBRARY_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 10.0F)).withEntry(ItemEntry.builder(Items.BOOK).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.PAPER).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.MAP)).withEntry(ItemEntry.builder(Items.COMPASS)).withEntry(ItemEntry.builder(Items.BOOK).setWeight(10).withFunction(EnchantWithLevelsLootFunction.builder(ConstantLootTableRange.create(30)).allowTreasureEnchantments()))).create(); + public static LootTable UNDERWATER_RUIN_BIG_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 8.0F)).withEntry(ItemEntry.builder(Items.COAL).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.GOLD_NUGGET).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.EMERALD)).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 3.0F))))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(1)).withEntry(ItemEntry.builder(Items.GOLDEN_APPLE)).withEntry(ItemEntry.builder(Items.BOOK).setWeight(5).withFunction(EnchantRandomlyLootFunction.builder())).withEntry(ItemEntry.builder(Items.LEATHER_CHESTPLATE)).withEntry(ItemEntry.builder(Items.GOLDEN_HELMET)).withEntry(ItemEntry.builder(Items.FISHING_ROD).setWeight(5).withFunction(EnchantRandomlyLootFunction.builder())).withEntry(ItemEntry.builder(Items.MAP).setWeight(10).withFunction(ExplorationMapLootFunction.create().withDestination("buried_treasure").withDecoration(MapIcon.Type.RED_X).withZoom((byte)1).withSkipExistingChunks(false)))).create(); + public static LootTable UNDERWATER_RUIN_SMALL_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(2.0F, 8.0F)).withEntry(ItemEntry.builder(Items.COAL).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.STONE_AXE).setWeight(2)).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(5)).withEntry(ItemEntry.builder(Items.EMERALD)).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 3.0F))))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(1)).withEntry(ItemEntry.builder(Items.LEATHER_CHESTPLATE)).withEntry(ItemEntry.builder(Items.GOLDEN_HELMET)).withEntry(ItemEntry.builder(Items.FISHING_ROD).setWeight(5).withFunction(EnchantRandomlyLootFunction.builder())).withEntry(ItemEntry.builder(Items.MAP).setWeight(5).withFunction(ExplorationMapLootFunction.create().withDestination("buried_treasure").withDecoration(MapIcon.Type.RED_X).withZoom((byte)1).withSkipExistingChunks(false)))).create(); + public static LootTable VILLAGE_WEAPONSMITH_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 8.0F)).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.APPLE).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_PICKAXE).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_SWORD).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_CHESTPLATE).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_HELMET).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_LEGGINGS).setWeight(5)).withEntry(ItemEntry.builder(Items.IRON_BOOTS).setWeight(5)).withEntry(ItemEntry.builder(Blocks.OBSIDIAN).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 7.0F)))).withEntry(ItemEntry.builder(Blocks.OAK_SAPLING).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(3.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.SADDLE).setWeight(3)).withEntry(ItemEntry.builder(Items.IRON_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.GOLDEN_HORSE_ARMOR)).withEntry(ItemEntry.builder(Items.DIAMOND_HORSE_ARMOR))).create(); + public static LootTable VILLAGE_TOOLSMITH_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 8.0F)).withEntry(ItemEntry.builder(Items.DIAMOND).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_PICKAXE).setWeight(5)).withEntry(ItemEntry.builder(Items.COAL).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.STICK).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.IRON_SHOVEL).setWeight(5))).create(); + public static LootTable VILLAGE_CARTOGRAPHER_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 5.0F)).withEntry(ItemEntry.builder(Items.MAP).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.PAPER).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.COMPASS).setWeight(5)).withEntry(ItemEntry.builder(Items.BREAD).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.STICK).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F))))).create(); + public static LootTable VILLAGE_MASON_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 5.0F)).withEntry(ItemEntry.builder(Items.CLAY_BALL).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.FLOWER_POT).setWeight(1)).withEntry(ItemEntry.builder(Blocks.STONE).setWeight(2)).withEntry(ItemEntry.builder(Blocks.STONE_BRICKS).setWeight(2)).withEntry(ItemEntry.builder(Items.BREAD).setWeight(4).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.YELLOW_DYE).setWeight(1)).withEntry(ItemEntry.builder(Blocks.SMOOTH_STONE).setWeight(1)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1))).create(); + public static LootTable VILLAGE_ARMORER_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 5.0F)).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(4).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.IRON_HELMET).setWeight(1)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1))).create(); + public static LootTable VILLAGE_SHEPARD_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 5.0F)).withEntry(ItemEntry.builder(Blocks.WHITE_WOOL).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Blocks.BLACK_WOOL).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.GRAY_WOOL).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.BROWN_WOOL).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Blocks.LIGHT_GRAY_WOOL).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1)).withEntry(ItemEntry.builder(Items.SHEARS).setWeight(1)).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 6.0F))))).create(); + public static LootTable VILLAGE_BUTCHER_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 5.0F)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1)).withEntry(ItemEntry.builder(Items.PORKCHOP).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.BEEF).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.MUTTON).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F))))).create(); + public static LootTable VILLAGE_FLETCHER_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 5.0F)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1)).withEntry(ItemEntry.builder(Items.ARROW).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.FEATHER).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.EGG).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.FLINT).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.STICK).setWeight(6).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F))))).create(); + public static LootTable VILLAGE_FISHER_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 5.0F)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1)).withEntry(ItemEntry.builder(Items.COD).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.SALMON).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.WATER_BUCKET).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.BARREL).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.WHEAT_SEEDS).setWeight(3).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F))))).create(); + public static LootTable VILLAGE_TANNERY_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 5.0F)).withEntry(ItemEntry.builder(Items.LEATHER).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.LEATHER_CHESTPLATE).setWeight(2)).withEntry(ItemEntry.builder(Items.LEATHER_BOOTS).setWeight(2)).withEntry(ItemEntry.builder(Items.LEATHER_HELMET).setWeight(2)).withEntry(ItemEntry.builder(Items.BREAD).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.LEATHER_LEGGINGS).setWeight(2)).withEntry(ItemEntry.builder(Items.SADDLE).setWeight(1)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F))))).create(); + public static LootTable VILLAGE_TEMPLE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 8.0F)).withEntry(ItemEntry.builder(Items.REDSTONE).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(7).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(7).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.LAPIS_LAZULI).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F))))).create(); + public static LootTable VILLAGE_PLAINS_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 8.0F)).withEntry(ItemEntry.builder(Items.GOLD_NUGGET).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.DANDELION).setWeight(2)).withEntry(ItemEntry.builder(Items.POPPY).setWeight(1)).withEntry(ItemEntry.builder(Items.POTATO).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.APPLE).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.BOOK).setWeight(1)).withEntry(ItemEntry.builder(Items.FEATHER).setWeight(1)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Blocks.OAK_SAPLING).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F))))).create(); + public static LootTable VILLAGE_TAIGA_HOUSE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 8.0F)).withEntry(ItemEntry.builder(Items.IRON_NUGGET).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.FERN).setWeight(2)).withEntry(ItemEntry.builder(Items.LARGE_FERN).setWeight(2)).withEntry(ItemEntry.builder(Items.POTATO).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.SWEET_BERRIES).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.PUMPKIN_SEEDS).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.PUMPKIN_PIE).setWeight(1)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Blocks.SPRUCE_SAPLING).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.SPRUCE_SIGN).setWeight(1)).withEntry(ItemEntry.builder(Items.SPRUCE_LOG).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F))))).create(); + public static LootTable VILLAGE_SAVANNA_HOUSE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 8.0F)).withEntry(ItemEntry.builder(Items.GOLD_NUGGET).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.GRASS).setWeight(5)).withEntry(ItemEntry.builder(Items.TALL_GRASS).setWeight(5)).withEntry(ItemEntry.builder(Items.BREAD).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.WHEAT_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Blocks.ACACIA_SAPLING).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F)))).withEntry(ItemEntry.builder(Items.SADDLE).setWeight(1)).withEntry(ItemEntry.builder(Blocks.TORCH).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 2.0F)))).withEntry(ItemEntry.builder(Items.BUCKET).setWeight(1))).create(); + public static LootTable VILLAGE_SNOWY_HOUSE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 8.0F)).withEntry(ItemEntry.builder(Blocks.BLUE_ICE).setWeight(1)).withEntry(ItemEntry.builder(Blocks.SNOW_BLOCK).setWeight(4)).withEntry(ItemEntry.builder(Items.POTATO).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BEETROOT_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 5.0F)))).withEntry(ItemEntry.builder(Items.BEETROOT_SOUP).setWeight(1)).withEntry(ItemEntry.builder(Items.FURNACE).setWeight(1)).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.SNOWBALL).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F))))).create(); + public static LootTable VILLAGE_DESERT_HOUSE_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(3.0F, 8.0F)).withEntry(ItemEntry.builder(Items.CLAY_BALL).setWeight(1)).withEntry(ItemEntry.builder(Items.GREEN_DYE).setWeight(1)).withEntry(ItemEntry.builder(Blocks.CACTUS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 7.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BOOK).setWeight(1)).withEntry(ItemEntry.builder(Blocks.DEAD_BUSH).setWeight(2).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F)))).withEntry(ItemEntry.builder(Items.EMERALD).setWeight(1).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 3.0F))))).create(); + public static LootTable WOODLAND_MANSION_CHEST = LootTable.builder().withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 3.0F)).withEntry(ItemEntry.builder(Items.LEAD).setWeight(20)).withEntry(ItemEntry.builder(Items.GOLDEN_APPLE).setWeight(15)).withEntry(ItemEntry.builder(Items.ENCHANTED_GOLDEN_APPLE).setWeight(2)).withEntry(ItemEntry.builder(Items.MUSIC_DISC_13).setWeight(15)).withEntry(ItemEntry.builder(Items.MUSIC_DISC_CAT).setWeight(15)).withEntry(ItemEntry.builder(Items.NAME_TAG).setWeight(20)).withEntry(ItemEntry.builder(Items.CHAINMAIL_CHESTPLATE).setWeight(10)).withEntry(ItemEntry.builder(Items.DIAMOND_HOE).setWeight(15)).withEntry(ItemEntry.builder(Items.DIAMOND_CHESTPLATE).setWeight(5)).withEntry(ItemEntry.builder(Items.BOOK).setWeight(10).withFunction(EnchantRandomlyLootFunction.builder()))).withPool(LootPool.builder().withRolls(UniformLootTableRange.between(1.0F, 4.0F)).withEntry(ItemEntry.builder(Items.IRON_INGOT).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.GOLD_INGOT).setWeight(5).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BREAD).setWeight(20)).withEntry(ItemEntry.builder(Items.WHEAT).setWeight(20).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BUCKET).setWeight(10)).withEntry(ItemEntry.builder(Items.REDSTONE).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.COAL).setWeight(15).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.MELON_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.PUMPKIN_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F)))).withEntry(ItemEntry.builder(Items.BEETROOT_SEEDS).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(2.0F, 4.0F))))).withPool(LootPool.builder().withRolls(ConstantLootTableRange.create(3)).withEntry(ItemEntry.builder(Items.BONE).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.GUNPOWDER).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.ROTTEN_FLESH).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F)))).withEntry(ItemEntry.builder(Items.STRING).setWeight(10).withFunction(SetCountLootFunction.builder(UniformLootTableRange.between(1.0F, 8.0F))))).create(); + + +} diff --git a/src/main/java/kaptainwutax/seedcracker/util/math/Predicates.java b/src/main/java/kaptainwutax/seedcracker/util/math/Predicates.java new file mode 100644 index 0000000..705c366 --- /dev/null +++ b/src/main/java/kaptainwutax/seedcracker/util/math/Predicates.java @@ -0,0 +1,14 @@ +package kaptainwutax.seedcracker.util.math; + +import java.util.function.BiPredicate; + +public class Predicates { + + public static BiPredicate EQUAL_TO = Integer::equals; + public static BiPredicate NOT_EQUAL_TO = (a, b) -> !a.equals(b); + public static BiPredicate LESS_THAN = (a, b) -> a < b; + public static BiPredicate MORE_THAN = (a, b) -> a > b; + public static BiPredicate LESS_OR_EQUAL_TO = (a, b) -> a <= b; + public static BiPredicate MORE_OR_EQUAL_TO = (a, b) -> a >= b; + +}