Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
MrNavaStar committed Nov 3, 2023
0 parents commit a2db298
Show file tree
Hide file tree
Showing 17 changed files with 561 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Project exclude paths
/.gradle/
/fabric/.gradle/
/fabric/build/
17 changes: 17 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
allprojects {
repositories {
mavenCentral()
maven { url = "https://api.modrinth.com/maven" } // Modrinth
maven { url = "https://repo.codemc.io/repository/maven-releases/" } // Adventure
maven { url = "https://repo.papermc.io/repository/maven-public/" } // Paper + Velocity
}
}

subprojects {
apply plugin: "java"

dependencies {
compileOnly "org.projectlombok:lombok:1.18.28"
annotationProcessor "org.projectlombok:lombok:1.18.28"
}
}
4 changes: 4 additions & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
dependencies {
implementation "net.kyori:adventure-api:4.13.0"
implementation "com.google.code.gson:gson:2.10.1"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package me.mrnavastar.singularity.common;

public class Constants {

public static final String MOD_NAME = "Singularity";
public static final String MOD_ID = "singularity";
public static final String VERSION = "debug-build";
}
61 changes: 61 additions & 0 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
plugins {
id 'fabric-loom' version '1.4.4'
}

version = project.mod_version
group = project.maven_group

loom {
accessWidenerPath = file("src/main/resources/singularity.accesswidener")
}

dependencies {
implementation project(configuration: 'default', path: ':core')

// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"

// Fabric API. This is technically optional, but you probably want it anyway.
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"

// Dev Env
//modImplementation "maven.modrinth:fabricproxy-lite:v2.6.0"
//modImplementation "com.moandjiezana.toml:toml4j:0.7.2"
}

processResources {
inputs.property "version", project.version
inputs.property "minecraft_version", project.minecraft_version
inputs.property "loader_version", project.loader_version
filteringCharset "UTF-8"

filesMatching("fabric.mod.json") {
expand "version": project.version,
"minecraft_version": project.minecraft_version,
"loader_version": project.loader_version
}
}

def targetJavaVersion = 17
tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) {
it.options.release = targetJavaVersion
}
}

java {
def javaVersion = JavaVersion.toVersion(targetJavaVersion)
if (JavaVersion.current() < javaVersion) {
toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion)
}
archivesBaseName = project.archives_base_name
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
}
}
11 changes: 11 additions & 0 deletions fabric/src/main/java/me/mrnavastar/singularity/fabric/Fabric.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package me.mrnavastar.singularity.fabric;

import net.fabricmc.api.DedicatedServerModInitializer;

public class Fabric implements DedicatedServerModInitializer {

@Override
public void onInitializeServer() {

}
}
27 changes: 27 additions & 0 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"schemaVersion": 1,
"id": "singularity",
"version": "${version}",
"name": "Singularity",
"description": "",
"authors": ["MrNavaStar"],
"contact": {
"repo": ""
},
"license": "All-Rights-Reserved",
"icon": "assets/singularity/icon.png",
"environment": "*",
"entrypoints": {
"server": [
"me.mrnavastar.singularity.fabric.Fabric"
]
},
"mixins": [
"singularity.mixins.json"
],
"accessWidener" : "singularity.accesswidener",
"depends": {
"fabricloader": ">=${loader_version}",
"fabric": "*"
}
}
1 change: 1 addition & 0 deletions fabric/src/main/resources/singularity.accesswidener
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
accessWidener v2 named
11 changes: 11 additions & 0 deletions fabric/src/main/resources/singularity.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"required": true,
"minVersion": "0.8",
"package": "me.mrnavastar.singularity.fabric.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
"injectors": {
"defaultRequire": 1
}
}
17 changes: 17 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
org.gradle.jvmargs=-Xmx4G
javaVersion=17

# Fabric Properties
# check these on https://modmuss50.me/fabric.html
minecraft_version=1.20.1
yarn_mappings=1.20.1+build.10
loader_version=0.14.22

# Mod Properties
mod_version = 1.0
maven_group = me.mrnavastar
archives_base_name = singularity

# Dependencies
# check this on https://modmuss50.me/fabric.html
fabric_version=0.89.0+1.20.1
Binary file added gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
6 changes: 6 additions & 0 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit a2db298

Please sign in to comment.