LootTableEvents.MODIFY.register((key, tableBuilder, source, registry) ->{
if(LootTables.BURIED_TREASURE_CHEST.equals(key.getValue())){
LootPool.Builder poolBuilder = LootPool.builder().rolls(ConstantLootNumberProvider.create(1))
.conditionally(RandomChanceLootCondition.builder(1f))
.with(ItemEntry.builder(Items.SNIFFER_EGG))
.apply(SetCountLootFunction.builder(UniformLootNumberProvider.create(1.0f,2.0f)).build());
tableBuilder.pool(poolBuilder.build());
}
});
So been trying to get this to work in minecraft 1.21.4 and it just doesnt work