#[solved] datagen as build? pack.mcmeta?

13 messages · Page 1 of 1 (latest)

leaden axle
#

Hello,

I've set up datagen with its own source set in one of my projects but there are two things I'm unsure about:

  1. is runDatagen supposed to be run manually, and src/main/generated tracked?
  2. is there a way to generate pack.mcmeta files for builtin resource packs?

I'm confused about 1. because gradlew clean removes src/main/generated, but I can't seem to get the data to re-generate when I build or do runClient. Is clean supposed to do that?

Here is my current build.gradle:
https://gitlab.com/supersaiyansubtlety-group/minecraft-mods/sturdy_carts/-/blob/0e15bc206c3a11c4c5cc6a4d01a231c7b153a825/build.gradle#L27

thick pagoda
#

Yes datagen is run manually, it's up to you whether or not to include it in git (since it's technically reproducible just by running it) @leaden axle

#

I don't know about the rest

leaden axle
thick pagoda
#

Likely intended imo, but maybe not

leaden axle
#

why would that be intended if datagen isn't meant to be part of the build process?

thick pagoda
#

That's fair.
It is meant to be part of the process in a way. If you change something that'll affect datagen then rerun datagen, but half the point is to not worry about it...

leaden axle
#

iiuc clean isn't meant to change the outcome of builds, it just deletes cached files which automatically re-generate as a part of building

but deleting generated data means that that data won't be in built jars or present for runServer/Client until I manually re-run runDatagen, so it affects the outcome of builds

but idk, maybe I'm misunderstanding part of this

thick pagoda
#

No, it sounds like you understand it perfectly. I guess it is weird.

leaden axle
#

oh it looks like for 2. I can just add a MetadataProvider, trying that

leaden axle
#

is there a way to mark a thread as solved?

thick pagoda
#

Best is you can write (solved) at the beginning and close it.