Working Base

This commit is contained in:
nelle 2024-03-09 21:46:24 -07:00
parent 1f5222b22b
commit 397085cba4
17 changed files with 200 additions and 188 deletions

View file

@ -7,12 +7,15 @@ insert_final_newline = true
tab_width = 4 tab_width = 4
trim_trailing_whitespace = true trim_trailing_whitespace = true
[*.gradle] [*.gradle.kts]
indent_style = tab indent_style = tab
[*.java] [*.java]
indent_style = tab indent_style = tab
[*.kt]
indent_size = tab
[*.json] [*.json]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2

30
.gitattributes vendored Normal file
View file

@ -0,0 +1,30 @@
*.java text eol=lf diff=java
*.gradle text eol=lf diff=java
*.kt text eol=lf diff=kotlin
*.kts text eol=lf diff=kotlin
gradlew text eol=lf
*.bat text eol=crlf
*.md text eol=lf diff=markdown
.editorconfig text eol=lf
*.json text eol=lf
*.json5 text eol=lf
*.properties text eol=lf
*.toml text eol=lf
*.xml text eol=lf diff=html
# Modding specific
*.accesswidener text eol=lf
# These files are binary and should be left untouched
# (binary is a macro for -text -diff)
*.class binary
*.dll binary
*.ear binary
*.jar binary
*.jks binary
*.png binary
*.so binary
*.war binary

12
.gitignore vendored
View file

@ -5,8 +5,8 @@ out/
classes/ classes/
# Quilt Loom # Quilt Loom
remappedSrc/
run/ run/
!saves
# Eclipse # Eclipse
*.launch *.launch
@ -17,6 +17,9 @@ run/
*.ipr *.ipr
*.iws *.iws
# Fleet
.fleet/
# Visual Studio Code # Visual Studio Code
.settings/ .settings/
.vscode/ .vscode/
@ -29,9 +32,6 @@ workspace/
# macOS # macOS
*.DS_Store *.DS_Store
obsidian/Stellarworks/.obsidian/
/obsidian/Stellarworks/ASSETS/WIP TEXTURES/
#obsidian stuff # Other
#minecraft obsidian/
obsidian/Stellarworks/ASSETS/VanillaDefault+1.20

View file

@ -1,10 +0,0 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"java.configuration.updateBuildConfiguration": "automatic"
}
}

View file

@ -22,7 +22,6 @@ repositories {
// Loom adds the essential maven repositories to download Minecraft and libraries from automatically. // Loom adds the essential maven repositories to download Minecraft and libraries from automatically.
// See https://docs.gradle.org/current/userguide/declaring_repositories.html // See https://docs.gradle.org/current/userguide/declaring_repositories.html
// for more information about repositories. // for more information about repositories.
} }
// All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>" // All the dependencies are declared at gradle/libs.version.toml and referenced with "libs.<id>"

View file

@ -1,23 +1,8 @@
# Gradle Properties org.gradle.jvmargs=-Xmx1G -XX:MaxMetaspaceSize=1G
org.gradle.jvmargs = -Xmx1G org.gradle.parallel=true
org.gradle.parallel = true kotlin.incremental=true
kotlin.code.style=official
modid=sine-termino
# Mod Properties
version = 0.1.0
maven_group = xyz.limepot
archives_base_name = stellarworks
projchangelog = Changelog!
# Modrinth Metadata
modrinth_slug= stellarworks
modrinth_id= 3WyZOm8r
modrinth_game_versions= 1.20-1.20.1
modrinth_mod_loaders= quilt
#ignore
# Dependencies are managed at gradle/libs.versions.toml
group=com.example
version=1.0.0
archives_base_name=quilt-kotlin-template-mod

19
gradlew vendored
View file

@ -55,7 +55,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@ -80,13 +80,10 @@ do
esac esac
done done
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # This is normally unused
# shellcheck disable=SC2034
APP_NAME="Gradle"
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# 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"'
# 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
@ -143,12 +140,16 @@ fi
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #( case $MAX_FD in #(
max*) max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
MAX_FD=$( ulimit -H -n ) || MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit" warn "Could not query maximum file descriptor limit"
esac esac
case $MAX_FD in #( case $MAX_FD in #(
'' | soft) :;; #( '' | soft) :;; #(
*) *)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
ulimit -n "$MAX_FD" || ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD" warn "Could not set maximum file descriptor limit to $MAX_FD"
esac esac
@ -193,6 +194,10 @@ if "$cygwin" || "$msys" ; then
done done
fi 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; # Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in # shell script including quotes and variable substitutions, so put them in

