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 semi_square circumference with a radius of 8
print(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(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(not6Cornered_circumference_blocks(8)) 

# 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.4.0.tar.gz (3.3 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.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mccalctools-0.4.0.tar.gz
  • Upload date:
  • Size: 3.3 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.0.tar.gz
Algorithm Hash digest
SHA256 735bf85e3c6e3b3bd12b2d5aa8ba5b5582b32bc422e0cc9b21e0873c0f07a093
MD5 47a2032197c432fee0e64bdef53fd230
BLAKE2b-256 8d99a8d542956e33faf25a85f37e10daaf8c39d0549072876fc5df738fe7f4f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mccalctools-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 4.3 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9490d5f13c30a3eda26334b36f18276cbe025b9281e74a67837f7a23d0816839
MD5 c2002e8dd0f901e919a2011bcde3acf9
BLAKE2b-256 c452d40128ee1e5a0dd4aa37a435c4906e100b955ac72a4cad83c2a5b3cb6a3f

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