Skip to main content

Minecraft utility calculations for blocks, chunks, and more

Project description

McCalcTools is just what you need to help with your Minecraft calculations and those model builds you've been thinking about. It lets you convert blocks to meters, calculate which chunk each item falls into, how many stacks you need, areas, volumes, and even simulated circumferences. It's a pleasure to plan and design constructions, both in-game and in the real world!

Installation

To install this package, once it's available on PyPI, just do this:

pip install McCalcTools

Basic Use

import McCalcTools as mcalc

# How many stacks do I need to store 150 items?
print(mcalc.calcstuck(150)) # 2

# In which chunk is block number 45?
print(mcalc.calcchunk(45)) # 2

# Convert 10 blocks to real-size meters (with a scale of 20)
print(mcalc.realsize(10, 1)) # 200

# Calculate how many blocks you need for 100 real-size meters (scale 1)
print(mcalc.blocksize(100, 1)) # 5

# Calculate the volume of a 10x5x3 block structure
print(mcalc.blockvolume(10, 5, 3)) # 150

# Calculate how many blocks you need for a circle with a radius of 8
print(mcalc.circumference_blocks(8)) # 50

# Calculate the real area of ​​a square with 10 blocks per side (scale 20)
print(mcalc. square_area_real(10)) # 40000

Included Functions

  • calcstuck(items): Tells you how many full stacks you need for a given number of items.
  • calcchunk(blocks): Gives you the chunk number a block is located in.
  • realsize(blocks, scale): Converts blocks to real-world meters, taking into account the scale.
  • blocksize(meters, scale): Converts real-world meters to blocks, depending on the scale you use.
  • blockvolume(length, width, height): Calculates the total volume in blocks.
  • circumference_blocks(radius): Calculates the number of blocks needed to simulate a circumference.
  • square_area_real(blocks_side, scale=20): Calculates the real-world area of ​​a square in meters.

License

This project is released under the MIT License. See the LICENSE file for full details.


Do you have an idea or would you like to contribute? Don't be shy and open an issue or send a pull request!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mccalctools-0.3.9.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mccalctools-0.3.9-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file mccalctools-0.3.9.tar.gz.

File metadata

  • Download URL: mccalctools-0.3.9.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mccalctools-0.3.9.tar.gz
Algorithm Hash digest
SHA256 16cde787e8ba76e0508f2bf5e2ade475e1a2d85dd0e3d76e5fa83fee1086b87c
MD5 91d31a1262b305a03e60175a67434a99
BLAKE2b-256 448014d8b524744333c3a56d5461c9e6858c5c860c61bbf377acdef455e6ebf6

See more details on using hashes here.

File details

Details for the file mccalctools-0.3.9-py3-none-any.whl.

File metadata

  • Download URL: mccalctools-0.3.9-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for mccalctools-0.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 28f0376b7af70bd051ed0f8b9fccc1519d8caae61b95cacee785cc37cc3d40d4
MD5 8a68402a1baab3dc826f62fcabbd4ad6
BLAKE2b-256 a70f8c52abfeb722597188c8a366b7b3dea92d5156f6acd56fa49f87e9a372b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page