Skip to content

Commit

Permalink
krr
Browse files Browse the repository at this point in the history
  • Loading branch information
Oganesson897 committed Oct 30, 2024
1 parent 020a45f commit 824c809
Show file tree
Hide file tree
Showing 8 changed files with 79 additions and 1 deletion.
9 changes: 9 additions & 0 deletions runtime-resources/common/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apply from: rootProject.file("gradle/scripts/klib-common.gradle")

group = "band.kessoku.lib.resources"
base.archivesName = rootProject.name + "-package"

// You can delete this section if you need to
dependencies {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
package band.kessoku.lib.resources;

import band.kessoku.lib.resources.api.IProvider;
import com.google.common.collect.ImmutableList;

import java.util.ArrayList;
import java.util.List;

public class KessokuResourcesManager {

private final String modid;

private final List<IProvider> providers = new ArrayList<>();

private KessokuResourcesManager(String modid) {
this.modid = modid;
}

public static KessokuResourcesManager create(String modid) {
return new KessokuResourcesManager(modid);
}

public void addProvider(IProvider provider) {
providers.add(provider);
}

public String getModid() {
return modid;
}

public List<IProvider> getProviders() {
return ImmutableList.copyOf(providers);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package band.kessoku.lib.resources;

import org.slf4j.Marker;
import org.slf4j.MarkerFactory;

public class KessokuRuntimeResources {
public static final String MOD_ID = "kessoku_runtime_resources";
public static final Marker MARKER = MarkerFactory.getMarker("[KessokuRuntimeResources]");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package band.kessoku.lib.resources.api;

public interface IProvider {
}
9 changes: 9 additions & 0 deletions runtime-resources/fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apply from: rootProject.file("gradle/scripts/klib-fabric.gradle")

group = "band.kessoku.lib.resources"
base.archivesName = rootProject.name + "-package"

dependencies {
common(project(path: ':runtime-resources-common', configuration: 'namedElements')) { transitive false }
shadowBundle(project(path: ':runtime-resources-common', configuration: 'transformProductionFabric'))
}
9 changes: 9 additions & 0 deletions runtime-resources/neo/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apply from: rootProject.file("gradle/scripts/klib-neo.gradle")

group = "band.kessoku.lib.resources"
base.archivesName = rootProject.name + "-package"

dependencies {
common(project(path: ':runtime-resources-common', configuration: 'namedElements')) { transitive false }
shadowBundle(project(path: ':runtime-resources-common', configuration: 'transformProductionNeoForge'))
}
1 change: 1 addition & 0 deletions runtime-resources/neo/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
loom.platform=neoforge
5 changes: 4 additions & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ includeModule("keybind") // Keybind API
includeModule("config") // Config API
includeModule("entrypoint") // Entrypoint API
includeModule("entity-events") // Entity Events
includeModule("runtime-resources") // Runtime Resources


void includeWrapper(String platform) {
Expand All @@ -38,4 +39,6 @@ void includeModule(String moduleName) {
void includePlatform(String moduleName, String platform) {
include("$moduleName/$platform")
project(":$moduleName/$platform").name = "$moduleName-$platform"
}
}
include 'runtime-resources'

0 comments on commit 824c809

Please sign in to comment.