From 0f166a0ce3082e9e1c5aa30faec020e23c76d64d Mon Sep 17 00:00:00 2001 From: JFronny Date: Sun, 18 Jul 2021 10:36:51 +0200 Subject: [PATCH] Steal testmod code from fapi --- build.gradle | 21 +++++++++++++------ .../jfronny/libjf/data/ResourcePath.java | 2 -- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/build.gradle b/build.gradle index 18bb921..67d02b1 100644 --- a/build.gradle +++ b/build.gradle @@ -21,10 +21,19 @@ dependencies { modImplementation "com.terraformersmc:modmenu:2.0.2" } -task runTestmodClient(type: TestmodTask, constructorArgs: ["client"]) { - classpath sourceSets.testmod.runtimeClasspath -} - -task runTestmodServer(type: TestmodTask, constructorArgs: ["server"]) { - classpath sourceSets.testmod.runtimeClasspath +loom { + runs { + testmodClient { + client() + ideConfigGenerated project.rootProject == project + name = "Testmod Client" + source sourceSets.testmod + } + testmodServer { + server() + ideConfigGenerated project.rootProject == project + name = "Testmod Server" + source sourceSets.testmod + } + } } diff --git a/src/main/java/io/gitlab/jfronny/libjf/data/ResourcePath.java b/src/main/java/io/gitlab/jfronny/libjf/data/ResourcePath.java index 100bf65..bd6f957 100644 --- a/src/main/java/io/gitlab/jfronny/libjf/data/ResourcePath.java +++ b/src/main/java/io/gitlab/jfronny/libjf/data/ResourcePath.java @@ -3,8 +3,6 @@ package io.gitlab.jfronny.libjf.data; import net.minecraft.resource.ResourceType; import net.minecraft.util.Identifier; -import java.io.IOException; - public class ResourcePath implements AutoCloseable { private final ResourceType type; private final Identifier id;