webbukkit / DynmapBlockScan

Tool to scan post-1.8 MC blocks and JSON model data to automatically generate Dynmap models
63 stars 30 forks source link

DynmapBlockScan removing files it created when disabled #28

Closed Dooglesmile closed 5 years ago

Dooglesmile commented 5 years ago

Hi, I'm using Dynmap-3.0-beta-1-forge-1.12.2 with DynmapBlockScan-3.0-alpha-2-forge-1.12.2 which generated 60+ text files in the modsupport folder for various mod blocks (tinkers construct, AE2 etc), which did render in dynmap when I did a radius render from within the game. (I don't get any stairs rendering though, even vanilla ones)

However, I took out the DynmapBlockScan mod whilst testing things, and it automatically deleted all of the files it had created in the modsupport folder, thus stopping all the modded blocks from rendering in the map.

Is this intended behaviour when removing the mod or have I found a little bug?

mikeprimm commented 5 years ago

The files created by DynmapBlockScan are actually being created by Dynmap itself - DynmapBlockScan uses an API provided by Dynmap to declare the block definitions it discovers and publishes during startup, and those definitions are not specifically considered persistent - so, when Dynmap starts up, it cleans up the mod support API based files so that the files that are then generated by mods using the API (whether DynmapBlockScan or others) are accurate for the versions of the plugins doing the publish (so that we don't wind up with obsolete or duplicate definitions as new or updated mods are added, or if mods are removed). If you want to keep those files, and not keep DynmapBlockScan installed, you can move the files from the '~/renderdata/modsupport' directory up to the '~/renderdata': the files there are considered 'static' and will not be cleaned up. Just remember to remove them if you decide to put DynmapBlockScan back in, for the sake of updated block support, new/updated mods, or whatever - otherwise, the stale model and texture files might clash with the newly created ones.

Dooglesmile commented 5 years ago

Thanks for that answer, I did a little playing, put the blockscan mod back in and it recreated the files, then removed it again and watched as my server loaded and just as dynmap loaded, the files vanished :)

It is rendering the modded files now though so I'm happy. Loving the ability to explore my world even when I'm sat at work when it's quiet :)