maruohon / tellme

Small informational mod for Minecraft
22 stars 10 forks source link

[Suggestion] Blockstats Count by Y-Level #24

Open Akaitatsu opened 3 years ago

Akaitatsu commented 3 years ago

Would it be possible to dump the block counts for each layer/y-level (1.15.2+)? This would help me with 2 things. One is that JER hasn't implemented world profiling for 1.15.2 yet (JER Issue 240), so I would like to at least be able to generate some world gen stats for the JER interface. I also like to make bar charts for ore gen stats so I know the best layers to mine specific resources. Even if profiling is added back to JER, the CSV output would be much better than JER's JSON output for making my charts.

maruohon commented 3 years ago

How exactly/where would the dump be output in that case, if there are lots of different output data tables (one per y-level) in that case? Would it still go to one file?

You can also kind of do that already, if you copy paste the count and output commands for each y-level into batch file and run that file with the /tellme batch_run command. But that would output each y-level to a separate csv file.

Akaitatsu commented 3 years ago

I would like a single file (block_stats-by-level_2020-10-17_14.11.07.csv), like blockstats*.csv but with one extra column with y-level (example below). You could skip output for rows with a count of 0.

"Registry name","Display name"."Y-Level","Count"
"appliedenergistics2:charged_quartz_ore","Charged Certus Quartz Ore",21,145
"appliedenergistics2:charged_quartz_ore","Charged Certus Quartz Ore",22,450
"appliedenergistics2:charged_quartz_ore","Charged Certus Quartz Ore",23,499
"appliedenergistics2:quartz_ore","Certus Quartz Ore",21,9386
"appliedenergistics2:quartz_ore","Certus Quartz Ore",22,9387
"appliedenergistics2:quartz_ore","Certus Quartz Ore",23,9367

I thought about running the count/output commands but didn't think of running them from a batch file. The one file like I mentioned would be much better, but I could probably concatenate the multiple output files together with another script.

maruohon commented 3 years ago

Alright, I can add that in the coming days when I get the chance. Do you need it for 1.15.2 Forge, or which version?

Akaitatsu commented 3 years ago

1.15.2 Forge please.

Take your time and Many Thanks!

Akaitatsu commented 3 years ago

It looks like a lot of Mod Developers have already jumped to 1.16 so I am going to do the same. I don't need this feature for 1.15.2 anymore so you can jump to 1.16 if you haven't started that already.

Akaitatsu commented 1 year ago

I'm glad to see you've updated to 1.19.2 since I just got back into Minecraft with my family. Is this feature still under consideration? I am going to try the batch option for now, but will have to write something to pull the files together in the right order. Also, there are a lot more y-levels these days.

RundownRhino's fork looks interesting in that it does the JER output, but I will let you determine if that is appropriate scope for your project.

maruohon commented 1 year ago

I think I worked on this for a bit back then, but I think it was left unfinished. I'll have to see if I can find that old code or what happened to it...

RundownRhino commented 1 year ago

@Akaitatsu After making that fork, I ended up developing a standalone tool for this. It is slighly different from what you're asking in that it produces output in JER's world-gen.json format, not a CSV, but maybe that's acceptable for whatever your goal is.

EDIT: Just pushed an update to it that allows exporting to CSV.

Akaitatsu commented 1 year ago

The JEI world-gen file is ultimately what I wanted to get to when I posted the feature request. The CSV data is very handy for balancing and testing too. I will try the standalone tool later this weekend. Many thanks!

Akaitatsu commented 1 year ago

@RundownRhino, that JER export tool worked like a champ! I generated the world-gen.json for my 1.19.2 forge world this afternoon. Your documentation was excellent as well. It was super easy to use.

@maruohon, while this would be a great feature to have in TellMe, I don't need it anymore. If you want to close the issue, I will understand. If you want to implement it eventually, I would be glad to help with testing and such.