183
gradlew.bat vendored
View file

@ -1,91 +1,92 @@
@rem @rem
@rem Copyright 2015 the original author or authors. @rem Copyright 2015 the original author or authors.
@rem @rem
@rem Licensed under the Apache License, Version 2.0 (the "License"); @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 not use this file except in compliance with the License.
@rem You may obtain a copy of the License at @rem You may obtain a copy of the License at
@rem @rem
@rem https://www.apache.org/licenses/LICENSE-2.0 @rem https://www.apache.org/licenses/LICENSE-2.0
@rem @rem
@rem Unless required by applicable law or agreed to in writing, software @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 distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@rem @rem
@rem ########################################################################## @rem ##########################################################################
@rem Set local scope for the variables with windows NT shell @rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
set APP_BASE_NAME=%~n0 @rem This is normally unused
set APP_HOME=%DIRNAME% 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 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 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 @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 set JAVA_EXE=java.exe
if %ERRORLEVEL% equ 0 goto execute %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo.
echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo Please set the JAVA_HOME variable in your environment to match the echo.
echo location of your Java installation. echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=% :findJavaFromJavaHome
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo.
echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo Please set the JAVA_HOME variable in your environment to match the echo.
echo location of your Java installation. echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
goto fail
:execute
@rem Setup the command line :execute
@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
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* @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 :end
if %ERRORLEVEL% equ 0 goto mainEnd @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 :fail
rem the _cmd.exe /c_ return code! rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
set EXIT_CODE=%ERRORLEVEL% rem the _cmd.exe /c_ return code!
if %EXIT_CODE% equ 0 set EXIT_CODE=1 set EXIT_CODE=%ERRORLEVEL%
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% if %EXIT_CODE% equ 0 set EXIT_CODE=1
exit /b %EXIT_CODE% if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal :mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
:omega

View file

@ -14,3 +14,5 @@ pluginManagement {
mavenCentral() mavenCentral()
} }
} }
rootProject.name = "stellarworks"

View file

@ -1,39 +0,0 @@
package xyz.limepot.stellarworks;
import org.quiltmc.loader.api.ModContainer;
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xyz.limepot.stellarworks.block.ModBlocks;
import xyz.limepot.stellarworks.block.entity.ModBlockEntities;
import xyz.limepot.stellarworks.item.ModItemGroup;
import xyz.limepot.stellarworks.item.ModItems;
import xyz.limepot.stellarworks.world.ModFeatures;
@SuppressWarnings("ALL")
public class Stellarworks implements ModInitializer {
public static final String MOD_ID = "stellarworks";
// This logger is used to write text to the console and the log file.
// It is considered best practice to use your mod name as the logger's name.
// That way, it's clear which mod wrote info, warnings, and errors.
public static final Logger LOGGER = LoggerFactory.getLogger("Stellarworks");
@Override
public void onInitialize(ModContainer mod) {
//ModConfiguredFeatures MUST ALWAYS be called first
ModFeatures.registerFeatures();
//BIOME MODS - PLEASE LEAVE DIRECTLY AFTER FEATURE REGISTRY & IN THE MAIN CLASS (FOR NOW IDK HOW TO PUT IT IN IT'S OWN)
///BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, ALUMINIUM_ORE_PLACED_KEY);
///BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, TIN_ORE_PLACED_KEY);
////Basic Registries
ModItems.registerModItems();
ModBlocks.registerModBlocks();
ModBlockEntities.registerBlockEntities();
ModItemGroup.registerItemGroups();
LOGGER.debug(MOD_ID + ": Registered!");
LOGGER.warn("Sine Termino has initialized, See you in the stars!");
}
}

View file

@ -59,7 +59,7 @@ public class ModBlocks {
} }
public static void registerModBlocks() { public static void registerModBlocks() {
Stellarworks.LOGGER.debug("Registering Blocks..."); Stellarworks.INSTANCE.getLOGGER().debug("Registering Blocks...");
} }
} }

View file

@ -46,6 +46,6 @@ public class ModItemGroup {
}).build()); }).build());
public static void registerItemGroups() { public static void registerItemGroups() {
Stellarworks.LOGGER.debug("Registering Creative Tab Entries..."); Stellarworks.INSTANCE.getLOGGER().debug("Registering Creative Tab Entries...");
} }
} }

