minecraft-dev / MinecraftDev

Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
https://minecraftdev.org/
GNU Lesser General Public License v3.0
1.52k stars 186 forks source link

fabric: Suggesting add class to manifest which impls fabric.api.datagen.v1.DataGeneratorEntrypoint? #2381

Open KisaragiEffective opened 1 month ago

KisaragiEffective commented 1 month ago

Minecraft Development for IntelliJ plugin version

2024.2-1.8.1

Description of the feature request

MOD developer may implement net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint to generate datapack from code. This is useful when one prefer code than JSONs, and is actually convertible by "Data Generation API".

We can enable it from the build.gradle. However, one should add implementation FQCN in fabric.mod.json to refer the entrypoints in entrypoints.fabric-datagen[*].

One can notice easily by issued warning from ./gradlew runDatagen:

[04:54:40] [main/WARN] (FabricDataGenHelper) No data generator entrypoints are defined. Implement net.fabricmc.fabric.api.datagen.v1.DataGeneratorEntrypoint and add your class to the 'fabric-datagen' entrypoint key in your fabric.mod.json.

However, it might be better to have integration on plugin side.