Code Monkey home page Code Monkey logo

mcresourceanalyzer's Introduction

Minecraft Resource Analyzer

MCResourceAnalyzer gathers data from Minecraft region files to determine the empirical distribution of naturally-occurring block types. For more information, see this page.

Using the program

  1. Clone the repository and build it with Maven or download the latest release here.
  2. If your world was generated with a version after Beta 1.3, use the region directory from your Minecraft world as the program's input. If the world was generated with a version between Infdev 20100327 and Beta 1.2, use the entire world directory as the input. If the world was generated with Indev, use the world.mclevel file as the input.
  3. Run the program with java -jar mc-resource-analyzer-x.x.x.jar [options...] [input path]. After analyzing the world, the program will create a file in the same directory named data.csv.

Note that the numbers for minecraft:air may be inaccurate at high Y values due to the way Minecraft stores chunks.

Command line arguments

java -jar mc-resource-analyzer-x.x.x.jar [-hjmsStV] [-B=PATH] [-M=PATH] [-o=STRING] [-T=PATH] [-v=VERSION] [INPUT]

Positional arguments

  • INPUT (default: region): The to the region directory or .mclevel file to analyze. Both relative and absolute paths are supported.

Options and flags

  • -h, --help: Show usage help.
  • -t, --table: Generates a simple HTML table with the collected data.
  • -T, --table-template: When used in conjunction with table, the generated table will replace any instances of the string {{{TABLE}}} in a copy of the template file. Note that the table will not include <table></table> tags when using this argument.
  • -s, --statistics: Outputs a file with statistics about the analysis.
  • -j, --json: Outputs a JSON file with containing the counts of each block.
  • -o, --output-prefix: Use this argument to add a prefix to the program's output files. For example, using -o abc would result in the files abc.csv and abc_table.html.
  • -v, --version-select: Use this argument if you want to analyze a world that was not generated with the latest version of Minecraft. Selecting a version that does not match the version with which the regions were generated may result in unexpected behavior. The following versions are supported:
    • ANVIL_118 for 1.18 to 1.20.4 (default)
    • ANVIL_2021 for 1.16 to 1.17
    • ANVIL_2018 for 1.13 to 1.15
    • ANVIL_2012 for 1.2 to 1.12
    • MCREGION for Beta 1.3 to 1.1
    • ALPHA for Infdev 20100327 to Beta 1.2
    • INDEV for Indev 0.31 20100122 to Infdev 20100325
  • -m, --modernize-ids: If analyzing regions saved before 1.13, numeric block IDs will be replaced with their modern string representations. If no string corresponding to the numeric ID is found, the numeric ID will be saved instead.
  • -B, --block-ids: When using the --modernize-ids option on a world with block IDs outside the range of 0-255, use this to specify the path to a file containing block IDs in the same format as blocks.properties.
  • -M, --merge-ids: When analyzing a world with block IDs outside the range of 0-255, use this to specify the path to a file containing block IDs in the same format as merge.properties. Any block with an ID listed in this file will have all of its variants merged into a single value.
  • -n, --num-threads (default: 8): The maximum number of threads to use for analysis.
  • -S, --silent: Prevents the program from printing output, other than errors. This may result in marginally improved performance.

Version compatibility

MCResourceAnalyzer 1.2.4 can analyze worlds generated with any version of Minecraft: Java Edition between Indev 0.31 20100122 and 1.20.4.

Note that Indev worlds with the Long and Deep world shapes are not supported.

Contributing

Contributions to this project are more than welcome. If you fork MCResourceAnalyzer, please include the following URL somewhere in your fork: https://github.com/Meeples10/MCResourceAnalyzer

If you notice that MCResourceAnalyzer fails to analyze a particular world, please create an issue with the version of Minecraft with which the world was generated, the output of the program, and, if possible, the region file that caused the failure.

mcresourceanalyzer's People

Contributors

meeples10 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

grossley

mcresourceanalyzer's Issues

Missing Preview Image in Minecraft 1.18 Resource Distribution

Hello, kind to fix these issue below very helpful for me..
image

I'm going to build huge item sorter.. But I need the block ratio distribution overview for item placement in my sorting system.

Thanks, hope fixed asap ! ;)
I'm going to put block that was generated >= 10.000.000 in my big boys :D

1.17.x support?

Hello! I came across your work while researching ore distribution. I am working on a 1.17 data pack to greatly increase the caving/mineable areas, as 1.17 has increased its possible world heights by a wide margin. Through anecdotal evidence it seems the ore density has dropped precipitously but I cannot confirm it, and I need information on both quantity of ores and their distribution (other tools can only give me the quantity). If MCResourceAnalyzer can do what I need to do for 1.17 it would be very helpful for me in my development of this data pack. Does it support it and, if not, could support be added in the future? Please let me know when you can!

Update: I tested it on my 1.17 world, it only seems to be analyzing the 0-255 portion

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.