npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

farming-weight

v0.17.2

Published

Tools for calculating farming weight and fortune in Hypixel Skyblock

Downloads

2,109

Readme

Farming Weight

NPM package for Farming Weight and fortune calculations in Hypixel SkyBlock.

Created specifically for the EliteWebsite and EliteBot projects, but can be used for any project, as long as some credit is given per the license.

Installation

npm install farming-weight

Usage

This package is made with TypeScript, and has type definitions included. While there is a lack of docs, relevant types and autocomplete should help a lot with understanding the package.

General philosophy

The goal of this package is to provide an easy way to pass in existing data and get Farming Weight information back. With this in mind, the input data is not always raw Hypixel API responses, as those are prone to change. While this may be inconvenient for some projects, it should be easy enough to convert the data to the format expected by this package, and it moves the burden of keeping up with Hypixel API changes out of this package.

Farming Weight Calculator

The createFarmingWeightCalculator function is the main entry point for this package. It takes in a single object with data required for the full farming weight calculation. Data can be skipped, and the weight calculator will skip the related weight that would be calculated from that data.

import { createFarmingWeightCalculator } from 'farming-weight';

const member = // Get SkyBlock member from elsewhere (https://api.hypixel.net/)

const calculator = createFarmingWeightCalculator({
	collection: member.collection,
	farmingXp: member.player_data?.experience?.SKILL_FARMING,
	levelCapUpgrade: member.jacobs_contest?.perks?.farming_level_cap,
	anitaBonusFarmingFortuneLevel?: member.jacobs_contest?.perks?.double_drops,
	minions: member.player_data?.crafted_generators, // You should also include minions crafted from other members on the same profile
	contests: Object.values(member.jacob_contest?.contests ?? {}),
	pests: member.bestiary.kills
})

// Can pass in some values instead of calculating them (you can exclude contests above if you do this)
calculator.setEarnedMedals({
	diamond: /* Number of diamond medals */,
	platinum: /* Number of platinum medals */,
	gold: /* Number of gold medals */,
})

const weight = calculator.getWeightInfo();

console.log(weight.totalWeight);
// 10000.53 (or whatever the total weight is)

console.log(weight.bonusSources);
// { "Contest Medals": 123.25, "Farming Level": 250, ... }

Rates Calculator

The rates calculator turns farming fortune and a list of effects into expected drops, collection and NPC profit.

import {
	buildEffectEnvironmentFromOptions,
	calculateDetailedDropsFromEffects,
	Crop,
	type Effect,
} from 'farming-weight';

const crop = Crop.Wheat;
const env = buildEffectEnvironmentFromOptions({ selectedCrop: crop }, crop);

const effects: Effect[] = [
	// Effects from your tools, armor, pets, etc.
];

const drops = calculateDetailedDropsFromEffects({
	crop,
	blocksBroken: 24000, // 100% efficiency for 20 minutes
	farmingFortune: 2000,
	effects,
	env,
});

console.log(drops.collection);
console.log(drops.effectsBreakdown);
console.log(drops.appliedEffects);

Effects are resolved by the functions in effects/resolver.ts, which are also exported if you only need stat totals or breakdowns.