From 932c773e12cb7e57a709019cd3a89da60f63317f Mon Sep 17 00:00:00 2001 From: Sollace Date: Fri, 11 Oct 2024 16:01:43 +0100 Subject: [PATCH] Fixed short grass dropping wheat worms instead of oat seeds --- .../loot/UBlockAdditionsLootTableProvider.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/datagen/providers/loot/UBlockAdditionsLootTableProvider.java b/src/main/java/com/minelittlepony/unicopia/datagen/providers/loot/UBlockAdditionsLootTableProvider.java index 6e267f9a..b5e57bb4 100644 --- a/src/main/java/com/minelittlepony/unicopia/datagen/providers/loot/UBlockAdditionsLootTableProvider.java +++ b/src/main/java/com/minelittlepony/unicopia/datagen/providers/loot/UBlockAdditionsLootTableProvider.java @@ -79,7 +79,7 @@ public class UBlockAdditionsLootTableProvider extends FabricBlockLootTableProvid addVanillaDrop(Blocks.DIRT, block -> gemstoneAndWormDrops(block, 2, 0.05F, 0.052222223F, 0.055F, 0.066666665F, 0.1F)); addVanillaDrop(Blocks.COARSE_DIRT, block -> gemstoneAndWormDrops(block, 2, 0.05F, 0.052222223F, 0.055F, 0.066666665F, 0.1F)); addVanillaDrop(Blocks.GRASS_BLOCK, block -> gemstoneAndWormDrops(block, 2, 0.05F, 0.052222223F, 0.055F, 0.066666665F, 0.1F)); - addVanillaDrop(Blocks.SHORT_GRASS, block -> wormDrops(block, 2, 0.05F, 0.052222223F, 0.055F, 0.066666665F, 0.1F)); + addVanillaDrop(Blocks.SHORT_GRASS, block -> chanceDrop(block, UItems.OAT_SEEDS, 2, 0.05F, 0.052222223F, 0.055F, 0.066666665F, 0.1F)); addVanillaDrop(Blocks.MYCELIUM, block -> wormDrops(block, 3, 0.06F, 0.062222223F, 0.065F, 0.077777776F, 0.2F)); addVanillaDrop(Blocks.PODZOL, block -> wormDrops(block, 4, 0.06F, 0.062222223F, 0.065F, 0.077777776F, 0.2F)); addVanillaDrop(Blocks.DIAMOND_ORE, this::crystalShardDrops); @@ -114,15 +114,19 @@ public class UBlockAdditionsLootTableProvider extends FabricBlockLootTableProvid ); } - public LootTable.Builder wormDrops(Block block, int max, float...chance) { + public LootTable.Builder chanceDrop(Block block, ItemConvertible item, int max, float...chance) { return LootTable.builder() .pool(LootPool.builder() .rolls(ConstantLootNumberProvider.create(1)) .conditionally(createWithoutSilkTouchCondition()) - .with(chanceDrops(block, UItems.WHEAT_WORMS, max, chance)) + .with(chanceDrops(block, item, max, chance)) ); } + public LootTable.Builder wormDrops(Block block, int max, float...chance) { + return chanceDrop(block, UItems.WHEAT_WORMS, max, chance); + } + public LootTable.Builder gemstoneAndWormDrops(Block block, int max, float...chance) { return LootTable.builder() .pool(LootPool.builder()