View file

@ -66,7 +66,7 @@ public class ModItems {
} }
public static void registerModItems() { public static void registerModItems() {
Stellarworks.LOGGER.debug("Registering Items...."); Stellarworks.INSTANCE.getLOGGER().debug("Registering Items....");
} }
} }

View file

@ -12,6 +12,6 @@ import xyz.limepot.stellarworks.Stellarworks;
public class TitleScreenMixin { public class TitleScreenMixin {
@Inject(method = "init", at = @At("TAIL")) @Inject(method = "init", at = @At("TAIL"))
public void onInit(CallbackInfo ci) { public void onInit(CallbackInfo ci) {
Stellarworks.LOGGER.debug("Minced in."); Stellarworks.INSTANCE.getLOGGER().debug("Minced in.");
} }
} }

View file

@ -13,7 +13,7 @@ public class ModFeatures {
public static final RegistryKey<PlacedFeature> TIN_ORE_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("stellarworks","tin_ore")); public static final RegistryKey<PlacedFeature> TIN_ORE_PLACED_KEY = RegistryKey.of(RegistryKeys.PLACED_FEATURE, new Identifier("stellarworks","tin_ore"));
public static void registerFeatures() { public static void registerFeatures() {
Stellarworks.LOGGER.debug("Registering Features..."); Stellarworks.INSTANCE.getLOGGER().debug("Registering Features...");
} }
} }

View file

@ -0,0 +1,29 @@
package xyz.limepot.stellarworks
import org.quiltmc.loader.api.ModContainer
import org.quiltmc.qsl.base.api.entrypoint.ModInitializer
import org.slf4j.Logger
import org.slf4j.LoggerFactory
import xyz.limepot.stellarworks.block.ModBlocks
import xyz.limepot.stellarworks.block.entity.ModBlockEntities
import xyz.limepot.stellarworks.item.ModItemGroup
import xyz.limepot.stellarworks.item.ModItems
import xyz.limepot.stellarworks.world.ModFeatures
object Stellarworks : ModInitializer {
const val MOD_ID: String = "stellarworks"
val LOGGER: Logger = LoggerFactory.getLogger("Stellarworks")
override fun onInitialize(mod: ModContainer) {
//ModConfiguredFeatures MUST ALWAYS be called first
ModFeatures.registerFeatures()
//BIOME MODS - PLEASE LEAVE DIRECTLY AFTER FEATURE REGISTRY & IN THE MAIN CLASS (FOR NOW IDK HOW TO PUT IT IN IT'S OWN)
///BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, ALUMINIUM_ORE_PLACED_KEY);
///BiomeModifications.addFeature(BiomeSelectors.foundInOverworld(), GenerationStep.Feature.UNDERGROUND_ORES, TIN_ORE_PLACED_KEY);
////Basic Registries
ModItems.registerModItems()
ModBlocks.registerModBlocks()
ModBlockEntities.registerBlockEntities()
ModItemGroup.registerItemGroups()
}
}

View file

@ -17,25 +17,32 @@
}, },
"icon": "assets/stellarworks/icon.png" "icon": "assets/stellarworks/icon.png"
}, },
"intermediate_mappings": "net.fabricmc:intermediary", "intermediate_mappings": "net.fabricmc:intermediary",
"entrypoints": { "entrypoints": {
"init": "xyz.limepot.stellarworks.Stellarworks", "init": {
"clientmod": "xyz.limepot.stellarworks.StellarworksClient" "adapter": "kotlin",
"value": "xyz.limepot.stellarworks.Stellarworks"
}
}, },
"depends": [ "depends": [
{ {
"id": "quilt_loader", "id": "quilt_loader",
"versions": ">=0.19.1" "versions": ">=0.23.1"
}, },
{ {
"id": "quilted_fabric_api", "id": "quilted_fabric_api",
"versions": ">=7.0.3" "versions": ">=7.5.0"
},
{
"id": "qkl",
"versions": ">=2.1.0"
}, },
{ {
"id": "minecraft", "id": "minecraft",
"versions": ">=1.20-" "versions": ">=1.20.1-"
} }
] ]
}, },
"mixin": "stellarworks.mixins.json" "mixin": "stellarworks.mixins.json"
} }