Compare commits
10 Commits
6509d4d94f
...
2328169f2a
| Author | SHA1 | Date | |
|---|---|---|---|
| 2328169f2a | |||
|
|
cf960ba22c | ||
|
|
9dd6fccedf | ||
|
|
abfad91673 | ||
|
|
b629298438 | ||
|
|
7281535fad | ||
|
|
65ed8951fc | ||
|
|
81ac4181ae | ||
|
|
20d891079b | ||
|
|
6a31c4ef11 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -451,4 +451,5 @@ FodyWeavers.xsd
|
|||||||
*.msp
|
*.msp
|
||||||
|
|
||||||
# JetBrains Rider
|
# JetBrains Rider
|
||||||
*.sln.iml
|
*.sln.iml
|
||||||
|
/.kotlin/
|
||||||
|
|||||||
37
README.md
37
README.md
@@ -1,28 +1,15 @@
|
|||||||
# Stonecutter template
|
# NeoComputers
|
||||||
|
A rewrite of OpenComputers for modern Minecraft, alongside our own additions. Based off of the https://github.com/JumperOnJava/Stonecutter-Arch-Template template.
|
||||||
|
### Project setup
|
||||||
|
This uses a combination of Architectury, Architectury API, Stonecutter, and Kotlin. Stonecutter is the most important one
|
||||||
|
to read about. Don't forget to Gradle -> Tasks -> stonecutter -> "Set active project to [version]-[loader]" before building/testing
|
||||||
|
the mod for that version!
|
||||||
|
|
||||||
This template allows you create multiloader multitemplate mod using stonecutter and architectury
|
Also, try reading about how stonecutter's conditional macros work (those can be seen as the `//?` statements in the code).
|
||||||
|
Stonecutter automatically comments and uncomments them when you switch between versions or loaders, you shouldn't do it yourself.
|
||||||
|
|
||||||
It is based on my CustomCursor project
|
The minecraft version this mod is currently being developed on is 1.21.11 neoforge or fabric. Although the project stonecutter.gradle.kts
|
||||||
|
is currently using 1.21.9-fabric, you can easily change it with the gradle task.
|
||||||
|
|
||||||
To change versions check settings.gradle.kts
|
The recommended IDE for this is IntelliJ IDEA 2026.1, and the JDK used is Eclipse Temurin 25.0.2 (from Adoptium), although
|
||||||
|
you should be able to use any other build of OpenJDK 26.
|
||||||
You can use c# script to automatically change all template names.
|
|
||||||
Open RenameTemplate.cs, change names in replacements array and run "dotnet run" in this directory
|
|
||||||
I would highly recommend to do this before opening project in your IDE, and then remove all c# related files from project
|
|
||||||
(obj and bin folders, .csproj and script itself). Also you can remove c# stuff from .gitignore (there is comment for that)
|
|
||||||
|
|
||||||
If you have some issues with template ping me in [Kiku's realm](https://discord.gg/TBgNUCfryS) or official fabric discord
|
|
||||||
|
|
||||||
Currently supported versions these,
|
|
||||||
but you can easily add other versions if you need that
|
|
||||||
- 1.20.1, fabric, lexforge
|
|
||||||
- 1.20.4, fabric, neoforge
|
|
||||||
- 1.21.1, fabric, neoforge
|
|
||||||
- 1.21.3, fabric, neoforge
|
|
||||||
- 1.21.4, fabric, neoforge
|
|
||||||
|
|
||||||
To start current active version use runActive task
|
|
||||||
|
|
||||||
For testing all versions you can use chiseledRunAllClients, it runs all possible version and loader variants (in random(?) order)
|
|
||||||
|
|
||||||
Also template had publishing set up, you need to specify project id for modrinth and curseforge in gradle.properties, and tokens for these sites in local.properties (it is gitignored, check local.properties.example). After that use chiseledPublishMods task
|
|
||||||
@@ -1,60 +0,0 @@
|
|||||||
List<string> FindAllFiles(string directoryPath)
|
|
||||||
{
|
|
||||||
return Directory.GetFiles(directoryPath, "*.*", SearchOption.AllDirectories)
|
|
||||||
.Select(file => Path.GetRelativePath(directoryPath, file))
|
|
||||||
.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
var replacements = new[]
|
|
||||||
{
|
|
||||||
//ORDER MATTERS
|
|
||||||
new { Old = "com.example", New = "io.github.cooldev" }, //change mod package
|
|
||||||
new { Old = "template", New = "coolmod" }, //change modid
|
|
||||||
new { Old = "Template", New = "Cool Mod" }, //change mod display name
|
|
||||||
// ↕ <- Letter L is different case here
|
|
||||||
new { Old = "TempLate", New = "CoolMod" }, //change mod init class and other places where mod name is in PascalCase
|
|
||||||
new { Old = "AuthorExample", New = "CoolDev" }
|
|
||||||
};
|
|
||||||
|
|
||||||
var files = FindAllFiles(Directory.GetCurrentDirectory());
|
|
||||||
|
|
||||||
foreach (var file in files)
|
|
||||||
{
|
|
||||||
var oldFile = file.Replace("\\", "/");
|
|
||||||
var newFile = oldFile;
|
|
||||||
Console.WriteLine("checking: " + oldFile);
|
|
||||||
|
|
||||||
if (oldFile.StartsWith("."))
|
|
||||||
continue;
|
|
||||||
if (oldFile.Contains(".cs"))
|
|
||||||
continue;
|
|
||||||
if (oldFile.Contains(".git"))
|
|
||||||
continue;
|
|
||||||
if (oldFile.Contains(".gradle/"))
|
|
||||||
continue;
|
|
||||||
if (oldFile.Contains("build/"))
|
|
||||||
continue;
|
|
||||||
if (oldFile.Contains("LICENSE"))
|
|
||||||
continue;
|
|
||||||
if (oldFile.Contains("bin"))
|
|
||||||
continue;
|
|
||||||
if (oldFile.Contains("obj"))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
var fileContent = File.ReadAllText(oldFile);
|
|
||||||
|
|
||||||
foreach (var replacement in replacements)
|
|
||||||
{
|
|
||||||
fileContent = fileContent.Replace(replacement.Old, replacement.New);
|
|
||||||
newFile = newFile.Replace(replacement.Old.Replace(".", "/"), replacement.New.Replace(".", "/"));
|
|
||||||
}
|
|
||||||
Console.WriteLine($"Moving \n\t< {oldFile} \n\t> {newFile}");
|
|
||||||
File.Delete(oldFile);
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(Path.GetDirectoryName(newFile));
|
|
||||||
}
|
|
||||||
catch { }
|
|
||||||
;
|
|
||||||
File.WriteAllText(newFile, fileContent);
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<OutputType>Exe</OutputType>
|
|
||||||
<TargetFramework>net9.0</TargetFramework>
|
|
||||||
<RootNamespace>Stonecutter_Arch_Template</RootNamespace>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,10 +1,11 @@
|
|||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
|
kotlin("jvm") version "2.3.20"
|
||||||
id("dev.architectury.loom")
|
id("dev.architectury.loom")
|
||||||
id("architectury-plugin")
|
id("architectury-plugin")
|
||||||
id("me.modmuss50.mod-publish-plugin")
|
id("me.modmuss50.mod-publish-plugin")
|
||||||
id("com.github.johnrengelman.shadow")
|
id("com.gradleup.shadow")
|
||||||
}
|
}
|
||||||
|
|
||||||
val minecraft = stonecutter.current.version
|
val minecraft = stonecutter.current.version
|
||||||
@@ -27,25 +28,33 @@ repositories {
|
|||||||
maven("https://maven.terraformersmc.com/")
|
maven("https://maven.terraformersmc.com/")
|
||||||
//placeholder api (modmenu depencency)
|
//placeholder api (modmenu depencency)
|
||||||
maven("https://maven.nucleoid.xyz/")
|
maven("https://maven.nucleoid.xyz/")
|
||||||
|
maven {
|
||||||
|
name = "Kotlin for Forge"
|
||||||
|
setUrl("https://thedarkcolour.github.io/KotlinForForge/")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
minecraft("com.mojang:minecraft:$minecraft")
|
minecraft("com.mojang:minecraft:$minecraft")
|
||||||
|
mappings(loom.officialMojangMappings())
|
||||||
|
|
||||||
|
modApi("dev.architectury:architectury:${mod.dep("architectury_version")}")
|
||||||
if (loader == "fabric") {
|
if (loader == "fabric") {
|
||||||
modImplementation("net.fabricmc:fabric-loader:${mod.dep("fabric_loader")}")
|
modImplementation("net.fabricmc:fabric-loader:${mod.dep("fabric_loader")}")
|
||||||
mappings("net.fabricmc:yarn:$minecraft+build.${mod.dep("yarn_build")}:v2")
|
// mappings("net.fabricmc:yarn:$minecraft+build.${mod.dep("yarn_build")}:v2")
|
||||||
modImplementation("com.terraformersmc:modmenu:${mod.dep("modmenu_version")}")
|
modImplementation("com.terraformersmc:modmenu:${mod.dep("modmenu_version")}")
|
||||||
|
|
||||||
//some features (like automatic resource loading from non vanilla namespaces) work only with fabric API installed
|
//some features (like automatic resource loading from non vanilla namespaces) work only with fabric API installed
|
||||||
//for example translations from assets/modid/lang/en_us.json won't be working, same stuff with textures
|
//for example translations from assets/modid/lang/en_us.json won't be working, same stuff with textures
|
||||||
//but we keep runtime only to not accidentally depend on fabric's api, because it doesn't exist in neo/forge
|
//but we keep runtime only to not accidentally depend on fabric's api, because it doesn't exist in neo/forge
|
||||||
modRuntimeOnly("net.fabricmc.fabric-api:fabric-api:${mod.dep("fabric_version")}")
|
modRuntimeOnly("net.fabricmc.fabric-api:fabric-api:${mod.dep("fabric_version")}")
|
||||||
|
modImplementation("net.fabricmc:fabric-language-kotlin:1.13.10+kotlin.2.3.20")
|
||||||
|
modApi("dev.architectury:architectury-fabric:${mod.dep("architectury_version")}")
|
||||||
}
|
}
|
||||||
if (loader == "forge") {
|
if (loader == "forge") {
|
||||||
"forge"("net.minecraftforge:forge:${minecraft}-${mod.dep("forge_loader")}")
|
"forge"("net.minecraftforge:forge:${minecraft}-${mod.dep("forge_loader")}")
|
||||||
mappings("net.fabricmc:yarn:$minecraft+build.${mod.dep("yarn_build")}:v2")
|
//implementation("thedarkcolour:kotlinforforge:1.16.0")
|
||||||
|
// mappings("net.fabricmc:yarn:$minecraft+build.${mod.dep("yarn_build")}:v2")
|
||||||
|
|
||||||
|
modApi("dev.architectury:architectury-forge:${mod.dep("architectury_version")}")
|
||||||
"io.github.llamalad7:mixinextras-forge:${mod.dep("mixin_extras")}".let {
|
"io.github.llamalad7:mixinextras-forge:${mod.dep("mixin_extras")}".let {
|
||||||
implementation(it)
|
implementation(it)
|
||||||
include(it)
|
include(it)
|
||||||
@@ -53,17 +62,24 @@ dependencies {
|
|||||||
}
|
}
|
||||||
if (loader == "neoforge") {
|
if (loader == "neoforge") {
|
||||||
"neoForge"("net.neoforged:neoforge:${mod.dep("neoforge_loader")}")
|
"neoForge"("net.neoforged:neoforge:${mod.dep("neoforge_loader")}")
|
||||||
mappings(loom.layered {
|
// mappings(loom.layered {
|
||||||
mappings("net.fabricmc:yarn:$minecraft+build.${mod.dep("yarn_build")}:v2")
|
// mappings("net.fabricmc:yarn:$minecraft+build.${mod.dep("yarn_build")}:v2")
|
||||||
mod.dep("neoforge_patch").takeUnless { it.startsWith('[') }?.let {
|
// mod.dep("neoforge_patch").takeUnless { it.startsWith('[') }?.let {
|
||||||
mappings("dev.architectury:yarn-mappings-patch-neoforge:$it")
|
// mappings("dev.architectury:yarn-mappings-patch-neoforge:$it")
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
|
|
||||||
|
modApi("dev.architectury:architectury-forge:${mod.dep("architectury_version")}")
|
||||||
|
implementation("thedarkcolour:kotlinforforge-neoforge:6.0.0")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
buildscript {
|
||||||
|
dependencies {
|
||||||
|
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.0")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
loom {
|
loom {
|
||||||
accessWidenerPath = rootProject.file("src/main/resources/template.accesswidener")
|
accessWidenerPath = rootProject.file("src/main/resources/neocomputers.accesswidener")
|
||||||
|
|
||||||
decompilers {
|
decompilers {
|
||||||
get("vineflower").apply { // Adds names to lambdas - useful for mixins
|
get("vineflower").apply { // Adds names to lambdas - useful for mixins
|
||||||
@@ -72,13 +88,12 @@ loom {
|
|||||||
}
|
}
|
||||||
if (loader == "forge") {
|
if (loader == "forge") {
|
||||||
forge.mixinConfigs(
|
forge.mixinConfigs(
|
||||||
"template-common.mixins.json",
|
"neocomputers-common.mixins.json",
|
||||||
"template-forge.mixins.json",
|
"neocomputers-forge.mixins.json",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val localProperties = Properties()
|
val localProperties = Properties()
|
||||||
val localPropertiesFile = rootProject.file("local.properties")
|
val localPropertiesFile = rootProject.file("local.properties")
|
||||||
if (localPropertiesFile.exists()) {
|
if (localPropertiesFile.exists()) {
|
||||||
@@ -106,8 +121,12 @@ publishMods {
|
|||||||
targets.forEach(minecraftVersions::add)
|
targets.forEach(minecraftVersions::add)
|
||||||
if (loader == "fabric") {
|
if (loader == "fabric") {
|
||||||
requires("fabric-api")
|
requires("fabric-api")
|
||||||
|
requires("fabric-language-kotlin")
|
||||||
optional("modmenu")
|
optional("modmenu")
|
||||||
}
|
}
|
||||||
|
if (loader == "neoforge") {
|
||||||
|
requires("kotlinforforge-neoforge")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
curseforge {
|
curseforge {
|
||||||
@@ -116,8 +135,12 @@ publishMods {
|
|||||||
targets.forEach(minecraftVersions::add)
|
targets.forEach(minecraftVersions::add)
|
||||||
if (loader == "fabric") {
|
if (loader == "fabric") {
|
||||||
requires("fabric-api")
|
requires("fabric-api")
|
||||||
|
requires("fabric-language-kotlin")
|
||||||
optional("modmenu")
|
optional("modmenu")
|
||||||
}
|
}
|
||||||
|
if (loader == "neoforge") {
|
||||||
|
requires("kotlinforforge-neoforge")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,6 +151,11 @@ java {
|
|||||||
sourceCompatibility = java
|
sourceCompatibility = java
|
||||||
}
|
}
|
||||||
|
|
||||||
|
kotlin {
|
||||||
|
val java = if (stonecutter.eval(minecraft, ">=1.20.5")) 21 else 17
|
||||||
|
jvmToolchain(java)
|
||||||
|
}
|
||||||
|
|
||||||
val shadowBundle: Configuration by configurations.creating {
|
val shadowBundle: Configuration by configurations.creating {
|
||||||
isCanBeConsumed = false
|
isCanBeConsumed = false
|
||||||
isCanBeResolved = true
|
isCanBeResolved = true
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ org.gradle.parallel=false
|
|||||||
|
|
||||||
# Mod properties
|
# Mod properties
|
||||||
mod.version=1.0.0
|
mod.version=1.0.0
|
||||||
mod.group=com.example
|
mod.group=org.neoflock.neocomputers
|
||||||
mod.id=template
|
mod.id=neocomputers
|
||||||
mod.name=Template
|
mod.name=NeoComputers
|
||||||
|
|
||||||
# Used for the mod metadata
|
# Used for the mod metadata
|
||||||
mod.mc_dep_fabric=[VERSIONED]
|
mod.mc_dep_fabric=[VERSIONED]
|
||||||
@@ -22,8 +22,9 @@ mod.mc_targets=[VERSIONED]
|
|||||||
|
|
||||||
# Mod setup
|
# Mod setup
|
||||||
deps.mixin_extras=0.4.1
|
deps.mixin_extras=0.4.1
|
||||||
deps.fabric_loader=0.16.9
|
deps.fabric_loader=0.18.3
|
||||||
deps.fabric_version=[VERSIONED]
|
deps.fabric_version=[VERSIONED]
|
||||||
|
deps.architectury_version=9.1.12
|
||||||
|
|
||||||
deps.forge_loader=[VERSIONED]
|
deps.forge_loader=[VERSIONED]
|
||||||
deps.neoforge_loader=[VERSIONED]
|
deps.neoforge_loader=[VERSIONED]
|
||||||
|
|||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,7 +1,5 @@
|
|||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
|
||||||
networkTimeout=10000
|
|
||||||
validateDistributionUrl=true
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|||||||
309
gradlew
vendored
309
gradlew
vendored
@@ -1,127 +1,78 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
#
|
|
||||||
# Copyright © 2015-2021 the original authors.
|
|
||||||
#
|
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
# you may not use this file except in compliance with the License.
|
|
||||||
# You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing, software
|
|
||||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
# See the License for the specific language governing permissions and
|
|
||||||
# limitations under the License.
|
|
||||||
#
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
##
|
||||||
# Gradle start up script for POSIX generated by Gradle.
|
## Gradle start up script for UN*X
|
||||||
#
|
##
|
||||||
# Important for running:
|
|
||||||
#
|
|
||||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
||||||
# noncompliant, but you have some other compliant shell such as ksh or
|
|
||||||
# bash, then to run this script, type that shell name before the whole
|
|
||||||
# command line, like:
|
|
||||||
#
|
|
||||||
# ksh Gradle
|
|
||||||
#
|
|
||||||
# Busybox and similar reduced shells will NOT work, because this script
|
|
||||||
# requires all of these POSIX shell features:
|
|
||||||
# * functions;
|
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
|
||||||
#
|
|
||||||
# Important for patching:
|
|
||||||
#
|
|
||||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
||||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
||||||
#
|
|
||||||
# The "traditional" practice of packing multiple parameters into a
|
|
||||||
# space-separated string is a well documented source of bugs and security
|
|
||||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
||||||
# options in "$@", and eventually passing that to Java.
|
|
||||||
#
|
|
||||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
||||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
||||||
# see the in-line comments for details.
|
|
||||||
#
|
|
||||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
||||||
# Darwin, MinGW, and NonStop.
|
|
||||||
#
|
|
||||||
# (3) This script is generated from the Groovy template
|
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
||||||
# within the Gradle project.
|
|
||||||
#
|
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
app_path=$0
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
# Need this for daisy-chained symlinks.
|
while [ -h "$PRG" ] ; do
|
||||||
while
|
ls=`ls -ld "$PRG"`
|
||||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
[ -h "$app_path" ]
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
do
|
PRG="$link"
|
||||||
ls=$( ls -ld "$app_path" )
|
else
|
||||||
link=${ls#*' -> '}
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
case $link in #(
|
fi
|
||||||
/*) app_path=$link ;; #(
|
|
||||||
*) app_path=$APP_HOME$link ;;
|
|
||||||
esac
|
|
||||||
done
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
# This is normally unused
|
APP_NAME="Gradle"
|
||||||
# shellcheck disable=SC2034
|
APP_BASE_NAME=`basename "$0"`
|
||||||
APP_BASE_NAME=${0##*/}
|
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
DEFAULT_JVM_OPTS=""
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD="maximum"
|
||||||
|
|
||||||
warn () {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
} >&2
|
}
|
||||||
|
|
||||||
die () {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
} >&2
|
}
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
nonstop=false
|
nonstop=false
|
||||||
case "$( uname )" in #(
|
case "`uname`" in
|
||||||
CYGWIN* ) cygwin=true ;; #(
|
CYGWIN* )
|
||||||
Darwin* ) darwin=true ;; #(
|
cygwin=true
|
||||||
MSYS* | MINGW* ) msys=true ;; #(
|
;;
|
||||||
NONSTOP* ) nonstop=true ;;
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
# Determine the Java command to use to start the JVM.
|
# Determine the Java command to use to start the JVM.
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
else
|
else
|
||||||
JAVACMD=$JAVA_HOME/bin/java
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
@@ -130,120 +81,96 @@ Please set the JAVA_HOME variable in your environment to match the
|
|||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD="java"
|
||||||
if ! command -v java >/dev/null 2>&1
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
then
|
|
||||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
case $MAX_FD in #(
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
max*)
|
if [ $? -eq 0 ] ; then
|
||||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
# shellcheck disable=SC2039,SC3045
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
|
||||||
warn "Could not query maximum file descriptor limit"
|
|
||||||
esac
|
|
||||||
case $MAX_FD in #(
|
|
||||||
'' | soft) :;; #(
|
|
||||||
*)
|
|
||||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
|
||||||
# shellcheck disable=SC2039,SC3045
|
|
||||||
ulimit -n "$MAX_FD" ||
|
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
|
||||||
esac
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Collect all arguments for the java command, stacking in reverse order:
|
|
||||||
# * args from the command line
|
|
||||||
# * the main class name
|
|
||||||
# * -classpath
|
|
||||||
# * -D...appname settings
|
|
||||||
# * --module-path (only if needed)
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
|
||||||
if "$cygwin" || "$msys" ; then
|
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
|
||||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
|
||||||
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
|
||||||
for arg do
|
|
||||||
if
|
|
||||||
case $arg in #(
|
|
||||||
-*) false ;; # don't mess with options #(
|
|
||||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
|
||||||
[ -e "$t" ] ;; #(
|
|
||||||
*) false ;;
|
|
||||||
esac
|
|
||||||
then
|
|
||||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
||||||
fi
|
fi
|
||||||
# Roll the args list around exactly as many times as the number of
|
ulimit -n $MAX_FD
|
||||||
# args, so each arg winds up back in the position where it started, but
|
if [ $? -ne 0 ] ; then
|
||||||
# possibly modified.
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
#
|
fi
|
||||||
# NB: a `for` loop captures its iteration list before it begins, so
|
else
|
||||||
# changing the positional parameters here affects neither the number of
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
# iterations, nor the values presented in `arg`.
|
fi
|
||||||
shift # remove old arg
|
fi
|
||||||
set -- "$@" "$arg" # push replacement arg
|
|
||||||
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
|
if $darwin; then
|
||||||
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
|
fi
|
||||||
|
|
||||||
|
# For Cygwin, switch paths to Windows format before running java
|
||||||
|
if $cygwin ; then
|
||||||
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
|
SEP=""
|
||||||
|
for dir in $ROOTDIRSRAW ; do
|
||||||
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
|
SEP="|"
|
||||||
done
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=$((i+1))
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
(0) set -- ;;
|
||||||
|
(1) set -- "$args0" ;;
|
||||||
|
(2) set -- "$args0" "$args1" ;;
|
||||||
|
(3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Escape application args
|
||||||
|
save () {
|
||||||
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
|
echo " "
|
||||||
|
}
|
||||||
|
APP_ARGS=$(save "$@")
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
if $JAVACMD --add-opens java.base/java.lang=ALL-UNNAMED -version ; then
|
||||||
|
DEFAULT_JVM_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED $DEFAULT_JVM_OPTS"
|
||||||
# Collect all arguments for the java command:
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
|
||||||
# and any embedded shellness will be escaped.
|
|
||||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
|
||||||
# treated as '${Hostname}' itself on the command line.
|
|
||||||
|
|
||||||
set -- \
|
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
|
||||||
-classpath "$CLASSPATH" \
|
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
|
||||||
"$@"
|
|
||||||
|
|
||||||
# Stop when "xargs" is not available.
|
|
||||||
if ! command -v xargs >/dev/null 2>&1
|
|
||||||
then
|
|
||||||
die "xargs is not available"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
#
|
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
||||||
#
|
|
||||||
# In Bash we could simply go:
|
|
||||||
#
|
|
||||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
||||||
# set -- "${ARGS[@]}" "$@"
|
|
||||||
#
|
|
||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
||||||
# character that might be a shell metacharacter, then use eval to reverse
|
|
||||||
# that process (while maintaining the separation between arguments), and wrap
|
|
||||||
# the whole thing up as a single "set" statement.
|
|
||||||
#
|
|
||||||
# This will of course break if any of these variables contains a newline or
|
|
||||||
# an unmatched quote.
|
|
||||||
#
|
|
||||||
|
|
||||||
eval "set -- $(
|
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
|
||||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
|
||||||
xargs -n1 |
|
cd "$(dirname "$0")"
|
||||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
fi
|
||||||
tr '\n' ' '
|
|
||||||
)" '"$@"'
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
|||||||
76
gradlew.bat
vendored
76
gradlew.bat
vendored
@@ -1,20 +1,4 @@
|
|||||||
@rem
|
@if "%DEBUG%" == "" @echo off
|
||||||
@rem Copyright 2015 the original author or authors.
|
|
||||||
@rem
|
|
||||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
|
||||||
@rem you may not use this file except in compliance with the License.
|
|
||||||
@rem You may obtain a copy of the License at
|
|
||||||
@rem
|
|
||||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
@rem
|
|
||||||
@rem Unless required by applicable law or agreed to in writing, software
|
|
||||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
|
||||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
||||||
@rem See the License for the specific language governing permissions and
|
|
||||||
@rem limitations under the License.
|
|
||||||
@rem
|
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
@rem
|
@rem
|
||||||
@rem Gradle startup script for Windows
|
@rem Gradle startup script for Windows
|
||||||
@@ -25,29 +9,25 @@
|
|||||||
if "%OS%"=="Windows_NT" setlocal
|
if "%OS%"=="Windows_NT" setlocal
|
||||||
|
|
||||||
set DIRNAME=%~dp0
|
set DIRNAME=%~dp0
|
||||||
if "%DIRNAME%"=="" set DIRNAME=.
|
if "%DIRNAME%" == "" set DIRNAME=.
|
||||||
@rem This is normally unused
|
|
||||||
set APP_BASE_NAME=%~n0
|
set APP_BASE_NAME=%~n0
|
||||||
set APP_HOME=%DIRNAME%
|
set APP_HOME=%DIRNAME%
|
||||||
|
|
||||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
|
||||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
|
||||||
|
|
||||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
set DEFAULT_JVM_OPTS=
|
||||||
|
|
||||||
@rem Find java.exe
|
@rem Find java.exe
|
||||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||||
|
|
||||||
set JAVA_EXE=java.exe
|
set JAVA_EXE=java.exe
|
||||||
%JAVA_EXE% -version >NUL 2>&1
|
%JAVA_EXE% -version >NUL 2>&1
|
||||||
if %ERRORLEVEL% equ 0 goto execute
|
if "%ERRORLEVEL%" == "0" goto init
|
||||||
|
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
|
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
@@ -55,36 +35,48 @@ goto fail
|
|||||||
set JAVA_HOME=%JAVA_HOME:"=%
|
set JAVA_HOME=%JAVA_HOME:"=%
|
||||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||||
|
|
||||||
if exist "%JAVA_EXE%" goto execute
|
if exist "%JAVA_EXE%" goto init
|
||||||
|
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
|
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||||
echo. 1>&2
|
echo.
|
||||||
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
|
echo Please set the JAVA_HOME variable in your environment to match the
|
||||||
echo location of your Java installation. 1>&2
|
echo location of your Java installation.
|
||||||
|
|
||||||
goto fail
|
goto fail
|
||||||
|
|
||||||
|
:init
|
||||||
|
@rem Get command-line arguments, handling Windows variants
|
||||||
|
|
||||||
|
if not "%OS%" == "Windows_NT" goto win9xME_args
|
||||||
|
|
||||||
|
:win9xME_args
|
||||||
|
@rem Slurp the command line arguments.
|
||||||
|
set CMD_LINE_ARGS=
|
||||||
|
set _SKIP=2
|
||||||
|
|
||||||
|
:win9xME_args_slurp
|
||||||
|
if "x%~1" == "x" goto execute
|
||||||
|
|
||||||
|
set CMD_LINE_ARGS=%*
|
||||||
|
|
||||||
:execute
|
:execute
|
||||||
@rem Setup the command line
|
@rem Setup the command line
|
||||||
|
|
||||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||||
|
|
||||||
|
|
||||||
@rem Execute Gradle
|
@rem Execute Gradle
|
||||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
|
||||||
|
|
||||||
:end
|
:end
|
||||||
@rem End local scope for the variables with windows NT shell
|
@rem End local scope for the variables with windows NT shell
|
||||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||||
|
|
||||||
:fail
|
:fail
|
||||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||||
rem the _cmd.exe /c_ return code!
|
rem the _cmd.exe /c_ return code!
|
||||||
set EXIT_CODE=%ERRORLEVEL%
|
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
exit /b 1
|
||||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
|
||||||
exit /b %EXIT_CODE%
|
|
||||||
|
|
||||||
:mainEnd
|
:mainEnd
|
||||||
if "%OS%"=="Windows_NT" endlocal
|
if "%OS%"=="Windows_NT" endlocal
|
||||||
|
|||||||
@@ -21,13 +21,15 @@ stonecutter {
|
|||||||
fun mc(loader: String, vararg versions: String) {
|
fun mc(loader: String, vararg versions: String) {
|
||||||
for (version in versions) vers("$version-$loader", version)
|
for (version in versions) vers("$version-$loader", version)
|
||||||
}
|
}
|
||||||
//i would recommend to use neoforge for mc > 1.20.1, i haven't tested template for forge on versions higher than that
|
//i would recommend to use neoforge for mc > 1.20.1, i haven't tested neocomputers for forge on versions higher than that
|
||||||
mc("fabric","1.20.1","1.20.4", "1.21.1", "1.21.3", "1.21.4")
|
//mc("fabric","1.20.1","1.20.4", "1.21.1", "1.21.3", "1.21.4", "1.21.5", "1.21.6", "1.21.7", "1.21.8", "1.21.9", "1.21.10", "1.21.11")
|
||||||
mc("forge","1.20.1")
|
mc("fabric", "1.20.1", "1.20.4", "1.21.9", "1.21.11")
|
||||||
|
mc("forge", "1.20.1")
|
||||||
//WARNING: neoforge uses mods.toml instead of neoforge.mods.toml for versions 1.20.4 (?) and earlier
|
//WARNING: neoforge uses mods.toml instead of neoforge.mods.toml for versions 1.20.4 (?) and earlier
|
||||||
mc("neoforge", "1.20.4", "1.21.1", "1.21.3", "1.21.4")
|
//mc("neoforge", "1.20.4", "1.21.1", "1.21.3", "1.21.4", "1.21.5", "1.21.6", "1.21.7", "1.21.8", "1.21.9", "1.21.10", "1.21.11")
|
||||||
|
mc("neoforge", "1.20.4", "1.21.9", "1.21.11")
|
||||||
}
|
}
|
||||||
create(rootProject)
|
create(rootProject)
|
||||||
}
|
}
|
||||||
|
|
||||||
rootProject.name = "TempLate"
|
rootProject.name = "NeoComputers"
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
package com.example.template;
|
|
||||||
|
|
||||||
import net.minecraft.client.gui.DrawContext;
|
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
|
||||||
import net.minecraft.text.Text;
|
|
||||||
|
|
||||||
public class ConfigScreen extends Screen {
|
|
||||||
|
|
||||||
public ConfigScreen(Screen parent) {
|
|
||||||
super(Text.empty());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void render(DrawContext context, int mouseX, int mouseY, float delta) {
|
|
||||||
super.render(context, mouseX, mouseY, delta);
|
|
||||||
context.drawCenteredTextWithShadow(client.textRenderer,
|
|
||||||
"Hello, world",
|
|
||||||
width / 2,
|
|
||||||
height / 2,
|
|
||||||
0xFFFFFFFF);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ConfigScreen createConfigScreen(Screen parent) {
|
|
||||||
return new ConfigScreen(parent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
package com.example.template;
|
|
||||||
|
|
||||||
public interface ModPlatform {
|
|
||||||
String getModloader();
|
|
||||||
boolean isModLoaded(String modloader);
|
|
||||||
}
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
package com.example.template;
|
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
|
|
||||||
public class TempLateInit
|
|
||||||
{
|
|
||||||
public static final String MODID = "template";
|
|
||||||
public static final Logger LOGGER = LoggerFactory.getLogger("Template");
|
|
||||||
public static ModPlatform PLATFORM = null;
|
|
||||||
|
|
||||||
public static void entrypoint(ModPlatform platform) {
|
|
||||||
TempLateInit.PLATFORM = platform;
|
|
||||||
LOGGER.info("Started mod in %s loader".formatted(TempLateInit.PLATFORM.getModloader()));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
27
src/main/java/org/neoflock/neocomputers/ConfigScreen.java
Normal file
27
src/main/java/org/neoflock/neocomputers/ConfigScreen.java
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
package org.neoflock.neocomputers;
|
||||||
|
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.GuiGraphics;
|
||||||
|
import net.minecraft.client.gui.screens.Screen;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
|
||||||
|
public class ConfigScreen extends Screen {
|
||||||
|
|
||||||
|
public ConfigScreen(Screen parent) {
|
||||||
|
super(Component.empty());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float delta) {
|
||||||
|
super.render(guiGraphics, mouseX, mouseY, delta);
|
||||||
|
guiGraphics.drawString(minecraft.font,
|
||||||
|
"Hello, world",
|
||||||
|
width / 2,
|
||||||
|
height / 2,
|
||||||
|
0xFFFFFFFF);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ConfigScreen createConfigScreen(Screen parent) {
|
||||||
|
return new ConfigScreen(parent);
|
||||||
|
}
|
||||||
|
}
|
||||||
11
src/main/java/org/neoflock/neocomputers/ModPlatform.java
Normal file
11
src/main/java/org/neoflock/neocomputers/ModPlatform.java
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
package org.neoflock.neocomputers;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This interface allows you to define platform specific code, and call it in
|
||||||
|
*/
|
||||||
|
|
||||||
|
public interface ModPlatform {
|
||||||
|
String getModloader();
|
||||||
|
boolean isModLoaded(String modloader);
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package org.neoflock.neocomputers;
|
||||||
|
|
||||||
|
import org.neoflock.neocomputers.platforms.fabric.NeoComputersFabric;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/*public class NeoComputersInit
|
||||||
|
{
|
||||||
|
public static final String MODID = "neocomputers";
|
||||||
|
public static final Logger LOGGER = LoggerFactory.getLogger("NeoComputers");
|
||||||
|
public static ModPlatform PLATFORM = null;
|
||||||
|
|
||||||
|
public static void entrypoint(ModPlatform platform) {
|
||||||
|
NeoComputersInit.PLATFORM = platform;
|
||||||
|
LOGGER.info("Started mod in %s loader".formatted(NeoComputersInit.PLATFORM.getModloader()));
|
||||||
|
LOGGER.info("Kotlin: %s".formatted(NeoComputers.INSTANCE.hello()));
|
||||||
|
|
||||||
|
}
|
||||||
|
}*/
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package com.example.template.mixin;
|
package org.neoflock.neocomputers.mixin;
|
||||||
|
|
||||||
import com.example.template.TempLateInit;
|
import org.neoflock.neocomputers.NeoComputers;
|
||||||
import net.minecraft.client.gui.screen.TitleScreen;
|
import net.minecraft.client.gui.screens.TitleScreen;
|
||||||
import org.spongepowered.asm.mixin.Mixin;
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
import org.spongepowered.asm.mixin.injection.At;
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
import org.spongepowered.asm.mixin.injection.Inject;
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
@@ -12,7 +12,7 @@ public class ExampleMixin {
|
|||||||
|
|
||||||
@Inject(method = "init",at=@At("HEAD"))
|
@Inject(method = "init",at=@At("HEAD"))
|
||||||
void init(CallbackInfo ci){
|
void init(CallbackInfo ci){
|
||||||
TempLateInit.LOGGER.info("Stonecutter example mixin init in %s".formatted(TempLateInit.PLATFORM.getModloader()));
|
NeoComputers.INSTANCE.getLOGGER().info("Stonecutter example mixin init in %s".formatted(NeoComputers.INSTANCE.getPLATFORM().getModloader()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
//? if fabric {
|
//? if fabric {
|
||||||
package com.example.template.platforms.fabric;
|
package org.neoflock.neocomputers.platforms.fabric;
|
||||||
|
|
||||||
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
import com.terraformersmc.modmenu.api.ConfigScreenFactory;
|
||||||
import com.terraformersmc.modmenu.api.ModMenuApi;
|
import com.terraformersmc.modmenu.api.ModMenuApi;
|
||||||
import com.example.template.ConfigScreen;
|
import org.neoflock.neocomputers.ConfigScreen;
|
||||||
|
|
||||||
public class ModMenuIntegration implements ModMenuApi {
|
public class ModMenuIntegration implements ModMenuApi {
|
||||||
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
public ConfigScreenFactory<?> getModConfigScreenFactory() {
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
//? if fabric {
|
//? if fabric {
|
||||||
package com.example.template.platforms.fabric;
|
package org.neoflock.neocomputers.platforms.fabric;
|
||||||
|
|
||||||
import com.example.template.ModPlatform;
|
import org.neoflock.neocomputers.ModPlatform;
|
||||||
import net.fabricmc.api.ModInitializer;
|
import net.fabricmc.api.ModInitializer;
|
||||||
import com.example.template.TempLateInit;
|
import org.neoflock.neocomputers.NeoComputers;
|
||||||
import net.fabricmc.loader.api.FabricLoader;
|
import net.fabricmc.loader.api.FabricLoader;
|
||||||
|
|
||||||
public class TempLateFabric implements ModInitializer {
|
public class NeoComputersFabric implements ModInitializer {
|
||||||
@Override
|
@Override
|
||||||
public void onInitialize() {
|
public void onInitialize() {
|
||||||
TempLateInit.entrypoint(new FabricPlatform());
|
NeoComputers.INSTANCE.entrypoint(new FabricPlatform());
|
||||||
}
|
}
|
||||||
public static class FabricPlatform implements ModPlatform{
|
public static class FabricPlatform implements ModPlatform{
|
||||||
|
|
||||||
@@ -1,17 +1,18 @@
|
|||||||
//? if forge {
|
//? if forge {
|
||||||
/*package com.example.template.platforms.forge;
|
/*package org.neoflock.neocomputers.neocomputers.platforms.forge;
|
||||||
|
|
||||||
import com.example.template.ConfigScreen;
|
import org.neoflock.neocomputers.ConfigScreen;
|
||||||
import com.example.template.TempLateInit;
|
import org.neoflock.neocomputers.NeoComputersInit;
|
||||||
import com.example.template.ModPlatform;
|
import org.neoflock.neocomputers.ModPlatform;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import net.minecraftforge.fml.ModList;
|
import net.minecraftforge.fml.ModList;
|
||||||
import net.minecraftforge.fml.common.Mod;
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
import org.neoflock.neocomputers.NeoComputers;
|
||||||
|
|
||||||
@Mod("template")
|
@Mod("neocomputers")
|
||||||
public class TempLateForge {
|
public class NeoComputersForge {
|
||||||
public TempLateForge() {
|
public NeoComputersForge() {
|
||||||
TempLateInit.entrypoint(new ForgePlatform());
|
NeoComputers.INSTANCE.entrypoint(new ForgePlatform());
|
||||||
MinecraftForge.registerConfigScreen(ConfigScreen::createConfigScreen);
|
MinecraftForge.registerConfigScreen(ConfigScreen::createConfigScreen);
|
||||||
}
|
}
|
||||||
public static class ForgePlatform implements ModPlatform {
|
public static class ForgePlatform implements ModPlatform {
|
||||||
@@ -1,32 +1,32 @@
|
|||||||
//? if neoforge {
|
//? if neoforge {
|
||||||
/*package com.example.template.platforms.neoforge;
|
/*package org.neoflock.neocomputers.neocomputers.platforms.neoforge;
|
||||||
|
|
||||||
import com.example.template.ConfigScreen;
|
import org.neoflock.neocomputers.ConfigScreen;
|
||||||
import com.example.template.TempLateInit;
|
import org.neoflock.neocomputers.NeoComputersInit;
|
||||||
import com.example.template.ModPlatform;
|
import org.neoflock.neocomputers.ModPlatform;
|
||||||
import net.minecraft.client.gui.screen.Screen;
|
|
||||||
import net.neoforged.fml.ModList;
|
import net.neoforged.fml.ModList;
|
||||||
import net.neoforged.fml.ModLoadingContext;
|
import net.neoforged.fml.ModLoadingContext;
|
||||||
import net.neoforged.fml.common.Mod;
|
import net.neoforged.fml.common.Mod;
|
||||||
|
import org.neoflock.neocomputers.NeoComputers;
|
||||||
//? if <1.21 {
|
//? if <1.21 {
|
||||||
import net.neoforged.neoforge.client.ConfigScreenHandler;
|
/^import net.neoforged.neoforge.client.ConfigScreenHandler;
|
||||||
//?} else {
|
^///?} else {
|
||||||
/^import net.neoforged.neoforge.client.gui.IConfigScreenFactory;
|
import net.neoforged.neoforge.client.gui.IConfigScreenFactory;
|
||||||
^///?}
|
//?}
|
||||||
@Mod("template")
|
@Mod("neocomputers")
|
||||||
public class TempLateNeoForge {
|
public class NeoComputersNeoForge {
|
||||||
public TempLateNeoForge() {
|
public NeoComputersNeoForge() {
|
||||||
TempLateInit.entrypoint(new NeoForgePlatform());
|
NeoComputers.INSTANCE.entrypoint(new NeoForgePlatform());
|
||||||
ModLoadingContext.get().registerExtensionPoint(
|
ModLoadingContext.get().registerExtensionPoint(
|
||||||
//? if <1.21 {
|
//? if <1.21 {
|
||||||
ConfigScreenHandler.ConfigScreenFactory.class,
|
/^ConfigScreenHandler.ConfigScreenFactory.class,
|
||||||
() -> new ConfigScreenHandler.ConfigScreenFactory(
|
() -> new ConfigScreenHandler.ConfigScreenFactory(
|
||||||
((client, parent) -> ConfigScreen.createConfigScreen(parent))
|
((client, parent) -> ConfigScreen.createConfigScreen(parent))
|
||||||
)
|
)
|
||||||
//?} else {
|
^///?} else {
|
||||||
/^IConfigScreenFactory.class,
|
IConfigScreenFactory.class,
|
||||||
() -> (client, parent) -> ConfigScreen.createConfigScreen(parent)
|
() -> (client, parent) -> ConfigScreen.createConfigScreen(parent)
|
||||||
^///?}
|
//?}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
public static class NeoForgePlatform implements ModPlatform {
|
public static class NeoForgePlatform implements ModPlatform {
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package com.example.template.util;
|
package org.neoflock.neocomputers.util;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileOutputStream;
|
import java.io.FileOutputStream;
|
||||||
19
src/main/kotlin/org/neoflock/neocomputers/NeoComputers.kt
Normal file
19
src/main/kotlin/org/neoflock/neocomputers/NeoComputers.kt
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
package org.neoflock.neocomputers
|
||||||
|
|
||||||
|
import org.slf4j.Logger
|
||||||
|
import org.slf4j.LoggerFactory
|
||||||
|
|
||||||
|
|
||||||
|
object NeoComputers {
|
||||||
|
const val MODID: String = "neocomputers"
|
||||||
|
val LOGGER: Logger = LoggerFactory.getLogger("NeoComputers")
|
||||||
|
var PLATFORM: ModPlatform? = null
|
||||||
|
|
||||||
|
fun entrypoint(platform: ModPlatform?) {
|
||||||
|
PLATFORM = platform
|
||||||
|
//LOGGER.info("Started mod in %s loader".formatted(NeoComputersInit.PLATFORM.getModloader()))
|
||||||
|
//LOGGER.info("Kotlin: %s".formatted(NeoComputers.hello()))
|
||||||
|
LOGGER.info("Started mod in ${NeoComputers.PLATFORM?.modloader} loader")
|
||||||
|
LOGGER.info("Hello from kotlin!")
|
||||||
|
}
|
||||||
|
}
|
||||||
14
src/main/kotlin/org/neoflock/neocomputers/block/BaseBlock.kt
Normal file
14
src/main/kotlin/org/neoflock/neocomputers/block/BaseBlock.kt
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
package org.neoflock.neocomputers.block
|
||||||
|
|
||||||
|
import net.minecraft.world.level.block.Block
|
||||||
|
|
||||||
|
class BaseBlock : Block {
|
||||||
|
protected val tier: Int
|
||||||
|
constructor(tier: Int): super(Properties.of()) {
|
||||||
|
this.tier = tier
|
||||||
|
}
|
||||||
|
|
||||||
|
public fun getTier(): Int {
|
||||||
|
return tier
|
||||||
|
}
|
||||||
|
}
|
||||||
50
src/main/kotlin/org/neoflock/neocomputers/block/Blocks.kt
Normal file
50
src/main/kotlin/org/neoflock/neocomputers/block/Blocks.kt
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
package org.libreflock.neocomputers.block
|
||||||
|
|
||||||
|
import dev.architectury.registry.registries.DeferredRegister
|
||||||
|
import dev.architectury.registry.registries.RegistrySupplier
|
||||||
|
import net.minecraft.core.registries.Registries
|
||||||
|
import net.minecraft.world.item.BlockItem
|
||||||
|
import net.minecraft.world.item.Item
|
||||||
|
import net.minecraft.world.level.block.Block
|
||||||
|
import org.libreflock.neocomputers.item.Items
|
||||||
|
import org.libreflock.neocomputers.item.Tabs
|
||||||
|
import org.neoflock.neocomputers.NeoComputers
|
||||||
|
import org.neoflock.neocomputers.block.BaseBlock
|
||||||
|
import java.util.function.Consumer
|
||||||
|
import java.util.function.Supplier
|
||||||
|
|
||||||
|
object Blocks {
|
||||||
|
val BLOCKS: DeferredRegister<Block?> = DeferredRegister.create(NeoComputers.MODID, Registries.BLOCK)
|
||||||
|
|
||||||
|
|
||||||
|
val CASE: MutableList<RegistrySupplier<Block?>?>? =
|
||||||
|
BaseBlock.register(intArrayOf(0, 1, 2), "case", { tier -> CaseBlock(tier) })
|
||||||
|
|
||||||
|
// public static final RegistrySupplier<Block> CASE0 = BLOCKS.register("case0", () -> new CaseBlock(0));
|
||||||
|
// public static final RegistrySupplier<Block> CASE1 = BLOCKS.register("case1", () -> new CaseBlock(1));
|
||||||
|
// public static final RegistrySupplier<Block> CASE2 = BLOCKS.register("case2", () -> new CaseBlock(2));
|
||||||
|
// public static final RegistrySupplier<Block> CABLE = BLOCKS.register("cable", () -> new CableBlock());
|
||||||
|
val SCREEN: RegistrySupplier<Block?>? = BLOCKS.register<Block?>("screen", Supplier { ScreenBlock() })
|
||||||
|
val CABLE: RegistrySupplier<Block?>? = BLOCKS.register<Block?>("cable", Supplier { CableBlock() })
|
||||||
|
|
||||||
|
fun registerBlockItems() {
|
||||||
|
BLOCKS.forEach(Consumer { sup: RegistrySupplier<Block?>? ->
|
||||||
|
// sup.pre
|
||||||
|
// sup.((blk) -> {
|
||||||
|
// NeoComputers.LOGGER.info(blk.getDescriptionId());
|
||||||
|
// if (blk instanceof BaseBlock) {
|
||||||
|
// Items.ITEMS.register(sup.getId().getPath(), () -> new BaseBlock.BaseBlockItem(blk, new Item.Properties().arch$tab(Tabs.TAB)));
|
||||||
|
// } else {
|
||||||
|
// Items.ITEMS.register(sup.getId().getPath(), () -> new BlockItem(blk, new Item.Properties().arch$tab(Tabs.TAB)));
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
Items.ITEMS.register(sup!!.getId().getPath(), {
|
||||||
|
if (sup.get() is BaseBlock) {
|
||||||
|
return@register BaseBlockItem(sup.get(), Item.Properties().`arch$tab`(Tabs.TAB))
|
||||||
|
} else {
|
||||||
|
return@register BlockItem(sup.get(), Item.Properties().`arch$tab`(Tabs.TAB))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
modLoader = "javafml"
|
modLoader = "javafml"
|
||||||
loaderVersion = "*"
|
loaderVersion = "*"
|
||||||
license = "LGPLv3"
|
license = "LGPLv3"
|
||||||
issueTrackerURL="https://AuthorExample/TempLate/issues"
|
issueTrackerURL="https://github.com/NeoFlock/NeoComputers/issues"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId = "template"
|
modId = "neocomputers"
|
||||||
version = "${version}"
|
version = "${version}"
|
||||||
displayName = "${name}"
|
displayName = "${name}"
|
||||||
authors = "AuthorExample"
|
authors = "NeoFlock Team"
|
||||||
description = ""
|
description = ""
|
||||||
logoFile = "assets/template/icon.png"
|
logoFile = "assets/neocomputers/icon.png"
|
||||||
logoBlur = false
|
logoBlur = false
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "template-common.mixins.json"
|
config = "neocomputers-common.mixins.json"
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "template-neoforge.mixins.json"
|
config = "neocomputers-neoforge.mixins.json"
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
modLoader = "javafml"
|
modLoader = "javafml"
|
||||||
loaderVersion = "*"
|
loaderVersion = "*"
|
||||||
license = "LGPLv3"
|
license = "LGPLv3"
|
||||||
issueTrackerURL="https://AuthorExample/TempLate/issues"
|
issueTrackerURL="https://github.com/NeoFlock/NeoComputers/issues"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId = "template"
|
modId = "neocomputers"
|
||||||
version = "${version}"
|
version = "${version}"
|
||||||
displayName = "${name}"
|
displayName = "${name}"
|
||||||
authors = "AuthorExample"
|
authors = "NeoFlock Team"
|
||||||
description = ""
|
description = ""
|
||||||
logoFile = "assets/template/icon.png"
|
logoFile = "assets/neocomputers/icon.png"
|
||||||
logoBlur = false
|
logoBlur = false
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "template-common.mixins.json"
|
config = "neocomputers-common.mixins.json"
|
||||||
|
|
||||||
[[mixins]]
|
[[mixins]]
|
||||||
config = "template-neoforge.mixins.json"
|
config = "neocomputers-neoforge.mixins.json"
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
{
|
{
|
||||||
"accessWidener": "template.accesswidener"
|
"accessWidener": "neocomputers.accesswidener"
|
||||||
}
|
}
|
||||||
4
src/main/resources/assets/neocomputers/lang/en_us.json
Normal file
4
src/main/resources/assets/neocomputers/lang/en_us.json
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"neocomputers.confirm": "Confirm",
|
||||||
|
"neocomputers.cancel": "Cancel"
|
||||||
|
}
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
"template.confirm": "Confirm",
|
|
||||||
"template.cancel": "Cancel"
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
"name": "${name}",
|
"name": "${name}",
|
||||||
"description": "",
|
"description": "",
|
||||||
"authors": [
|
"authors": [
|
||||||
"AuthorExample"
|
"NeoFlock Team"
|
||||||
],
|
],
|
||||||
"contact": {
|
"contact": {
|
||||||
},
|
},
|
||||||
@@ -14,18 +14,19 @@
|
|||||||
"environment": "*",
|
"environment": "*",
|
||||||
"entrypoints": {
|
"entrypoints": {
|
||||||
"main": [
|
"main": [
|
||||||
"com.example.template.platforms.fabric.TempLateFabric"
|
"org.neoflock.neocomputers.platforms.fabric.NeoComputersFabric"
|
||||||
],
|
],
|
||||||
"modmenu": [
|
"modmenu": [
|
||||||
"com.example.template.platforms.fabric.ModMenuIntegration"
|
"org.neoflock.neocomputers.platforms.fabric.ModMenuIntegration"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"mixins": [
|
"mixins": [
|
||||||
"template-common.mixins.json",
|
"neocomputers-common.mixins.json",
|
||||||
"template-fabric.mixins.json"
|
"neocomputers-fabric.mixins.json"
|
||||||
],
|
],
|
||||||
"depends": {
|
"depends": {
|
||||||
"fabricloader": ">=0.15",
|
"fabricloader": ">=0.15",
|
||||||
"minecraft": "${minecraft}"
|
"minecraft": "${minecraft}",
|
||||||
|
"fabric-language-kotlin": ">=1.13.10+kotlin.2.3.20"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "com.example.template.mixin",
|
"package": "org.neoflock.neocomputers.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
|
],
|
||||||
|
"client": [
|
||||||
"ExampleMixin"
|
"ExampleMixin"
|
||||||
],
|
],
|
||||||
"injectors": {
|
"injectors": {
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "com.example.template.platforms.forge.mixin",
|
"package": "org.neoflock.neocomputers.platforms.fabric.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
],
|
],
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "com.example.template.platforms.fabric.mixin",
|
"package": "org.neoflock.neocomputers.platforms.forge.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
],
|
],
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"required": true,
|
"required": true,
|
||||||
"package": "com.example.template.platforms.neoforge.mixin",
|
"package": "org.neoflock.neocomputers.platforms.neoforge.mixin",
|
||||||
"compatibilityLevel": "JAVA_17",
|
"compatibilityLevel": "JAVA_17",
|
||||||
"mixins": [
|
"mixins": [
|
||||||
],
|
],
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id("dev.kikugie.stonecutter")
|
id("dev.kikugie.stonecutter")
|
||||||
id("dev.architectury.loom") version "1.7-SNAPSHOT" apply false
|
id("dev.architectury.loom") version "1.13-SNAPSHOT" apply false
|
||||||
id("architectury-plugin") version "3.4-SNAPSHOT" apply false
|
id("architectury-plugin") version "3.4-SNAPSHOT" apply false
|
||||||
id("com.github.johnrengelman.shadow") version "8.1.1" apply false
|
id("com.gradleup.shadow") version "9.3.0" apply false
|
||||||
id("me.modmuss50.mod-publish-plugin") version "0.8.4" apply false
|
id("me.modmuss50.mod-publish-plugin") version "0.8.4" apply false
|
||||||
}
|
}
|
||||||
stonecutter active "1.20.1-fabric" /* [SC] DO NOT EDIT */
|
stonecutter active "1.21.9-fabric" /* [SC] DO NOT EDIT */
|
||||||
stonecutter.automaticPlatformConstants = true
|
stonecutter.automaticPlatformConstants = true
|
||||||
|
|
||||||
// Builds every version into `build/libs/{mod.version}/{loader}`
|
// Builds every version into `build/libs/{mod.version}/{loader}`
|
||||||
|
|||||||
14
versions/1.21.10-fabric/gradle.properties
Normal file
14
versions/1.21.10-fabric/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.10
|
||||||
|
mod.mc_dep_forgelike=[1.21.10]
|
||||||
|
mod.mc_title=1.21.10
|
||||||
|
mod.mc_targets=1.21.10
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.7.8-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.135.0+1.21.10
|
||||||
|
deps.modmenu_version=16.0.0-rc.1
|
||||||
|
|
||||||
|
loom.platform=fabric
|
||||||
14
versions/1.21.10-neoforge/gradle.properties
Normal file
14
versions/1.21.10-neoforge/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.10
|
||||||
|
mod.mc_dep_forgelike=[1.21.10]
|
||||||
|
mod.mc_title=1.21.10
|
||||||
|
mod.mc_targets=1.21.10
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.10.0-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.135.0+1.21.10
|
||||||
|
deps.modmenu_version=16.0.0-rc.1
|
||||||
|
|
||||||
|
loom.platform=neoforge
|
||||||
14
versions/1.21.11-fabric/gradle.properties
Normal file
14
versions/1.21.11-fabric/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.11
|
||||||
|
mod.mc_dep_forgelike=[1.21.11]
|
||||||
|
mod.mc_title=1.21.11
|
||||||
|
mod.mc_targets=1.21.11
|
||||||
|
|
||||||
|
deps.forge_loader=61.0.3
|
||||||
|
deps.neoforge_loader=21.11.13-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.140.2+1.21.11
|
||||||
|
deps.modmenu_version=17.0.0-beta.1
|
||||||
|
|
||||||
|
loom.platform=fabric
|
||||||
14
versions/1.21.11-neoforge/gradle.properties
Normal file
14
versions/1.21.11-neoforge/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.11
|
||||||
|
mod.mc_dep_forgelike=[1.21.11]
|
||||||
|
mod.mc_title=1.21.11
|
||||||
|
mod.mc_targets=1.21.11
|
||||||
|
|
||||||
|
deps.forge_loader=61.0.3
|
||||||
|
deps.neoforge_loader=21.11.13-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.140.2+1.21.11
|
||||||
|
deps.modmenu_version=17.0.0-beta.1
|
||||||
|
|
||||||
|
loom.platform=neoforge
|
||||||
14
versions/1.21.5-fabric/gradle.properties
Normal file
14
versions/1.21.5-fabric/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.5
|
||||||
|
mod.mc_dep_forgelike=[1.21.5]
|
||||||
|
mod.mc_title=1.21.5
|
||||||
|
mod.mc_targets=1.21.5
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.4.47-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.121.0+1.21.5
|
||||||
|
deps.modmenu_version=14.0.0-rc.1
|
||||||
|
|
||||||
|
loom.platform=fabric
|
||||||
14
versions/1.21.5-neoforge/gradle.properties
Normal file
14
versions/1.21.5-neoforge/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.5
|
||||||
|
mod.mc_dep_forgelike=[1.21.5]
|
||||||
|
mod.mc_title=1.21.5
|
||||||
|
mod.mc_targets=1.21.5
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.5.54-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.121.0+1.21.5
|
||||||
|
deps.modmenu_version=[UNSUPPORTED]
|
||||||
|
|
||||||
|
loom.platform=neoforge
|
||||||
14
versions/1.21.6-fabric/gradle.properties
Normal file
14
versions/1.21.6-fabric/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.6
|
||||||
|
mod.mc_dep_forgelike=[1.21.6]
|
||||||
|
mod.mc_title=1.21.6
|
||||||
|
mod.mc_targets=1.21.6
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.6.20-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.128.2+1.21.6
|
||||||
|
deps.modmenu_version=15.0.0-beta.3
|
||||||
|
|
||||||
|
loom.platform=fabric
|
||||||
14
versions/1.21.6-neoforge/gradle.properties
Normal file
14
versions/1.21.6-neoforge/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.6
|
||||||
|
mod.mc_dep_forgelike=[1.21.6]
|
||||||
|
mod.mc_title=1.21.6
|
||||||
|
mod.mc_targets=1.21.6
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.6.20-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.128.2+1.21.6
|
||||||
|
deps.modmenu_version=[UNSUPPORTED]
|
||||||
|
|
||||||
|
loom.platform=neoforge
|
||||||
14
versions/1.21.7-fabric/gradle.properties
Normal file
14
versions/1.21.7-fabric/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.7
|
||||||
|
mod.mc_dep_forgelike=[1.21.7]
|
||||||
|
mod.mc_title=1.21.7
|
||||||
|
mod.mc_targets=1.21.7
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.7.8-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.128.2+1.21.7
|
||||||
|
deps.modmenu_version=15.0.0-beta.3
|
||||||
|
|
||||||
|
loom.platform=fabric
|
||||||
14
versions/1.21.7-neoforge/gradle.properties
Normal file
14
versions/1.21.7-neoforge/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.7
|
||||||
|
mod.mc_dep_forgelike=[1.21.7]
|
||||||
|
mod.mc_title=1.21.7
|
||||||
|
mod.mc_targets=1.21.7
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.7.8-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.128.2+1.21.7
|
||||||
|
deps.modmenu_version=[UNSUPPORTED]
|
||||||
|
|
||||||
|
loom.platform=neoforge
|
||||||
14
versions/1.21.8-fabric/gradle.properties
Normal file
14
versions/1.21.8-fabric/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.8
|
||||||
|
mod.mc_dep_forgelike=[1.21.8]
|
||||||
|
mod.mc_title=1.21.8
|
||||||
|
mod.mc_targets=1.21.8
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.8.0-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.129.0+1.21.8
|
||||||
|
deps.modmenu_version=15.0.0-beta.3
|
||||||
|
|
||||||
|
loom.platform=fabric
|
||||||
14
versions/1.21.8-neoforge/gradle.properties
Normal file
14
versions/1.21.8-neoforge/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.8
|
||||||
|
mod.mc_dep_forgelike=[1.21.8]
|
||||||
|
mod.mc_title=1.21.8
|
||||||
|
mod.mc_targets=1.21.8
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.8.0-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.129.0+1.21.8
|
||||||
|
deps.modmenu_version=15.0.0-beta.3
|
||||||
|
|
||||||
|
loom.platform=neoforge
|
||||||
14
versions/1.21.9-fabric/gradle.properties
Normal file
14
versions/1.21.9-fabric/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.9
|
||||||
|
mod.mc_dep_forgelike=[1.21.9]
|
||||||
|
mod.mc_title=1.21.9
|
||||||
|
mod.mc_targets=1.21.9
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.7.8-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.133.13+1.21.9
|
||||||
|
deps.modmenu_version=16.0.0-rc.1
|
||||||
|
|
||||||
|
loom.platform=fabric
|
||||||
14
versions/1.21.9-neoforge/gradle.properties
Normal file
14
versions/1.21.9-neoforge/gradle.properties
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
mod.mc_dep_fabric==1.21.9
|
||||||
|
mod.mc_dep_forgelike=[1.21.9]
|
||||||
|
mod.mc_title=1.21.9
|
||||||
|
mod.mc_targets=1.21.9
|
||||||
|
|
||||||
|
deps.forge_loader=54.0.13
|
||||||
|
deps.neoforge_loader=21.9.2-beta
|
||||||
|
deps.neoforge_patch=1.21+build.4
|
||||||
|
|
||||||
|
deps.yarn_build=1
|
||||||
|
deps.fabric_version=0.133.13+1.21.9
|
||||||
|
deps.modmenu_version=16.0.0-rc.1
|
||||||
|
|
||||||
|
loom.platform=neoforge
|
||||||
Reference in New Issue
Block a user