mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-03-04 18:48:12 +00:00
Move datagen to its own source set
MC 1.21.4 means we have to move more data generation code into the client source set. Given all this code movement, it probably makes sense to put data generation in a separate source set instead. 1.21.4 also has split data generators for client and server, but neither mod loader recommends this. This means we can/should merge DataProviders and ClientDataProviders into a single class. Data generators are no longer bundled with the jar, which does reduce file size, but by a tiny amount (~70KiB).
This commit is contained in:
parent
7c02979c22
commit
9bbf3f3e1d
@ -40,8 +40,8 @@ path = [
|
|||||||
"projects/core/src/main/resources/data/computercraft/lua/rom/modules/main/.ignoreme",
|
"projects/core/src/main/resources/data/computercraft/lua/rom/modules/main/.ignoreme",
|
||||||
"projects/core/src/main/resources/data/computercraft/lua/rom/modules/turtle/.ignoreme",
|
"projects/core/src/main/resources/data/computercraft/lua/rom/modules/turtle/.ignoreme",
|
||||||
"projects/core/src/main/resources/data/computercraft/lua/rom/motd.txt",
|
"projects/core/src/main/resources/data/computercraft/lua/rom/motd.txt",
|
||||||
"projects/fabric-api/src/main/modJson/fabric.mod.json",
|
|
||||||
"projects/fabric/src/client/resources/computercraft-client.fabric.mixins.json",
|
"projects/fabric/src/client/resources/computercraft-client.fabric.mixins.json",
|
||||||
|
"projects/fabric/src/datagen/resources/fabric.mod.json",
|
||||||
"projects/fabric/src/main/resources/computercraft.fabric.mixins.json",
|
"projects/fabric/src/main/resources/computercraft.fabric.mixins.json",
|
||||||
"projects/fabric/src/main/resources/fabric.mod.json",
|
"projects/fabric/src/main/resources/fabric.mod.json",
|
||||||
"projects/fabric/src/testMod/resources/computercraft-gametest.fabric.mixins.json",
|
"projects/fabric/src/testMod/resources/computercraft-gametest.fabric.mixins.json",
|
||||||
|
@ -19,26 +19,32 @@ plugins {
|
|||||||
val main = sourceSets["main"]
|
val main = sourceSets["main"]
|
||||||
val client = sourceSets["client"]
|
val client = sourceSets["client"]
|
||||||
|
|
||||||
// Both testMod and testFixtures inherit from the main and client classpath, just so we have access to Minecraft classes.
|
// datagen and testMod inherit from the main and client classpath, just so we have access to Minecraft classes.
|
||||||
|
val datagen by sourceSets.creating {
|
||||||
|
compileClasspath += main.compileClasspath + client.compileClasspath
|
||||||
|
runtimeClasspath += main.runtimeClasspath + client.runtimeClasspath
|
||||||
|
}
|
||||||
|
|
||||||
val testMod by sourceSets.creating {
|
val testMod by sourceSets.creating {
|
||||||
compileClasspath += main.compileClasspath + client.compileClasspath
|
compileClasspath += main.compileClasspath + client.compileClasspath
|
||||||
runtimeClasspath += main.runtimeClasspath + client.runtimeClasspath
|
runtimeClasspath += main.runtimeClasspath + client.runtimeClasspath
|
||||||
}
|
}
|
||||||
|
|
||||||
configurations {
|
val extraConfigurations = listOf(datagen, testMod)
|
||||||
named(testMod.compileClasspathConfigurationName) {
|
|
||||||
shouldResolveConsistentlyWith(compileClasspath.get())
|
|
||||||
}
|
|
||||||
|
|
||||||
named(testMod.runtimeClasspathConfigurationName) {
|
configurations {
|
||||||
shouldResolveConsistentlyWith(runtimeClasspath.get())
|
for (config in extraConfigurations) {
|
||||||
|
named(config.compileClasspathConfigurationName) { shouldResolveConsistentlyWith(compileClasspath.get()) }
|
||||||
|
named(config.runtimeClasspathConfigurationName) { shouldResolveConsistentlyWith(runtimeClasspath.get()) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Like the main test configurations, we're safe to depend on source set outputs.
|
// Like the main test configurations, we're safe to depend on source set outputs.
|
||||||
dependencies {
|
dependencies {
|
||||||
add(testMod.implementationConfigurationName, main.output)
|
for (config in extraConfigurations) {
|
||||||
add(testMod.implementationConfigurationName, client.output)
|
add(config.implementationConfigurationName, main.output)
|
||||||
|
add(config.implementationConfigurationName, client.output)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Similar to java-test-fixtures, but tries to avoid putting the obfuscated jar on the classpath.
|
// Similar to java-test-fixtures, but tries to avoid putting the obfuscated jar on the classpath.
|
@ -109,14 +109,13 @@ abstract class CCTweakedExtension(
|
|||||||
val otherJava = otherProject.extensions.getByType(JavaPluginExtension::class.java)
|
val otherJava = otherProject.extensions.getByType(JavaPluginExtension::class.java)
|
||||||
val main = otherJava.sourceSets.getByName("main")
|
val main = otherJava.sourceSets.getByName("main")
|
||||||
val client = otherJava.sourceSets.getByName("client")
|
val client = otherJava.sourceSets.getByName("client")
|
||||||
val testMod = otherJava.sourceSets.findByName("testMod")
|
|
||||||
val testFixtures = otherJava.sourceSets.findByName("testFixtures")
|
|
||||||
|
|
||||||
// Pull in sources from the other project.
|
// Pull in sources from the other project.
|
||||||
extendSourceSet(otherProject, main)
|
extendSourceSet(otherProject, main)
|
||||||
extendSourceSet(otherProject, client)
|
extendSourceSet(otherProject, client)
|
||||||
if (testMod != null) extendSourceSet(otherProject, testMod)
|
for (sourceSet in listOf("datagen", "testMod", "testFixtures")) {
|
||||||
if (testFixtures != null) extendSourceSet(otherProject, testFixtures)
|
otherJava.sourceSets.findByName(sourceSet)?.let { extendSourceSet(otherProject, it) }
|
||||||
|
}
|
||||||
|
|
||||||
// The extra source-processing tasks should include these files too.
|
// The extra source-processing tasks should include these files too.
|
||||||
project.tasks.named(main.javadocTaskName, Javadoc::class.java) { source(main.allJava, client.allJava) }
|
project.tasks.named(main.javadocTaskName, Javadoc::class.java) { source(main.allJava, client.allJava) }
|
||||||
|
@ -6,8 +6,8 @@ import cc.tweaked.gradle.*
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("cc-tweaked.vanilla")
|
id("cc-tweaked.vanilla")
|
||||||
id("cc-tweaked.gametest")
|
|
||||||
id("cc-tweaked.illuaminate")
|
id("cc-tweaked.illuaminate")
|
||||||
|
id("cc-tweaked.mod")
|
||||||
id("cc-tweaked.publishing")
|
id("cc-tweaked.publishing")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@ package dan200.computercraft.client.gui;
|
|||||||
|
|
||||||
import dan200.computercraft.api.ComputerCraftAPI;
|
import dan200.computercraft.api.ComputerCraftAPI;
|
||||||
import dan200.computercraft.client.render.ComputerBorderRenderer;
|
import dan200.computercraft.client.render.ComputerBorderRenderer;
|
||||||
import dan200.computercraft.data.client.ClientDataProviders;
|
|
||||||
import dan200.computercraft.shared.computer.core.ComputerFamily;
|
import dan200.computercraft.shared.computer.core.ComputerFamily;
|
||||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||||
import net.minecraft.client.renderer.texture.TextureManager;
|
import net.minecraft.client.renderer.texture.TextureManager;
|
||||||
@ -113,7 +112,6 @@ public final class GuiSprites extends TextureAtlasHolder {
|
|||||||
* @param pocketBottom The texture for the bottom of a pocket computer.
|
* @param pocketBottom The texture for the bottom of a pocket computer.
|
||||||
* @param sidebar The texture for the computer sidebar.
|
* @param sidebar The texture for the computer sidebar.
|
||||||
* @see ComputerBorderRenderer
|
* @see ComputerBorderRenderer
|
||||||
* @see ClientDataProviders
|
|
||||||
*/
|
*/
|
||||||
public record ComputerTextures(
|
public record ComputerTextures(
|
||||||
ResourceLocation border,
|
ResourceLocation border,
|
||||||
|
@ -1,50 +0,0 @@
|
|||||||
// SPDX-FileCopyrightText: 2023 The CC: Tweaked Developers
|
|
||||||
//
|
|
||||||
// SPDX-License-Identifier: MPL-2.0
|
|
||||||
|
|
||||||
package dan200.computercraft.data.client;
|
|
||||||
|
|
||||||
import dan200.computercraft.client.gui.GuiSprites;
|
|
||||||
import dan200.computercraft.client.model.LecternPrintoutModel;
|
|
||||||
import dan200.computercraft.data.DataProviders;
|
|
||||||
import dan200.computercraft.shared.turtle.inventory.UpgradeSlot;
|
|
||||||
import net.minecraft.client.renderer.texture.atlas.SpriteSource;
|
|
||||||
import net.minecraft.client.renderer.texture.atlas.SpriteSources;
|
|
||||||
import net.minecraft.client.renderer.texture.atlas.sources.SingleFile;
|
|
||||||
import net.minecraft.resources.ResourceLocation;
|
|
||||||
import net.minecraft.server.packs.PackType;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Optional;
|
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A version of {@link DataProviders} which relies on client-side classes.
|
|
||||||
* <p>
|
|
||||||
* This is called from {@link DataProviders#add(DataProviders.GeneratorSink)}.
|
|
||||||
*/
|
|
||||||
public final class ClientDataProviders {
|
|
||||||
private ClientDataProviders() {
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void add(DataProviders.GeneratorSink generator) {
|
|
||||||
generator.addFromCodec("Block atlases", PackType.CLIENT_RESOURCES, "atlases", SpriteSources.FILE_CODEC, out -> {
|
|
||||||
out.accept(new ResourceLocation("blocks"), List.of(
|
|
||||||
new SingleFile(UpgradeSlot.LEFT_UPGRADE, Optional.empty()),
|
|
||||||
new SingleFile(UpgradeSlot.RIGHT_UPGRADE, Optional.empty()),
|
|
||||||
new SingleFile(LecternPrintoutModel.TEXTURE, Optional.empty())
|
|
||||||
));
|
|
||||||
out.accept(GuiSprites.SPRITE_SHEET, Stream.of(
|
|
||||||
// Buttons
|
|
||||||
GuiSprites.TURNED_OFF.textures(),
|
|
||||||
GuiSprites.TURNED_ON.textures(),
|
|
||||||
GuiSprites.TERMINATE.textures(),
|
|
||||||
// Computers
|
|
||||||
GuiSprites.COMPUTER_NORMAL.textures(),
|
|
||||||
GuiSprites.COMPUTER_ADVANCED.textures(),
|
|
||||||
GuiSprites.COMPUTER_COMMAND.textures(),
|
|
||||||
GuiSprites.COMPUTER_COLOUR.textures()
|
|
||||||
).flatMap(x -> x).<SpriteSource>map(x -> new SingleFile(x, Optional.empty())).toList());
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
@ -5,6 +5,12 @@
|
|||||||
package dan200.computercraft.data;
|
package dan200.computercraft.data;
|
||||||
|
|
||||||
import com.mojang.serialization.Codec;
|
import com.mojang.serialization.Codec;
|
||||||
|
import dan200.computercraft.client.gui.GuiSprites;
|
||||||
|
import dan200.computercraft.client.model.LecternPrintoutModel;
|
||||||
|
import dan200.computercraft.shared.turtle.inventory.UpgradeSlot;
|
||||||
|
import net.minecraft.client.renderer.texture.atlas.SpriteSource;
|
||||||
|
import net.minecraft.client.renderer.texture.atlas.SpriteSources;
|
||||||
|
import net.minecraft.client.renderer.texture.atlas.sources.SingleFile;
|
||||||
import net.minecraft.data.DataProvider;
|
import net.minecraft.data.DataProvider;
|
||||||
import net.minecraft.data.PackOutput;
|
import net.minecraft.data.PackOutput;
|
||||||
import net.minecraft.data.tags.TagsProvider;
|
import net.minecraft.data.tags.TagsProvider;
|
||||||
@ -13,9 +19,14 @@ import net.minecraft.server.packs.PackType;
|
|||||||
import net.minecraft.world.item.Item;
|
import net.minecraft.world.item.Item;
|
||||||
import net.minecraft.world.level.block.Block;
|
import net.minecraft.world.level.block.Block;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* All data providers for ComputerCraft. We require a mod-loader abstraction {@link GeneratorSink} (instead of
|
* All data providers for ComputerCraft. We require a mod-loader abstraction {@link GeneratorSink} (instead of
|
||||||
@ -39,14 +50,30 @@ public final class DataProviders {
|
|||||||
|
|
||||||
generator.add(out -> new LanguageProvider(out, turtleUpgrades, pocketUpgrades));
|
generator.add(out -> new LanguageProvider(out, turtleUpgrades, pocketUpgrades));
|
||||||
|
|
||||||
// Unfortunately we rely on some client-side classes in this code. We just load in the client side data provider
|
generator.addFromCodec("Block atlases", PackType.CLIENT_RESOURCES, "atlases", SpriteSources.FILE_CODEC, out -> {
|
||||||
// and invoke that.
|
out.accept(new ResourceLocation("blocks"), makeSprites(Stream.of(
|
||||||
try {
|
UpgradeSlot.LEFT_UPGRADE,
|
||||||
Class.forName("dan200.computercraft.data.client.ClientDataProviders")
|
UpgradeSlot.RIGHT_UPGRADE,
|
||||||
.getMethod("add", GeneratorSink.class).invoke(null, generator);
|
LecternPrintoutModel.TEXTURE
|
||||||
} catch (ReflectiveOperationException e) {
|
)));
|
||||||
throw new RuntimeException(e);
|
out.accept(GuiSprites.SPRITE_SHEET, makeSprites(
|
||||||
}
|
// Buttons
|
||||||
|
GuiSprites.TURNED_OFF.textures(),
|
||||||
|
GuiSprites.TURNED_ON.textures(),
|
||||||
|
GuiSprites.TERMINATE.textures(),
|
||||||
|
// Computers
|
||||||
|
GuiSprites.COMPUTER_NORMAL.textures(),
|
||||||
|
GuiSprites.COMPUTER_ADVANCED.textures(),
|
||||||
|
GuiSprites.COMPUTER_COMMAND.textures(),
|
||||||
|
GuiSprites.COMPUTER_COLOUR.textures()
|
||||||
|
));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
@SafeVarargs
|
||||||
|
@SuppressWarnings("varargs")
|
||||||
|
private static List<SpriteSource> makeSprites(final Stream<ResourceLocation>... files) {
|
||||||
|
return Arrays.stream(files).flatMap(Function.identity()).<SpriteSource>map(x -> new SingleFile(x, Optional.empty())).toList();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface GeneratorSink {
|
public interface GeneratorSink {
|
@ -7,6 +7,7 @@ package dan200.computercraft.data;
|
|||||||
import com.google.common.hash.HashCode;
|
import com.google.common.hash.HashCode;
|
||||||
import com.google.common.hash.HashFunction;
|
import com.google.common.hash.HashFunction;
|
||||||
import com.google.common.hash.Hashing;
|
import com.google.common.hash.Hashing;
|
||||||
|
import dan200.computercraft.shared.util.PrettyJsonWriter;
|
||||||
import net.minecraft.data.CachedOutput;
|
import net.minecraft.data.CachedOutput;
|
||||||
import net.minecraft.data.DataProvider;
|
import net.minecraft.data.DataProvider;
|
||||||
|
|
@ -148,7 +148,7 @@ class TagProvider {
|
|||||||
/**
|
/**
|
||||||
* A wrapper over {@link ItemTagsProvider}.
|
* A wrapper over {@link ItemTagsProvider}.
|
||||||
*/
|
*/
|
||||||
interface ItemTagConsumer extends TagConsumer<Item> {
|
public interface ItemTagConsumer extends TagConsumer<Item> {
|
||||||
void copy(TagKey<Block> block, TagKey<Item> item);
|
void copy(TagKey<Block> block, TagKey<Item> item);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -2,7 +2,7 @@
|
|||||||
//
|
//
|
||||||
// SPDX-License-Identifier: MPL-2.0
|
// SPDX-License-Identifier: MPL-2.0
|
||||||
|
|
||||||
package dan200.computercraft.data;
|
package dan200.computercraft.shared.util;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
import com.google.gson.GsonBuilder;
|
import com.google.gson.GsonBuilder;
|
||||||
@ -23,7 +23,7 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* Alternative version of {@link JsonWriter} which attempts to lay out the JSON in a more compact format.
|
* Alternative version of {@link JsonWriter} which attempts to lay out the JSON in a more compact format.
|
||||||
*
|
*
|
||||||
* @see PrettyDataProvider
|
* @see dan200.computercraft.data.PrettyDataProvider
|
||||||
*/
|
*/
|
||||||
public class PrettyJsonWriter extends JsonWriter {
|
public class PrettyJsonWriter extends JsonWriter {
|
||||||
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
|
private static final Gson GSON = new GsonBuilder().setPrettyPrinting().disableHtmlEscaping().create();
|
@ -14,9 +14,9 @@ import com.mojang.brigadier.arguments.StringArgumentType;
|
|||||||
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
import com.mojang.brigadier.builder.LiteralArgumentBuilder;
|
||||||
import com.mojang.brigadier.builder.RequiredArgumentBuilder;
|
import com.mojang.brigadier.builder.RequiredArgumentBuilder;
|
||||||
import dan200.computercraft.api.ComputerCraftAPI;
|
import dan200.computercraft.api.ComputerCraftAPI;
|
||||||
import dan200.computercraft.data.PrettyJsonWriter;
|
|
||||||
import dan200.computercraft.gametest.core.TestHooks;
|
import dan200.computercraft.gametest.core.TestHooks;
|
||||||
import dan200.computercraft.shared.platform.RegistryWrappers;
|
import dan200.computercraft.shared.platform.RegistryWrappers;
|
||||||
|
import dan200.computercraft.shared.util.PrettyJsonWriter;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.GuiGraphics;
|
import net.minecraft.client.gui.GuiGraphics;
|
||||||
import net.minecraft.network.chat.Component;
|
import net.minecraft.network.chat.Component;
|
||||||
|
@ -8,7 +8,7 @@ import java.util.*
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("cc-tweaked.fabric")
|
id("cc-tweaked.fabric")
|
||||||
id("cc-tweaked.gametest")
|
id("cc-tweaked.mod")
|
||||||
id("cc-tweaked.mod-publishing")
|
id("cc-tweaked.mod-publishing")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,6 +146,8 @@ loom {
|
|||||||
configName = "Datagen"
|
configName = "Datagen"
|
||||||
client()
|
client()
|
||||||
|
|
||||||
|
source(sourceSets.datagen.get())
|
||||||
|
|
||||||
runDir("run/dataGen")
|
runDir("run/dataGen")
|
||||||
property("fabric-api.datagen")
|
property("fabric-api.datagen")
|
||||||
property("fabric-api.datagen.output-dir", layout.buildDirectory.dir("generatedResources").getAbsolutePath())
|
property("fabric-api.datagen.output-dir", layout.buildDirectory.dir("generatedResources").getAbsolutePath())
|
||||||
|
@ -26,7 +26,7 @@ import java.util.concurrent.CompletableFuture;
|
|||||||
import java.util.function.BiConsumer;
|
import java.util.function.BiConsumer;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
public class FabricDataGenerators implements DataGeneratorEntrypoint {
|
public class FabricDataProviders implements DataGeneratorEntrypoint {
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeDataGenerator(FabricDataGenerator generator) {
|
public void onInitializeDataGenerator(FabricDataGenerator generator) {
|
||||||
var pack = new PlatformGeneratorsImpl(generator.createPack());
|
var pack = new PlatformGeneratorsImpl(generator.createPack());
|
13
projects/fabric/src/datagen/resources/fabric.mod.json
Normal file
13
projects/fabric/src/datagen/resources/fabric.mod.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"schemaVersion": 1,
|
||||||
|
"id": "cc-datagen",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"entrypoints": {
|
||||||
|
"fabric-datagen": [
|
||||||
|
"dan200.computercraft.data.FabricDataProviders"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"depends": {
|
||||||
|
"computercraft": "*"
|
||||||
|
}
|
||||||
|
}
|
@ -23,9 +23,6 @@
|
|||||||
"client": [
|
"client": [
|
||||||
"dan200.computercraft.client.ComputerCraftClient::init"
|
"dan200.computercraft.client.ComputerCraftClient::init"
|
||||||
],
|
],
|
||||||
"fabric-datagen": [
|
|
||||||
"dan200.computercraft.data.FabricDataGenerators"
|
|
||||||
],
|
|
||||||
"jei_mod_plugin": [
|
"jei_mod_plugin": [
|
||||||
"dan200.computercraft.client.integration.jei.JEIComputerCraft"
|
"dan200.computercraft.client.integration.jei.JEIComputerCraft"
|
||||||
],
|
],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"schemaVersion": 1,
|
"schemaVersion": 1,
|
||||||
"id": "cctest",
|
"id": "cc-datagen",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
|
@ -7,7 +7,7 @@ import net.minecraftforge.gradle.common.util.RunConfig
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("cc-tweaked.forge")
|
id("cc-tweaked.forge")
|
||||||
id("cc-tweaked.gametest")
|
id("cc-tweaked.mod")
|
||||||
id("cc-tweaked.mod-publishing")
|
id("cc-tweaked.mod-publishing")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,6 +57,10 @@ minecraft {
|
|||||||
"--existing", project(":common").file("src/main/resources/"),
|
"--existing", project(":common").file("src/main/resources/"),
|
||||||
"--existing", file("src/main/resources/"),
|
"--existing", file("src/main/resources/"),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
mods.named("computercraft") {
|
||||||
|
source(sourceSets["datagen"])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun RunConfig.configureForGameTest() {
|
fun RunConfig.configureForGameTest() {
|
||||||
|
@ -32,7 +32,7 @@ import java.util.function.BiConsumer;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
|
|
||||||
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD)
|
||||||
public class Generators {
|
public class ForgeDataProviders {
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void gather(GatherDataEvent event) {
|
public static void gather(GatherDataEvent event) {
|
||||||
var generator = event.getGenerator();
|
var generator = event.getGenerator();
|
Loading…
x
Reference in New Issue
Block a user