minecraft-ram-calculator

1.1.2 • Public • Published

Minecraft RAM Calculator

NPM Version License Node.js Package

The Minecraft RAM Calculator is an npm package that simplifies the process of determining how much RAM is required for your Minecraft server, based on various server and player-related factors. This tool helps server administrators optimize their server's performance by ensuring they allocate the appropriate amount of memory.

Features

  • Easy-to-use JavaScript library for calculating required RAM.
  • Supports various Minecraft server configurations and player counts.
  • Provides recommendations for optimal RAM allocation.
  • Helps prevent server lag and crashes due to insufficient memory.

Installation

You can install the Minecraft RAM Calculator package via npm:

npm install minecraft-ram-calculator

Usage

const mrc = require('minecraft-ram-calculator');

// Example usage:
const maxPlayersPerInstance = 8; // Set the maximum players on the instance
const maxInstances = 7; // Set your maximum instances here.

const numPlayers = 100; // The number of players on your server
const ramNeeded = mrc.calculateRAMNeeded(numPlayers, maxPlayersPerInstance, maxInstances);

console.log(`For ${numPlayers} players, you need ${ramNeeded.ramNeeded} GB RAM.`);
console.log(`This will use ${ramNeeded.instances} instances, leaving ${ramNeeded.playersLeftOut} players left out.`);

Instances

You will have to define the max players you want in every instance. For example, as bedwars solos have the limit of 8 players, this value will be 8. If you don't want to have a limit, you can add the ins argument:

const ramNeeded = mrc.calculateRAMNeeded(numPlayers, maxPlayersPerInstance, maxInstances, ins = false);

Configuration

You can customize the serverProperties object to match your server's specific settings. The calculateRAM function will take these properties into account when making its recommendation.

License

This project is licensed under the MIT License.

Contributing

We welcome contributions from the community! To contribute to the Minecraft RAM Calculator project, follow these steps:

  1. Fork this repository.

  2. Clone your forked repository to your local machine.

  3. Create a new branch for your contribution:

   git checkout -b feature/my-contribution

Replace feature/my-contribution with a descriptive branch name.

  1. Make your changes and commit them with clear and concise commit messages.

  2. Push your changes to your forked repository:

   git push origin feature/my-contribution
  1. Create a pull request (PR) from your forked repository to this main repository.

  2. Describe your changes and the rationale behind them in the PR description.

  3. Our team will review your PR, provide feedback if needed, and merge it when it's ready.

Thank you for contributing to the Minecraft RAM Calculator project!

Support

If you have any questions, issues, or feature requests, please open an issue on our GitHub repository.

Happy gaming!

Readme

Keywords

none

Package Sidebar

Install

npm i minecraft-ram-calculator

Weekly Downloads

2

Version

1.1.2

License

MIT

Unpacked Size

21.6 kB

Total Files

7

Last publish

Collaborators

  • joanferrecid098