commit b4bf198af60a003fcb0206d713b91e29cd9bf4e0 Author: newt Date: Sat Aug 31 22:19:17 2024 +0100 chore: initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ccb0c56 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +build/ +*.ipr +run/ +*.iws +out/ +*.iml +.gradle/ +output/ +bin/ +libs/ + +.classpath +.project +.idea/ +classes/ +.metadata +.vscode +.settings +*.launch \ No newline at end of file diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..0b94cff --- /dev/null +++ b/build.gradle @@ -0,0 +1,73 @@ +plugins { + id 'dev.architectury.loom' version '1.7-SNAPSHOT' apply false + id 'architectury-plugin' version '3.4-SNAPSHOT' + id 'com.github.johnrengelman.shadow' version '8.1.1' apply false +} + +architectury { + minecraft = project.minecraft_version +} + +allprojects { + group = rootProject.maven_group + version = rootProject.mod_version +} + +subprojects { + apply plugin: 'dev.architectury.loom' + apply plugin: 'architectury-plugin' + apply plugin: 'maven-publish' + + base { + // Set up a suffixed format for the mod jar names, e.g. `example-fabric`. + archivesName = "$rootProject.archives_name-$project.name" + } + + repositories { + // Add repositories to retrieve artifacts from in here. + // You should only use this when depending on other mods because + // Loom adds the essential maven repositories to download Minecraft and libraries from automatically. + // See https://docs.gradle.org/current/userguide/declaring_repositories.html + // for more information about repositories. + } + + dependencies { + minecraft "net.minecraft:minecraft:$rootProject.minecraft_version" + mappings loom.layered { + it.mappings("net.fabricmc:yarn:$rootProject.yarn_mappings:v2") + it.mappings("dev.architectury:yarn-mappings-patch-neoforge:$rootProject.yarn_mappings_patch_neoforge_version") + } + } + + java { + // Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task + // if it is present. + // If you remove this line, sources will not be generated. + withSourcesJar() + + sourceCompatibility = JavaVersion.VERSION_21 + targetCompatibility = JavaVersion.VERSION_21 + } + + tasks.withType(JavaCompile).configureEach { + it.options.release = 21 + } + + // Configure Maven publishing. + publishing { + publications { + mavenJava(MavenPublication) { + artifactId = base.archivesName.get() + from components.java + } + } + + // See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing. + repositories { + // Add repositories to publish to here. + // Notice: This block does NOT have the same function as the block in the top level. + // The repositories here will be used for publishing your artifact, not for + // retrieving dependencies. + } + } +} diff --git a/common/build.gradle b/common/build.gradle new file mode 100644 index 0000000..816616f --- /dev/null +++ b/common/build.gradle @@ -0,0 +1,13 @@ +architectury { + common rootProject.enabled_platforms.split(',') +} + +dependencies { + // We depend on Fabric Loader here to use the Fabric @Environment annotations, + // which get remapped to the correct annotations on each platform. + // Do NOT use other classes from Fabric Loader. + modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version" + + // Architectury API. This is optional, and you can comment it out if you don't need it. + modImplementation "dev.architectury:architectury:$rootProject.architectury_api_version" +} diff --git a/common/src/main/java/dev/newty/projectileding/ProjectileDing.java b/common/src/main/java/dev/newty/projectileding/ProjectileDing.java new file mode 100644 index 0000000..1d39c7f --- /dev/null +++ b/common/src/main/java/dev/newty/projectileding/ProjectileDing.java @@ -0,0 +1,13 @@ +package dev.newty.projectileding; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +public final class ProjectileDing { + public static final String MOD_ID = "projectileding"; + public static final Logger LOGGER = LogManager.getLogger("ProjectileDing"); + + public static void init() { + LOGGER.info("Hello :3"); + } +} diff --git a/common/src/main/resources/projectileding.mixins.json b/common/src/main/resources/projectileding.mixins.json new file mode 100644 index 0000000..897c635 --- /dev/null +++ b/common/src/main/resources/projectileding.mixins.json @@ -0,0 +1,13 @@ +{ + "required": true, + "package": "dev.newty.projectileding.mixin", + "compatibilityLevel": "JAVA_21", + "minVersion": "0.8", + "client": [ + ], + "mixins": [ + ], + "injectors": { + "defaultRequire": 1 + } +} diff --git a/fabric-like/build.gradle b/fabric-like/build.gradle new file mode 100644 index 0000000..eeb4364 --- /dev/null +++ b/fabric-like/build.gradle @@ -0,0 +1,13 @@ +architectury { + common rootProject.enabled_platforms.split(',') +} + +dependencies { + modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version" + modImplementation "net.fabricmc.fabric-api:fabric-api:$rootProject.fabric_api_version" + + // Architectury API. This is optional, and you can comment it out if you don't need it. + modImplementation "dev.architectury:architectury-fabric:$rootProject.architectury_api_version" + + compileOnly(project(path: ':common', configuration: 'namedElements')) { transitive false } +} diff --git a/fabric-like/src/main/java/dev/newty/projectileding/fabriclike/ProjectileDingFabricLike.java b/fabric-like/src/main/java/dev/newty/projectileding/fabriclike/ProjectileDingFabricLike.java new file mode 100644 index 0000000..04cbe22 --- /dev/null +++ b/fabric-like/src/main/java/dev/newty/projectileding/fabriclike/ProjectileDingFabricLike.java @@ -0,0 +1,10 @@ +package dev.newty.projectileding.fabriclike; + +import dev.newty.projectileding.ProjectileDing; + +public final class ProjectileDingFabricLike { + public static void init() { + // Run our common setup. + ProjectileDing.init(); + } +} diff --git a/fabric/build.gradle b/fabric/build.gradle new file mode 100644 index 0000000..b5dc249 --- /dev/null +++ b/fabric/build.gradle @@ -0,0 +1,57 @@ +plugins { + id 'com.github.johnrengelman.shadow' +} + +architectury { + platformSetupLoomIde() + fabric() +} + +configurations { + common { + canBeResolved = true + canBeConsumed = false + } + compileClasspath.extendsFrom common + runtimeClasspath.extendsFrom common + developmentFabric.extendsFrom common + + // Files in this configuration will be bundled into your mod using the Shadow plugin. + // Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files. + shadowBundle { + canBeResolved = true + canBeConsumed = false + } +} + +dependencies { + modImplementation "net.fabricmc:fabric-loader:$rootProject.fabric_loader_version" + + // Fabric API. This is technically optional, but you probably want it anyway. + modImplementation "net.fabricmc.fabric-api:fabric-api:$rootProject.fabric_api_version" + + // Architectury API. This is optional, and you can comment it out if you don't need it. + modImplementation "dev.architectury:architectury-fabric:$rootProject.architectury_api_version" + + common(project(path: ':common', configuration: 'namedElements')) { transitive false } + shadowBundle project(path: ':common', configuration: 'transformProductionFabric') + common(project(path: ':fabric-like', configuration: 'namedElements')) { transitive false } + shadowBundle project(path: ':fabric-like', configuration: 'transformProductionFabric') +} + +processResources { + inputs.property 'version', project.version + + filesMatching('fabric.mod.json') { + expand version: project.version + } +} + +shadowJar { + configurations = [project.configurations.shadowBundle] + archiveClassifier = 'dev-shadow' +} + +remapJar { + input.set shadowJar.archiveFile +} diff --git a/fabric/src/main/java/dev/newty/projectileding/fabric/ProjectileDingFabric.java b/fabric/src/main/java/dev/newty/projectileding/fabric/ProjectileDingFabric.java new file mode 100644 index 0000000..e977abd --- /dev/null +++ b/fabric/src/main/java/dev/newty/projectileding/fabric/ProjectileDingFabric.java @@ -0,0 +1,17 @@ +package dev.newty.projectileding.fabric; + +import net.fabricmc.api.ModInitializer; + +import dev.newty.projectileding.fabriclike.ProjectileDingFabricLike; + +public final class ProjectileDingFabric implements ModInitializer { + @Override + public void onInitialize() { + // This code runs as soon as Minecraft is in a mod-load-ready state. + // However, some things (like resources) may still be uninitialized. + // Proceed with mild caution. + + // Run the Fabric-like setup. + ProjectileDingFabricLike.init(); + } +} diff --git a/fabric/src/main/java/dev/newty/projectileding/fabric/client/ProjectileDingFabricClient.java b/fabric/src/main/java/dev/newty/projectileding/fabric/client/ProjectileDingFabricClient.java new file mode 100644 index 0000000..1aee5b5 --- /dev/null +++ b/fabric/src/main/java/dev/newty/projectileding/fabric/client/ProjectileDingFabricClient.java @@ -0,0 +1,10 @@ +package dev.newty.projectileding.fabric.client; + +import net.fabricmc.api.ClientModInitializer; + +public final class ProjectileDingFabricClient implements ClientModInitializer { + @Override + public void onInitializeClient() { + // This entrypoint is suitable for setting up client-specific logic, such as rendering. + } +} diff --git a/fabric/src/main/resources/fabric.mod.json b/fabric/src/main/resources/fabric.mod.json new file mode 100644 index 0000000..a3ee51f --- /dev/null +++ b/fabric/src/main/resources/fabric.mod.json @@ -0,0 +1,38 @@ +{ + "schemaVersion": 1, + "id": "projectileding", + "version": "${version}", + "name": "ProjectileDing", + "description": "This is an example description! Tell everyone what your mod is about!", + "authors": [ + "Me!" + ], + "contact": { + "homepage": "https://fabricmc.net/", + "sources": "https://github.com/FabricMC/fabric-example-mod" + }, + "license": "OQL", + "icon": "assets/projectileding/icon.png", + "environment": "*", + "entrypoints": { + "main": [ + "dev.newty.projectileding.fabric.ProjectileDingFabric" + ], + "client": [ + "dev.newty.projectileding.fabric.client.ProjectileDingFabricClient" + ] + }, + "mixins": [ + "projectileding.mixins.json" + ], + "depends": { + "fabricloader": ">=0.16.3", + "minecraft": "~1.21", + "java": ">=21", + "architectury": ">=13.0.2", + "fabric-api": "*" + }, + "suggests": { + "another-mod": "*" + } +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..32dcea0 --- /dev/null +++ b/gradle.properties @@ -0,0 +1,22 @@ +# Done to increase the memory available to Gradle. +org.gradle.jvmargs=-Xmx2G +org.gradle.parallel=true + +# Mod properties +mod_version = 1.0.0 +maven_group = dev.newty +archives_name = projectileding +enabled_platforms = fabric,neoforge,quilt + +# Minecraft properties +minecraft_version = 1.21 +yarn_mappings = 1.21+build.1 + +# Dependencies +architectury_api_version = 13.0.2 +fabric_loader_version = 0.16.3 +fabric_api_version = 0.102.0+1.21 +neoforge_version = 21.0.42-beta +yarn_mappings_patch_neoforge_version = 1.21+build.4 +quilt_loader_version = 0.26.4-beta.5 +quilted_fabric_api_version = 11.0.0-alpha.3+0.100.7-1.21 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..e644113 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..a441313 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,7 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +networkTimeout=10000 +validateDistributionUrl=true +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew new file mode 100644 index 0000000..1aa94a4 --- /dev/null +++ b/gradlew @@ -0,0 +1,249 @@ +#!/bin/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. +# +# 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 + +# Resolve links: $0 may be a link +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac +done + +# This is normally unused +# shellcheck disable=SC2034 +APP_BASE_NAME=${0##*/} +# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) +APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD=maximum + +warn () { + echo "$*" +} >&2 + +die () { + echo + echo "$*" + echo + exit 1 +} >&2 + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD=$JAVA_HOME/jre/sh/java + else + JAVACMD=$JAVA_HOME/bin/java + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD=java + if ! command -v java >/dev/null 2>&1 + 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 +location of your Java installation." + fi +fi + +# Increase the maximum file descriptors if we can. +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC2039,SC3045 + 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 + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done +fi + + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# 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 + +# Use "xargs" to parse quoted 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 -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..25da30d --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,92 @@ +@rem +@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 Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused +set APP_BASE_NAME=%~n0 +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. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if %ERRORLEVEL% equ 0 goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto execute + +echo. 1>&2 +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2 +echo. 1>&2 +echo Please set the JAVA_HOME variable in your environment to match the 1>&2 +echo location of your Java installation. 1>&2 + +goto fail + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* + +:end +@rem End local scope for the variables with windows NT shell +if %ERRORLEVEL% equ 0 goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/license.md b/license.md new file mode 100644 index 0000000..b7d0151 --- /dev/null +++ b/license.md @@ -0,0 +1,57 @@ +# 🏳️‍🌈 Opinionated Queer License v1.2 + +© Copyright [newt](https://newty.dev/) + +## Permissions + +The creators of this Work (“The Licensor”) grant permission +to any person, group or legal entity that doesn't violate the prohibitions below (“The User”), +to do everything with this Work that would otherwise infringe their copyright or any patent claims, +subject to the following conditions: + +## Obligations + +The User must give appropriate credit to the Licensor, +provide a copy of this license or a (clickable, if the medium allows) link to +[oql.avris.it/license/v1.2](https://oql.avris.it/license/v1.2), +and indicate whether and what kind of changes were made. +The User may do so in any reasonable manner, +but not in any way that suggests the Licensor endorses the User or their use. + +## Prohibitions + +No one may use this Work for prejudiced or bigoted purposes, including but not limited to: +racism, xenophobia, queerphobia, queer exclusionism, homophobia, transphobia, enbyphobia, misogyny. + +No one may use this Work to inflict or facilitate violence or abuse of human rights, +as defined in either of the following documents: +[Universal Declaration of Human Rights](https://www.un.org/en/about-us/universal-declaration-of-human-rights), +[European Convention on Human Rights](https://prd-echr.coe.int/web/echr/european-convention-on-human-rights) +along with the rulings of the [European Court of Human Rights](https://www.echr.coe.int/). + +No law enforcement, carceral institutions, immigration enforcement entities, military entities or military contractors +may use the Work for any reason. This also applies to any individuals employed by those entities. + +No business entity where the ratio of pay (salaried, freelance, stocks, or other benefits) +between the highest and lowest individual in the entity is greater than 50 : 1 +may use the Work for any reason. + +No private business run for profit with more than a thousand employees +may use the Work for any reason. + +Unless the User has made substantial changes to the Work, +or uses it only as a part of a new work (eg. as a library, as a part of an anthology, etc.), +they are prohibited from selling the Work. +That prohibition includes processing the Work with machine learning models. + +## Sanctions + +If the Licensor notifies the User that they have not complied with the rules of the license, +they can keep their license by complying within 30 days after the notice. +If they do not do so, their license ends immediately. + +## Warranty + +This Work is provided “as is”, without warranty of any kind, express or implied. +The Licensor will not be liable to anyone for any damages related to the Work or this license, +under any kind of legal claim as far as the law allows. \ No newline at end of file diff --git a/neoforge/build.gradle b/neoforge/build.gradle new file mode 100644 index 0000000..471864e --- /dev/null +++ b/neoforge/build.gradle @@ -0,0 +1,59 @@ +plugins { + id 'com.github.johnrengelman.shadow' +} + +architectury { + platformSetupLoomIde() + neoForge() +} + +configurations { + common { + canBeResolved = true + canBeConsumed = false + } + compileClasspath.extendsFrom common + runtimeClasspath.extendsFrom common + developmentNeoForge.extendsFrom common + + // Files in this configuration will be bundled into your mod using the Shadow plugin. + // Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files. + shadowBundle { + canBeResolved = true + canBeConsumed = false + } +} + +repositories { + maven { + name = 'NeoForged' + url = 'https://maven.neoforged.net/releases' + } +} + +dependencies { + neoForge "net.neoforged:neoforge:$rootProject.neoforge_version" + + // Architectury API. This is optional, and you can comment it out if you don't need it. + modImplementation "dev.architectury:architectury-neoforge:$rootProject.architectury_api_version" + + common(project(path: ':common', configuration: 'namedElements')) { transitive false } + shadowBundle project(path: ':common', configuration: 'transformProductionNeoForge') +} + +processResources { + inputs.property 'version', project.version + + filesMatching('META-INF/neoforge.mods.toml') { + expand version: project.version + } +} + +shadowJar { + configurations = [project.configurations.shadowBundle] + archiveClassifier = 'dev-shadow' +} + +remapJar { + input.set shadowJar.archiveFile +} diff --git a/neoforge/gradle.properties b/neoforge/gradle.properties new file mode 100644 index 0000000..2e6ed76 --- /dev/null +++ b/neoforge/gradle.properties @@ -0,0 +1 @@ +loom.platform = neoforge diff --git a/neoforge/src/main/java/dev/newty/projectileding/neoforge/ProjectileDingNeoForge.java b/neoforge/src/main/java/dev/newty/projectileding/neoforge/ProjectileDingNeoForge.java new file mode 100644 index 0000000..faed3d2 --- /dev/null +++ b/neoforge/src/main/java/dev/newty/projectileding/neoforge/ProjectileDingNeoForge.java @@ -0,0 +1,13 @@ +package dev.newty.projectileding.neoforge; + +import net.neoforged.fml.common.Mod; + +import dev.newty.projectileding.ProjectileDing; + +@Mod(ProjectileDing.MOD_ID) +public final class ProjectileDingNeoForge { + public ProjectileDingNeoForge() { + // Run our common setup. + ProjectileDing.init(); + } +} diff --git a/neoforge/src/main/resources/META-INF/neoforge.mods.toml b/neoforge/src/main/resources/META-INF/neoforge.mods.toml new file mode 100644 index 0000000..9103110 --- /dev/null +++ b/neoforge/src/main/resources/META-INF/neoforge.mods.toml @@ -0,0 +1,38 @@ +modLoader = "javafml" +loaderVersion = "[4,)" +#issueTrackerURL = "" +license = "OQL" + +[[mods]] +modId = "projectileding" +version = "${version}" +displayName = "ProjectileDing" +authors = "Me!" +description = ''' +This is an example description! Tell everyone what your mod is about! +''' +#logoFile = "" + +[[dependencies.projectileding]] +modId = "neoforge" +type = "required" +versionRange = "[21.0,)" +ordering = "NONE" +side = "BOTH" + +[[dependencies.projectileding]] +modId = "minecraft" +type = "required" +versionRange = "[1.21,)" +ordering = "NONE" +side = "BOTH" + +[[dependencies.projectileding]] +modId = "architectury" +type = "required" +versionRange = "[13.0.2,)" +ordering = "AFTER" +side = "BOTH" + +[[mixins]] +config = "projectileding.mixins.json" diff --git a/quilt/build.gradle b/quilt/build.gradle new file mode 100644 index 0000000..345c0ca --- /dev/null +++ b/quilt/build.gradle @@ -0,0 +1,66 @@ +plugins { + id 'com.github.johnrengelman.shadow' +} + +repositories { + maven { url 'https://maven.quiltmc.org/repository/release/' } +} + +architectury { + platformSetupLoomIde() + loader('quilt') +} + +configurations { + common { + canBeResolved = true + canBeConsumed = false + } + compileClasspath.extendsFrom common + runtimeClasspath.extendsFrom common + developmentQuilt.extendsFrom common + + // Files in this configuration will be bundled into your mod using the Shadow plugin. + // Don't use the `shadow` configuration from the plugin itself as it's meant for excluding files. + shadowBundle { + canBeResolved = true + canBeConsumed = false + } +} + +dependencies { + modImplementation "org.quiltmc:quilt-loader:$rootProject.quilt_loader_version" + + // Quilt Standard Libraries and QSL. + modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:$rootProject.quilted_fabric_api_version" + + // Architectury API. This is optional, and you can comment it out if you don't need it. + modImplementation("dev.architectury:architectury-fabric:$rootProject.architectury_api_version") { + // We must not pull Fabric Loader and Fabric API from Architectury Fabric. + exclude group: 'net.fabricmc' + exclude group: 'net.fabricmc.fabric-api' + } + + common(project(path: ':common', configuration: 'namedElements')) { transitive false } + shadowBundle project(path: ':common', configuration: 'transformProductionQuilt') + common(project(path: ':fabric-like', configuration: 'namedElements')) { transitive false } + shadowBundle project(path: ':fabric-like', configuration: 'transformProductionQuilt') +} + +processResources { + inputs.property 'group', project.group + inputs.property 'version', project.version + + filesMatching('quilt.mod.json') { + expand group: project.group, version: project.version + } +} + +shadowJar { + configurations = [project.configurations.shadowBundle] + archiveClassifier = 'dev-shadow' +} + +remapJar { + input.set shadowJar.archiveFile +} diff --git a/quilt/gradle.properties b/quilt/gradle.properties new file mode 100644 index 0000000..56fe802 --- /dev/null +++ b/quilt/gradle.properties @@ -0,0 +1 @@ +loom.platform = quilt diff --git a/quilt/src/main/java/dev/newty/projectileding/quilt/ProjectileDingQuilt.java b/quilt/src/main/java/dev/newty/projectileding/quilt/ProjectileDingQuilt.java new file mode 100644 index 0000000..8c445fa --- /dev/null +++ b/quilt/src/main/java/dev/newty/projectileding/quilt/ProjectileDingQuilt.java @@ -0,0 +1,14 @@ +package dev.newty.projectileding.quilt; + +import org.quiltmc.loader.api.ModContainer; +import org.quiltmc.qsl.base.api.entrypoint.ModInitializer; + +import dev.newty.projectileding.fabriclike.ProjectileDingFabricLike; + +public final class ProjectileDingQuilt implements ModInitializer { + @Override + public void onInitialize(ModContainer mod) { + // Run the Fabric-like setup. + ProjectileDingFabricLike.init(); + } +} diff --git a/quilt/src/main/resources/quilt.mod.json b/quilt/src/main/resources/quilt.mod.json new file mode 100644 index 0000000..5d3fb53 --- /dev/null +++ b/quilt/src/main/resources/quilt.mod.json @@ -0,0 +1,43 @@ +{ + "schema_version": 1, + "quilt_loader": { + "group": "${group}", + "id": "projectileding", + "version": "${version}", + "metadata": { + "name": "ProjectileDing", + "description": "This is an example description! Tell everyone what your mod is about!", + "contributors": { + "Me!": "Author" + }, + "icon": "assets/projectileding/icon.png" + }, + "intermediate_mappings": "net.fabricmc:intermediary", + "entrypoints": { + "init": [ + "dev.newty.quilt.ExampleModQuilt" + ] + }, + "depends": [ + { + "id": "quilt_loader", + "version": "*" + }, + { + "id": "quilt_base", + "version": "*" + }, + { + "id": "minecraft", + "version": ">=1.21" + }, + { + "id": "architectury", + "version": ">=13.0.2" + } + ] + }, + "mixin": [ + "projectileding.mixins.json" + ] +} diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..2081b16 --- /dev/null +++ b/readme.md @@ -0,0 +1,5 @@ +
+

DrinkableXP

+
+ +This project is licensed with the Opinionated Queer License v1.2 - you can view it here. \ No newline at end of file diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..df05047 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,16 @@ +pluginManagement { + repositories { + maven { url "https://maven.fabricmc.net/" } + maven { url "https://maven.architectury.dev/" } + maven { url "https://files.minecraftforge.net/maven/" } + gradlePluginPortal() + } +} + +rootProject.name = 'projectileding' + +include 'common' +include 'fabric' +include 'fabric-like' +include 'neoforge' +include 'quilt'