udoprog / c10t

A minecraft cartography tool
Other
225 stars 50 forks source link

Add ability to output only JSON #116

Closed EdGruberman closed 10 years ago

EdGruberman commented 13 years ago

It's really useful to be able to do the image generation periodically, but then update the markers quickly and more frequently. Right now the only way to update the JSON output is to render an image alongside it. If c10t had the option to only output the JSON and skip the image rendering it would make refreshing markers a lot less resource intensive.

If the -o option was excluded then skipping image generation and instead just parsing the markers and creating the JSON would be ideal.

(I know this is an image program and it seems weird to include an option to not generate an image, but I think marker data and image rendering are complimentary. I'm also hoping this is a trivial modification.)

udoprog commented 13 years ago

Love it - will however need to refactor the code to do something more general on a chunk to chunk basis, but that's not too difficult really, just needs some planning.

EdGruberman commented 13 years ago

Ah, I was hoping you could just do one big "if (-o) { renderImage }" wrapper inside a chunk parsing routine. LOL

udoprog commented 13 years ago

The routines actually are related to parsing the image, the markers are read in the same go, need to detach the logic to parse the world more clearly. Dunno when I will find the time to do it right now, but this more and more looks like a general purpose minecraft c++ library.

EdGruberman commented 13 years ago

Maybe it's time for me to learn C++... ;)

I suppose the other option here is to write a simple script that parses the chunk data and outputs markers independently of c10t. Since we have the conversion routines all I need to get out of the chunks is the core data itself.

I've seen .NET libraries that do such and I suppose it wouldn't be a stretch to convert such into something like a PowerShell script for my purposes.

Backburner this idea for now, I'll see if I can't get my own solution in place.

Thank you, sir!

ImmortalJ commented 13 years ago

I would very much like to see this feature added too.