Skip to main content

Minecraft utility calculations for blocks, chunks, and more

Project description

McCalcTools-Python-Module

The translation to python of McCalcTools, the great gitpack module for minecraft calculations. 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 semi_square circumference with a radius of 8
print(mcalc.square_circumference_blocks(8)) 

# Calculate how many blocks you need for a circumference without 3 blocks on the corner with a radius of 8
print(mcalc.not3Cornered_circumference_blocks(8)) 

# Calculate how many blocks you need for a circumference without 6 blocks on the corner with a radius of 8
print(mcalc.not6Cornered_circumference_blocks(8))

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

# Calculate the range of yout minecraft's world, you have to input your seed in a seed map and count all de biomes you've seen in a square of 1000x1000 blocks.
print(mcalc.range(13)) # 1.3

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.4.1.tar.gz (3.5 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.4.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mccalctools-0.4.1.tar.gz
Algorithm Hash digest
SHA256 dfb0a3754d386f3718c308ff6c8a21d8c123f8f2cb9c75ff4091ac0211fc9da6
MD5 04ee07f136fa7ef24595ab1d5a70ac6d
BLAKE2b-256 80c323b0302a409743eb481b6a90d6f0382d36b2d893a5a9e3f97d5584fc219c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mccalctools-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 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.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a701c26ef9847cf08ebdba7fb146f2de9b4bf9cb67e7bd114afb9ba412d10383
MD5 bddaa28dab1600de88e44d86430981e7
BLAKE2b-256 9ee231e4e7efc2f748c8cad38c2f6990ab8449f8407fc3b1604f9f40bed6b520

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