diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 index 5162781..c345176 --- a/LICENSE +++ b/LICENSE @@ -1,14 +1,2 @@ -Copyright 2019 B0undarybreaker (Meredith Espinosa) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS - FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR - COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER - IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN - CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +Copyright (c) 2024 +All rights reserved. diff --git a/build.gradle b/build.gradle index f1aa739..bf5655a 100755 --- a/build.gradle +++ b/build.gradle @@ -1,64 +1,114 @@ -buildscript { - repositories { - maven { - name = "Fabric" - url = "https://maven.fabricmc.net/" - content { - includeGroup "net.fabricmc" - includeGroup "fabric-loom" +plugins { + id 'fabric-loom' version '1.5-SNAPSHOT' + id 'maven-publish' +} + +version = project.mod_version +group = project.maven_group + +base { + archivesName = project.archives_base_name +} + +sourceSets { + main { + resources { + srcDirs += { + 'src/generated' } } - mavenCentral() } - dependencies { - classpath "fabric-loom:fabric-loom.gradle.plugin:1.1.14" - } -} - -apply plugin: "fabric-loom" - -java.toolchain.languageVersion = JavaLanguageVersion.of(17) -java.withSourcesJar() -tasks.withType(JavaCompile) { - options.encoding = "UTF-8" - options.release = 17 -} - -repositories { - mavenCentral() - - maven { - url = "https://maven.terraformersmc.com/releases/" - content { - includeGroup "com.terraformersmc" - } - } -} - -dependencies { - minecraft "com.mojang:minecraft:1.20.1" - mappings "net.fabricmc:yarn:1.20.1+build.2" - modApi "net.fabricmc:fabric-loader:0.14.21" - modApi "net.fabricmc.fabric-api:fabric-api:0.83.1+1.20.1" - - implementation "com.google.code.findbugs:jsr305:3.0.2" - - //modRuntimeOnly "com.terraformersmc:modmenu:7.2.1" //REMAP FAILURES????? } loom { - mixin { - defaultRefmapName = "templates.refmap.json" //see templates.mixins.json. I just like to always specify the name + runs { + // This adds a new gradle task that runs the datagen API: "gradlew runDatagen" + datagen { + inherit server + name "Data Generation" + vmArg "-Dfabric-api.datagen" + vmArg "-Dfabric-api.datagen.output-dir=${file("src/generated")}" + vmArg "-Dfabric-api.datagen.modid=${mod_id}" + + runDir "build/datagen" + } } } +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 { + // To change the versions see the gradle.properties file + minecraft "com.mojang:minecraft:${project.minecraft_version}" + mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2" + modImplementation "net.fabricmc:fabric-loader:${project.loader_version}" + + // Fabric API. This is technically optional, but you probably want it anyway. + modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}" +} + processResources { inputs.property "version", project.version - filesMatching("**/fabric.mod.json") { - expand "version": project.version + inputs.property "minecraft_version", project.minecraft_version + inputs.property "loader_version", project.loader_version + filteringCharset "UTF-8" + + filesMatching("fabric.mod.json") { + expand "version": project.version, + "mod_id": mod_id, + "minecraft_version": project.minecraft_version, + "loader_version": project.loader_version } } -jar { - from "LICENSE" +def targetJavaVersion = 17 +tasks.withType(JavaCompile).configureEach { + // ensure that the encoding is set to UTF-8, no matter what the system default is + // this fixes some edge cases with special characters not displaying correctly + // see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html + // If Javadoc is generated, this must be specified in that task too. + it.options.encoding = "UTF-8" + if (targetJavaVersion >= 10 || JavaVersion.current().isJava10Compatible()) { + it.options.release.set(targetJavaVersion) + } +} + +java { + def javaVersion = JavaVersion.toVersion(targetJavaVersion) + if (JavaVersion.current() < javaVersion) { + toolchain.languageVersion = JavaLanguageVersion.of(targetJavaVersion) + } + // 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() +} + +jar { + from("LICENSE") { + rename { "${it}_${project.archivesBaseName}"} + } +} + +// configure the maven publication +publishing { + publications { + mavenJava(MavenPublication) { + 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/gradle.properties b/gradle.properties index 2a2f2f8..31f14bf 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,18 @@ -# dedodated wam -org.gradle.jvmargs=-Xmx6G +# Done to increase the memory available to gradle. +org.gradle.jvmargs=-Xmx1G -archivesBaseName=templates -group=io.github.cottonmc -version=2.2.0+1.20.1 \ No newline at end of file +# Fabric Properties +# check these on https://modmuss50.me/fabric.html +minecraft_version=1.20.4 +yarn_mappings=1.20.4+build.3 +loader_version=0.15.6 + +# Mod Properties +mod_version = 1.0-SNAPSHOT +maven_group = fr.adrien1106 +archives_base_name = ReFramedTemplates +mod_id = reframedtemplates + +# Dependencies +# check this on https://modmuss50.me/fabric.html +fabric_version=0.95.4+1.20.4 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100755 index 29953ea..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100755 index 774fae8..0000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew old mode 100755 new mode 100644 index cccdd3d..1aa94a4 --- a/gradlew +++ b/gradlew @@ -1,78 +1,127 @@ -#!/usr/bin/env sh +#!/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 UN*X -## +# +# 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 -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +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 -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# 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" +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 - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +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" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,92 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + 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" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# 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 - 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" ;; +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 -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") +# 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. -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# 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" ) -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" + 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 old mode 100755 new mode 100644 index f955316..93e3f59 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,4 +1,20 @@ -@if "%DEBUG%" == "" @echo off +@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 @@ -9,19 +25,23 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +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= +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%" == "0" goto init +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +55,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,38 +65,26 @@ echo location of your Java installation. 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 @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 %CMD_LINE_ARGS% +"%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%"=="0" goto mainEnd +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! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +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 diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 0000000..f8f7d33 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,9 @@ + pluginManagement { + repositories { + maven { + name = 'Fabric' + url = 'https://maven.fabricmc.net/' + } + gradlePluginPortal() + } +} diff --git a/src/main/java/io/github/cottonmc/templates/Templates.java b/src/main/java/fr/adrien1106/reframedtemplates/Templates.java similarity index 83% rename from src/main/java/io/github/cottonmc/templates/Templates.java rename to src/main/java/fr/adrien1106/reframedtemplates/Templates.java index 22de8f2..ed30ca2 100644 --- a/src/main/java/io/github/cottonmc/templates/Templates.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/Templates.java @@ -1,24 +1,24 @@ -package io.github.cottonmc.templates; +package fr.adrien1106.reframedtemplates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; -import io.github.cottonmc.templates.block.TemplateBlock; -import io.github.cottonmc.templates.block.TemplateButtonBlock; -import io.github.cottonmc.templates.block.TemplateCandleBlock; -import io.github.cottonmc.templates.block.TemplateCarpetBlock; -import io.github.cottonmc.templates.block.TemplateDoorBlock; -import io.github.cottonmc.templates.block.TemplateEntity; -import io.github.cottonmc.templates.block.TemplateFenceBlock; -import io.github.cottonmc.templates.block.TemplateFenceGateBlock; -import io.github.cottonmc.templates.block.TemplateLeverBlock; -import io.github.cottonmc.templates.block.TemplatePaneBlock; -import io.github.cottonmc.templates.block.TemplatePostBlock; -import io.github.cottonmc.templates.block.TemplatePressurePlateBlock; -import io.github.cottonmc.templates.block.TemplateSlabBlock; -import io.github.cottonmc.templates.block.TemplateSlopeBlock; -import io.github.cottonmc.templates.block.TemplateStairsBlock; -import io.github.cottonmc.templates.block.TemplateTrapdoorBlock; -import io.github.cottonmc.templates.block.TemplateVerticalSlabBlock; -import io.github.cottonmc.templates.block.TemplateWallBlock; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.block.TemplateBlock; +import fr.adrien1106.reframedtemplates.block.TemplateButtonBlock; +import fr.adrien1106.reframedtemplates.block.TemplateCandleBlock; +import fr.adrien1106.reframedtemplates.block.TemplateCarpetBlock; +import fr.adrien1106.reframedtemplates.block.TemplateDoorBlock; +import fr.adrien1106.reframedtemplates.block.TemplateEntity; +import fr.adrien1106.reframedtemplates.block.TemplateFenceBlock; +import fr.adrien1106.reframedtemplates.block.TemplateFenceGateBlock; +import fr.adrien1106.reframedtemplates.block.TemplateLeverBlock; +import fr.adrien1106.reframedtemplates.block.TemplatePaneBlock; +import fr.adrien1106.reframedtemplates.block.TemplatePostBlock; +import fr.adrien1106.reframedtemplates.block.TemplatePressurePlateBlock; +import fr.adrien1106.reframedtemplates.block.TemplateSlabBlock; +import fr.adrien1106.reframedtemplates.block.TemplateSlopeBlock; +import fr.adrien1106.reframedtemplates.block.TemplateStairsBlock; +import fr.adrien1106.reframedtemplates.block.TemplateTrapdoorBlock; +import fr.adrien1106.reframedtemplates.block.TemplateVerticalSlabBlock; +import fr.adrien1106.reframedtemplates.block.TemplateWallBlock; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.itemgroup.v1.FabricItemGroup; import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder; @@ -48,6 +48,9 @@ import java.util.List; import java.util.function.BiConsumer; import java.util.stream.Collectors; +/** + * TODO handle random textures, handle grass side, multiple camos + */ public class Templates implements ModInitializer { public static final String MODID = "templates"; diff --git a/src/main/java/io/github/cottonmc/templates/TemplatesClient.java b/src/main/java/fr/adrien1106/reframedtemplates/TemplatesClient.java similarity index 98% rename from src/main/java/io/github/cottonmc/templates/TemplatesClient.java rename to src/main/java/fr/adrien1106/reframedtemplates/TemplatesClient.java index 04d4d69..ffba230 100644 --- a/src/main/java/io/github/cottonmc/templates/TemplatesClient.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/TemplatesClient.java @@ -1,7 +1,7 @@ -package io.github.cottonmc.templates; +package fr.adrien1106.reframedtemplates; -import io.github.cottonmc.templates.api.TemplatesClientApi; -import io.github.cottonmc.templates.model.SlopeBaseMesh; +import fr.adrien1106.reframedtemplates.api.TemplatesClientApi; +import fr.adrien1106.reframedtemplates.model.SlopeBaseMesh; import net.fabricmc.api.ClientModInitializer; import net.fabricmc.fabric.api.blockrenderlayer.v1.BlockRenderLayerMap; import net.fabricmc.fabric.api.client.model.ModelLoadingRegistry; diff --git a/src/main/java/io/github/cottonmc/templates/TemplatesClientApiImpl.java b/src/main/java/fr/adrien1106/reframedtemplates/TemplatesClientApiImpl.java similarity index 87% rename from src/main/java/io/github/cottonmc/templates/TemplatesClientApiImpl.java rename to src/main/java/fr/adrien1106/reframedtemplates/TemplatesClientApiImpl.java index 6557a94..7ece4a4 100644 --- a/src/main/java/io/github/cottonmc/templates/TemplatesClientApiImpl.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/TemplatesClientApiImpl.java @@ -1,10 +1,10 @@ -package io.github.cottonmc.templates; +package fr.adrien1106.reframedtemplates; -import io.github.cottonmc.templates.api.TemplatesClientApi; -import io.github.cottonmc.templates.model.TemplateAppearanceManager; -import io.github.cottonmc.templates.model.UnbakedAutoRetexturedModel; -import io.github.cottonmc.templates.model.UnbakedJsonRetexturedModel; -import io.github.cottonmc.templates.model.UnbakedMeshRetexturedModel; +import fr.adrien1106.reframedtemplates.api.TemplatesClientApi; +import fr.adrien1106.reframedtemplates.model.TemplateAppearanceManager; +import fr.adrien1106.reframedtemplates.model.UnbakedAutoRetexturedModel; +import fr.adrien1106.reframedtemplates.model.UnbakedJsonRetexturedModel; +import fr.adrien1106.reframedtemplates.model.UnbakedMeshRetexturedModel; import net.fabricmc.fabric.api.renderer.v1.Renderer; import net.fabricmc.fabric.api.renderer.v1.RendererAccess; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; diff --git a/src/main/java/io/github/cottonmc/templates/TemplatesModelProvider.java b/src/main/java/fr/adrien1106/reframedtemplates/TemplatesModelProvider.java similarity index 97% rename from src/main/java/io/github/cottonmc/templates/TemplatesModelProvider.java rename to src/main/java/fr/adrien1106/reframedtemplates/TemplatesModelProvider.java index 3e46028..3f95577 100644 --- a/src/main/java/io/github/cottonmc/templates/TemplatesModelProvider.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/TemplatesModelProvider.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates; +package fr.adrien1106.reframedtemplates; -import io.github.cottonmc.templates.model.TemplateAppearanceManager; +import fr.adrien1106.reframedtemplates.model.TemplateAppearanceManager; import net.fabricmc.fabric.api.client.model.ModelProviderContext; import net.fabricmc.fabric.api.client.model.ModelResourceProvider; import net.fabricmc.fabric.api.client.model.ModelVariantProvider; diff --git a/src/main/java/io/github/cottonmc/templates/api/TemplateInteractionUtil.java b/src/main/java/fr/adrien1106/reframedtemplates/api/TemplateInteractionUtil.java similarity index 97% rename from src/main/java/io/github/cottonmc/templates/api/TemplateInteractionUtil.java rename to src/main/java/fr/adrien1106/reframedtemplates/api/TemplateInteractionUtil.java index 7866668..33bf60f 100644 --- a/src/main/java/io/github/cottonmc/templates/api/TemplateInteractionUtil.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/api/TemplateInteractionUtil.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.api; +package fr.adrien1106.reframedtemplates.api; -import io.github.cottonmc.templates.block.TemplateEntity; +import fr.adrien1106.reframedtemplates.block.TemplateEntity; import net.minecraft.block.AbstractBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; @@ -113,7 +113,7 @@ public class TemplateInteractionUtil { if(held.getItem() instanceof BlockItem bi && be.getThemeState().getBlock() == Blocks.AIR) { Block block = bi.getBlock(); ItemPlacementContext ctx = new ItemPlacementContext(new ItemUsageContext(player, hand, hit)); - BlockState placementState = block.getPlacementState(ctx); + BlockState placementState = block.getPlacementState(ctx); // TODO Smart if(placementState != null && Block.isShapeFullCube(placementState.getCollisionShape(world, pos)) && !(block instanceof BlockEntityProvider)) { if(!world.isClient) be.setRenderedState(placementState); diff --git a/src/main/java/io/github/cottonmc/templates/api/TemplateInteractionUtilExt.java b/src/main/java/fr/adrien1106/reframedtemplates/api/TemplateInteractionUtilExt.java similarity index 93% rename from src/main/java/io/github/cottonmc/templates/api/TemplateInteractionUtilExt.java rename to src/main/java/fr/adrien1106/reframedtemplates/api/TemplateInteractionUtilExt.java index b1d21e5..f2b5cca 100644 --- a/src/main/java/io/github/cottonmc/templates/api/TemplateInteractionUtilExt.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/api/TemplateInteractionUtilExt.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.api; +package fr.adrien1106.reframedtemplates.api; import net.minecraft.block.BlockState; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/io/github/cottonmc/templates/api/TemplatesClientApi.java b/src/main/java/fr/adrien1106/reframedtemplates/api/TemplatesClientApi.java similarity index 96% rename from src/main/java/io/github/cottonmc/templates/api/TemplatesClientApi.java rename to src/main/java/fr/adrien1106/reframedtemplates/api/TemplatesClientApi.java index cce64ee..3b92db7 100644 --- a/src/main/java/io/github/cottonmc/templates/api/TemplatesClientApi.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/api/TemplatesClientApi.java @@ -1,7 +1,7 @@ -package io.github.cottonmc.templates.api; +package fr.adrien1106.reframedtemplates.api; -import io.github.cottonmc.templates.TemplatesClient; -import io.github.cottonmc.templates.model.TemplateAppearanceManager; +import fr.adrien1106.reframedtemplates.model.TemplateAppearanceManager; +import fr.adrien1106.reframedtemplates.TemplatesClient; import net.fabricmc.fabric.api.renderer.v1.Renderer; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/api/ThemeableBlockEntity.java b/src/main/java/fr/adrien1106/reframedtemplates/api/ThemeableBlockEntity.java similarity index 86% rename from src/main/java/io/github/cottonmc/templates/api/ThemeableBlockEntity.java rename to src/main/java/fr/adrien1106/reframedtemplates/api/ThemeableBlockEntity.java index 3aa31b0..eb788d5 100644 --- a/src/main/java/io/github/cottonmc/templates/api/ThemeableBlockEntity.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/api/ThemeableBlockEntity.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.api; +package fr.adrien1106.reframedtemplates.api; import net.fabricmc.fabric.api.rendering.data.v1.RenderAttachmentBlockEntity; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateBlock.java index 9d1bb12..e0a9710 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateButtonBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateButtonBlock.java similarity index 92% rename from src/main/java/io/github/cottonmc/templates/block/TemplateButtonBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateButtonBlock.java index 72cb5a1..b5aaef1 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateButtonBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateButtonBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockSetType; @@ -27,11 +27,11 @@ import org.jetbrains.annotations.Nullable; public class TemplateButtonBlock extends ButtonBlock implements BlockEntityProvider { public TemplateButtonBlock(Settings settings) { - this(settings, BlockSetType.OAK, 30, true); + this(settings, BlockSetType.OAK, 30); } - public TemplateButtonBlock(Settings settings, BlockSetType blockSetType, int i, boolean bl) { - super(settings, blockSetType, i, bl); + public TemplateButtonBlock(Settings settings, BlockSetType blockSetType, int i) { + super(blockSetType, i, settings); setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState())); } diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateCandleBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateCandleBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateCandleBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateCandleBlock.java index 4bc9318..830d43f 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateCandleBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateCandleBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.AbstractBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateCarpetBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateCarpetBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateCarpetBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateCarpetBlock.java index 4d36fa6..c2d13d7 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateCarpetBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateCarpetBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateDoorBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateDoorBlock.java similarity index 94% rename from src/main/java/io/github/cottonmc/templates/block/TemplateDoorBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateDoorBlock.java index 953f85c..5a50641 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateDoorBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateDoorBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockSetType; @@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable; public class TemplateDoorBlock extends DoorBlock implements BlockEntityProvider { public TemplateDoorBlock(Settings settings, BlockSetType blockSetType) { - super(settings, blockSetType); + super(blockSetType, settings); setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState())); } diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateEntity.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateEntity.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateEntity.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateEntity.java index ec7f420..3d9fe5e 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateEntity.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateEntity.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; -import io.github.cottonmc.templates.api.ThemeableBlockEntity; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.api.ThemeableBlockEntity; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; import net.minecraft.block.entity.BlockEntity; @@ -18,9 +18,9 @@ import net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket; import net.minecraft.registry.Registries; import net.minecraft.server.world.ServerWorld; import net.minecraft.util.math.BlockPos; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; import java.util.Objects; //Keeping the weight of this block entity down, both in terms of memory consumption and NBT sync traffic, @@ -80,7 +80,7 @@ public class TemplateEntity extends BlockEntity implements ThemeableBlockEntity if(bitfield != DEFAULT_BITFIELD) tag.putByte(BITFIELD_KEY, bitfield); } - public static @Nonnull BlockState readStateFromItem(ItemStack stack) { + public static @NotNull BlockState readStateFromItem(ItemStack stack) { NbtCompound blockEntityTag = BlockItem.getBlockEntityNbt(stack); if(blockEntityTag == null) return Blocks.AIR.getDefaultState(); diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateFenceBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateFenceBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateFenceBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateFenceBlock.java index b86df28..7080e49 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateFenceBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateFenceBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateFenceGateBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateFenceGateBlock.java similarity index 92% rename from src/main/java/io/github/cottonmc/templates/block/TemplateFenceGateBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateFenceGateBlock.java index 5ed502a..e342bc5 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateFenceGateBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateFenceGateBlock.java @@ -1,9 +1,9 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; -import io.github.cottonmc.templates.api.TemplateInteractionUtilExt; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtilExt; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; @@ -28,7 +28,7 @@ import org.jetbrains.annotations.Nullable; public class TemplateFenceGateBlock extends FenceGateBlock implements BlockEntityProvider, TemplateInteractionUtilExt { public TemplateFenceGateBlock(Settings settings, WoodType woodType) { - super(settings, woodType); + super(woodType, settings); setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState())); } diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateLeverBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateLeverBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateLeverBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateLeverBlock.java index e417609..ce629ac 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateLeverBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateLeverBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplatePaneBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePaneBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplatePaneBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePaneBlock.java index b085185..9ea03ea 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplatePaneBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePaneBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplatePostBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePostBlock.java similarity index 94% rename from src/main/java/io/github/cottonmc/templates/block/TemplatePostBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePostBlock.java index d182ae9..1d092e1 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplatePostBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePostBlock.java @@ -1,7 +1,7 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.ShapeContext; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplatePressurePlateBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePressurePlateBlock.java similarity index 83% rename from src/main/java/io/github/cottonmc/templates/block/TemplatePressurePlateBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePressurePlateBlock.java index d789f69..347b46d 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplatePressurePlateBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplatePressurePlateBlock.java @@ -1,14 +1,9 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockEntityProvider; -import net.minecraft.block.BlockSetType; -import net.minecraft.block.BlockState; -import net.minecraft.block.PressurePlateBlock; -import net.minecraft.block.ShapeContext; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; +import net.minecraft.block.*; import net.minecraft.block.entity.BlockEntity; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.player.PlayerEntity; @@ -26,13 +21,13 @@ import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; public class TemplatePressurePlateBlock extends PressurePlateBlock implements BlockEntityProvider { - public TemplatePressurePlateBlock(ActivationRule activationRule, Settings settings, BlockSetType blockSetType) { - super(activationRule, settings, blockSetType); + public TemplatePressurePlateBlock(Settings settings, BlockSetType blockSetType) { + super(blockSetType, settings); setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState())); } public TemplatePressurePlateBlock(Settings settings) { - this(ActivationRule.EVERYTHING, settings, BlockSetType.OAK); + this(settings, BlockSetType.OAK); } @Override diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateSlabBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateSlabBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateSlabBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateSlabBlock.java index cecf35b..39571af 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateSlabBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateSlabBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateSlopeBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateSlopeBlock.java similarity index 88% rename from src/main/java/io/github/cottonmc/templates/block/TemplateSlopeBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateSlopeBlock.java index 0fee8b1..41c2401 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateSlopeBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateSlopeBlock.java @@ -1,9 +1,9 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; -import io.github.cottonmc.templates.util.Edge; -import io.github.cottonmc.templates.util.StairShapeMaker; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.util.Edge; +import fr.adrien1106.reframedtemplates.util.StairShapeMaker; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.ShapeContext; @@ -13,8 +13,7 @@ import net.minecraft.state.property.EnumProperty; import net.minecraft.util.math.BlockPos; import net.minecraft.util.shape.VoxelShape; import net.minecraft.world.BlockView; - -import javax.annotation.Nullable; +import org.jetbrains.annotations.Nullable; public class TemplateSlopeBlock extends WaterloggableTemplateBlock { public static final EnumProperty EDGE = EnumProperty.of("edge", Edge.class); diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateStairsBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateStairsBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateStairsBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateStairsBlock.java index b26310d..013e094 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateStairsBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateStairsBlock.java @@ -1,8 +1,8 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateTrapdoorBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateTrapdoorBlock.java similarity index 91% rename from src/main/java/io/github/cottonmc/templates/block/TemplateTrapdoorBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateTrapdoorBlock.java index a50b038..3809cd5 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateTrapdoorBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateTrapdoorBlock.java @@ -1,9 +1,9 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; -import io.github.cottonmc.templates.api.TemplateInteractionUtilExt; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtilExt; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockSetType; @@ -27,8 +27,8 @@ import net.minecraft.world.World; import org.jetbrains.annotations.Nullable; public class TemplateTrapdoorBlock extends TrapdoorBlock implements BlockEntityProvider, TemplateInteractionUtilExt { - public TemplateTrapdoorBlock(Settings settings, BlockSetType blah) { - super(settings, blah); + public TemplateTrapdoorBlock(Settings settings, BlockSetType woodType) { + super(woodType, settings); setDefaultState(TemplateInteractionUtil.setDefaultStates(getDefaultState())); } diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateVerticalSlabBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateVerticalSlabBlock.java similarity index 97% rename from src/main/java/io/github/cottonmc/templates/block/TemplateVerticalSlabBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateVerticalSlabBlock.java index 62149bd..3a5faac 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateVerticalSlabBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateVerticalSlabBlock.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.ShapeContext; diff --git a/src/main/java/io/github/cottonmc/templates/block/TemplateWallBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateWallBlock.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/block/TemplateWallBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/TemplateWallBlock.java index 0023014..c614a58 100644 --- a/src/main/java/io/github/cottonmc/templates/block/TemplateWallBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/TemplateWallBlock.java @@ -1,9 +1,9 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import com.google.common.base.MoreObjects; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplateInteractionUtil; -import io.github.cottonmc.templates.mixin.WallBlockAccessor; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplateInteractionUtil; +import fr.adrien1106.reframedtemplates.mixin.WallBlockAccessor; import net.minecraft.block.Block; import net.minecraft.block.BlockEntityProvider; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/block/WaterloggableTemplateBlock.java b/src/main/java/fr/adrien1106/reframedtemplates/block/WaterloggableTemplateBlock.java similarity index 97% rename from src/main/java/io/github/cottonmc/templates/block/WaterloggableTemplateBlock.java rename to src/main/java/fr/adrien1106/reframedtemplates/block/WaterloggableTemplateBlock.java index e03baba..7d20cb6 100644 --- a/src/main/java/io/github/cottonmc/templates/block/WaterloggableTemplateBlock.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/block/WaterloggableTemplateBlock.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.block; +package fr.adrien1106.reframedtemplates.block; import net.minecraft.block.Block; import net.minecraft.block.BlockState; diff --git a/src/main/java/io/github/cottonmc/templates/mixin/MinecraftAccessor.java b/src/main/java/fr/adrien1106/reframedtemplates/mixin/MinecraftAccessor.java similarity index 89% rename from src/main/java/io/github/cottonmc/templates/mixin/MinecraftAccessor.java rename to src/main/java/fr/adrien1106/reframedtemplates/mixin/MinecraftAccessor.java index 4a16a91..7720ad2 100644 --- a/src/main/java/io/github/cottonmc/templates/mixin/MinecraftAccessor.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/mixin/MinecraftAccessor.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.mixin; +package fr.adrien1106.reframedtemplates.mixin; import net.minecraft.client.MinecraftClient; import net.minecraft.client.color.item.ItemColors; diff --git a/src/main/java/io/github/cottonmc/templates/mixin/WallBlockAccessor.java b/src/main/java/fr/adrien1106/reframedtemplates/mixin/WallBlockAccessor.java similarity index 92% rename from src/main/java/io/github/cottonmc/templates/mixin/WallBlockAccessor.java rename to src/main/java/fr/adrien1106/reframedtemplates/mixin/WallBlockAccessor.java index 7368c1b..2f8ed36 100644 --- a/src/main/java/io/github/cottonmc/templates/mixin/WallBlockAccessor.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/mixin/WallBlockAccessor.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.mixin; +package fr.adrien1106.reframedtemplates.mixin; import net.minecraft.block.BlockState; import net.minecraft.block.WallBlock; diff --git a/src/main/java/io/github/cottonmc/templates/mixin/particles/AccessorParticle.java b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/AccessorParticle.java similarity index 89% rename from src/main/java/io/github/cottonmc/templates/mixin/particles/AccessorParticle.java rename to src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/AccessorParticle.java index 35a0ac1..9a25f25 100644 --- a/src/main/java/io/github/cottonmc/templates/mixin/particles/AccessorParticle.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/AccessorParticle.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.mixin.particles; +package fr.adrien1106.reframedtemplates.mixin.particles; import net.minecraft.client.particle.Particle; import net.minecraft.util.math.random.Random; diff --git a/src/main/java/io/github/cottonmc/templates/mixin/particles/AccessorSpriteBillboardParticle.java b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/AccessorSpriteBillboardParticle.java similarity index 86% rename from src/main/java/io/github/cottonmc/templates/mixin/particles/AccessorSpriteBillboardParticle.java rename to src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/AccessorSpriteBillboardParticle.java index 3060709..73c0ece 100644 --- a/src/main/java/io/github/cottonmc/templates/mixin/particles/AccessorSpriteBillboardParticle.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/AccessorSpriteBillboardParticle.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.mixin.particles; +package fr.adrien1106.reframedtemplates.mixin.particles; import net.minecraft.client.particle.SpriteBillboardParticle; import net.minecraft.client.texture.Sprite; diff --git a/src/main/java/io/github/cottonmc/templates/mixin/particles/MixinBlockDustParticle.java b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinBlockDustParticle.java similarity index 94% rename from src/main/java/io/github/cottonmc/templates/mixin/particles/MixinBlockDustParticle.java rename to src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinBlockDustParticle.java index cad758c..1799c7c 100644 --- a/src/main/java/io/github/cottonmc/templates/mixin/particles/MixinBlockDustParticle.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinBlockDustParticle.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.mixin.particles; +package fr.adrien1106.reframedtemplates.mixin.particles; -import io.github.cottonmc.templates.api.ThemeableBlockEntity; +import fr.adrien1106.reframedtemplates.api.ThemeableBlockEntity; import net.minecraft.block.BlockState; import net.minecraft.client.MinecraftClient; import net.minecraft.client.particle.BlockDustParticle; diff --git a/src/main/java/io/github/cottonmc/templates/mixin/particles/MixinEntity.java b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinEntity.java similarity index 89% rename from src/main/java/io/github/cottonmc/templates/mixin/particles/MixinEntity.java rename to src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinEntity.java index 4d9cd52..5b20f03 100644 --- a/src/main/java/io/github/cottonmc/templates/mixin/particles/MixinEntity.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinEntity.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.mixin.particles; +package fr.adrien1106.reframedtemplates.mixin.particles; -import io.github.cottonmc.templates.api.ThemeableBlockEntity; +import fr.adrien1106.reframedtemplates.api.ThemeableBlockEntity; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.util.math.BlockPos; diff --git a/src/main/java/io/github/cottonmc/templates/mixin/particles/MixinLivingEntity.java b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinLivingEntity.java similarity index 91% rename from src/main/java/io/github/cottonmc/templates/mixin/particles/MixinLivingEntity.java rename to src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinLivingEntity.java index 741044d..d6b0e9d 100644 --- a/src/main/java/io/github/cottonmc/templates/mixin/particles/MixinLivingEntity.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/mixin/particles/MixinLivingEntity.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.mixin.particles; +package fr.adrien1106.reframedtemplates.mixin.particles; -import io.github.cottonmc.templates.api.ThemeableBlockEntity; +import fr.adrien1106.reframedtemplates.api.ThemeableBlockEntity; import net.minecraft.block.BlockState; import net.minecraft.entity.Entity; import net.minecraft.entity.LivingEntity; diff --git a/src/main/java/io/github/cottonmc/templates/model/MeshTransformUtil.java b/src/main/java/fr/adrien1106/reframedtemplates/model/MeshTransformUtil.java similarity index 97% rename from src/main/java/io/github/cottonmc/templates/model/MeshTransformUtil.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/MeshTransformUtil.java index a431626..b512c92 100644 --- a/src/main/java/io/github/cottonmc/templates/model/MeshTransformUtil.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/MeshTransformUtil.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; -import io.github.cottonmc.templates.api.TemplatesClientApi; +import fr.adrien1106.reframedtemplates.api.TemplatesClientApi; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; import net.fabricmc.fabric.api.renderer.v1.mesh.MeshBuilder; import net.fabricmc.fabric.api.renderer.v1.mesh.QuadEmitter; diff --git a/src/main/java/io/github/cottonmc/templates/model/QuadUvBounds.java b/src/main/java/fr/adrien1106/reframedtemplates/model/QuadUvBounds.java similarity index 98% rename from src/main/java/io/github/cottonmc/templates/model/QuadUvBounds.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/QuadUvBounds.java index d6aaa40..6f0cd17 100644 --- a/src/main/java/io/github/cottonmc/templates/model/QuadUvBounds.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/QuadUvBounds.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.mesh.QuadView; diff --git a/src/main/java/io/github/cottonmc/templates/model/RetexturingBakedModel.java b/src/main/java/fr/adrien1106/reframedtemplates/model/RetexturingBakedModel.java similarity index 96% rename from src/main/java/io/github/cottonmc/templates/model/RetexturingBakedModel.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/RetexturingBakedModel.java index c0a7d8b..8855665 100644 --- a/src/main/java/io/github/cottonmc/templates/model/RetexturingBakedModel.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/RetexturingBakedModel.java @@ -1,7 +1,7 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; -import io.github.cottonmc.templates.block.TemplateEntity; -import io.github.cottonmc.templates.mixin.MinecraftAccessor; +import fr.adrien1106.reframedtemplates.block.TemplateEntity; +import fr.adrien1106.reframedtemplates.mixin.MinecraftAccessor; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; import net.fabricmc.fabric.api.renderer.v1.mesh.MutableQuadView; import net.fabricmc.fabric.api.renderer.v1.model.ForwardingBakedModel; @@ -26,7 +26,7 @@ import java.util.function.Supplier; public abstract class RetexturingBakedModel extends ForwardingBakedModel { public RetexturingBakedModel(BakedModel baseModel, TemplateAppearanceManager tam, ModelBakeSettings settings, BlockState itemModelState, boolean ao) { - this.wrapped = baseModel; //field from the superclass; vanilla getQuads etc will delegate through to this + this.wrapped = baseModel; //field from the superclass; vanilla getQuads etc. will delegate through to this this.tam = tam; this.facePermutation = MeshTransformUtil.facePermutation(settings); diff --git a/src/main/java/io/github/cottonmc/templates/model/SlopeBaseMesh.java b/src/main/java/fr/adrien1106/reframedtemplates/model/SlopeBaseMesh.java similarity index 97% rename from src/main/java/io/github/cottonmc/templates/model/SlopeBaseMesh.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/SlopeBaseMesh.java index 330841d..6cf92bb 100644 --- a/src/main/java/io/github/cottonmc/templates/model/SlopeBaseMesh.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/SlopeBaseMesh.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; -import io.github.cottonmc.templates.api.TemplatesClientApi; +import fr.adrien1106.reframedtemplates.api.TemplatesClientApi; import net.fabricmc.fabric.api.renderer.v1.Renderer; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; import net.fabricmc.fabric.api.renderer.v1.mesh.MeshBuilder; diff --git a/src/main/java/io/github/cottonmc/templates/model/TemplateAppearance.java b/src/main/java/fr/adrien1106/reframedtemplates/model/TemplateAppearance.java similarity index 94% rename from src/main/java/io/github/cottonmc/templates/model/TemplateAppearance.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/TemplateAppearance.java index 70550cc..714628b 100644 --- a/src/main/java/io/github/cottonmc/templates/model/TemplateAppearance.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/TemplateAppearance.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; import net.fabricmc.fabric.api.renderer.v1.material.RenderMaterial; import net.minecraft.client.texture.Sprite; diff --git a/src/main/java/io/github/cottonmc/templates/model/TemplateAppearanceManager.java b/src/main/java/fr/adrien1106/reframedtemplates/model/TemplateAppearanceManager.java similarity index 98% rename from src/main/java/io/github/cottonmc/templates/model/TemplateAppearanceManager.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/TemplateAppearanceManager.java index 4a07776..ea80ee5 100644 --- a/src/main/java/io/github/cottonmc/templates/model/TemplateAppearanceManager.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/TemplateAppearanceManager.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; -import io.github.cottonmc.templates.api.TemplatesClientApi; +import fr.adrien1106.reframedtemplates.api.TemplatesClientApi; import net.fabricmc.fabric.api.renderer.v1.Renderer; import net.fabricmc.fabric.api.renderer.v1.material.BlendMode; import net.fabricmc.fabric.api.renderer.v1.material.MaterialFinder; diff --git a/src/main/java/io/github/cottonmc/templates/model/UnbakedAutoRetexturedModel.java b/src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedAutoRetexturedModel.java similarity index 97% rename from src/main/java/io/github/cottonmc/templates/model/UnbakedAutoRetexturedModel.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedAutoRetexturedModel.java index 682902b..f8296b9 100644 --- a/src/main/java/io/github/cottonmc/templates/model/UnbakedAutoRetexturedModel.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedAutoRetexturedModel.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; -import io.github.cottonmc.templates.api.TemplatesClientApi; +import fr.adrien1106.reframedtemplates.api.TemplatesClientApi; import net.fabricmc.fabric.api.renderer.v1.Renderer; import net.fabricmc.fabric.api.renderer.v1.material.RenderMaterial; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; diff --git a/src/main/java/io/github/cottonmc/templates/model/UnbakedJsonRetexturedModel.java b/src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedJsonRetexturedModel.java similarity index 96% rename from src/main/java/io/github/cottonmc/templates/model/UnbakedJsonRetexturedModel.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedJsonRetexturedModel.java index 8d9e6b2..03a1eef 100644 --- a/src/main/java/io/github/cottonmc/templates/model/UnbakedJsonRetexturedModel.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedJsonRetexturedModel.java @@ -1,7 +1,7 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; -import io.github.cottonmc.templates.Templates; -import io.github.cottonmc.templates.api.TemplatesClientApi; +import fr.adrien1106.reframedtemplates.Templates; +import fr.adrien1106.reframedtemplates.api.TemplatesClientApi; import net.fabricmc.fabric.api.renderer.v1.Renderer; import net.fabricmc.fabric.api.renderer.v1.material.RenderMaterial; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; diff --git a/src/main/java/io/github/cottonmc/templates/model/UnbakedMeshRetexturedModel.java b/src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedMeshRetexturedModel.java similarity index 95% rename from src/main/java/io/github/cottonmc/templates/model/UnbakedMeshRetexturedModel.java rename to src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedMeshRetexturedModel.java index 02f5fd7..8c033e7 100644 --- a/src/main/java/io/github/cottonmc/templates/model/UnbakedMeshRetexturedModel.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/model/UnbakedMeshRetexturedModel.java @@ -1,6 +1,6 @@ -package io.github.cottonmc.templates.model; +package fr.adrien1106.reframedtemplates.model; -import io.github.cottonmc.templates.api.TemplatesClientApi; +import fr.adrien1106.reframedtemplates.api.TemplatesClientApi; import net.fabricmc.fabric.api.renderer.v1.mesh.Mesh; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; diff --git a/src/main/java/io/github/cottonmc/templates/util/Edge.java b/src/main/java/fr/adrien1106/reframedtemplates/util/Edge.java similarity index 98% rename from src/main/java/io/github/cottonmc/templates/util/Edge.java rename to src/main/java/fr/adrien1106/reframedtemplates/util/Edge.java index 674b630..071cea8 100644 --- a/src/main/java/io/github/cottonmc/templates/util/Edge.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/util/Edge.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.util; +package fr.adrien1106.reframedtemplates.util; import net.minecraft.item.ItemPlacementContext; import net.minecraft.util.StringIdentifiable; diff --git a/src/main/java/io/github/cottonmc/templates/util/StairShapeMaker.java b/src/main/java/fr/adrien1106/reframedtemplates/util/StairShapeMaker.java similarity index 96% rename from src/main/java/io/github/cottonmc/templates/util/StairShapeMaker.java rename to src/main/java/fr/adrien1106/reframedtemplates/util/StairShapeMaker.java index e6d6669..1d4009d 100644 --- a/src/main/java/io/github/cottonmc/templates/util/StairShapeMaker.java +++ b/src/main/java/fr/adrien1106/reframedtemplates/util/StairShapeMaker.java @@ -1,4 +1,4 @@ -package io.github.cottonmc.templates.util; +package fr.adrien1106.reframedtemplates.util; import net.minecraft.util.shape.VoxelShape; import net.minecraft.util.shape.VoxelShapes; diff --git a/src/main/resources/assets/framed-templates-icon.png b/src/main/resources/assets/framed-templates-icon.png new file mode 100644 index 0000000..207907b Binary files /dev/null and b/src/main/resources/assets/framed-templates-icon.png differ diff --git a/src/main/resources/assets/templates/textures/block/framed_accent_block.png b/src/main/resources/assets/templates/textures/block/framed_accent_block.png new file mode 100644 index 0000000..b9ae752 Binary files /dev/null and b/src/main/resources/assets/templates/textures/block/framed_accent_block.png differ diff --git a/src/main/resources/assets/templates/textures/block/framed_block.png b/src/main/resources/assets/templates/textures/block/framed_block.png new file mode 100644 index 0000000..e5f41f7 Binary files /dev/null and b/src/main/resources/assets/templates/textures/block/framed_block.png differ diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index b5d3c20..0ea0977 100755 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -1,37 +1,30 @@ { "schemaVersion": 1, - "id": "templates", - "version": "$version", - "name": "Templates 2", + "id": "${mod_id}", + "version": "${version}", + "name": "ReFramedBlocks", "description": "An API for templated blocks", "authors": [ - "quaternary", - "LemmaEOF", - "Grondag", - "mevvern" + "Adrien1106" ], - "contact": { - "homepage": "https://highlysuspect.agency/", - "sources": "https://github.com/quat1024/templates-mod", - "issues": "https://github.com/quat1024/templates-mod/issues" - }, - "license": "MIT", - "icon": "templates-icon.png", + "contact": {}, + "license": "All-Rights-Reserved", + "icon": "assets/framed-templates-icon.png", "environment": "*", "entrypoints": { "main": [ - "io.github.cottonmc.templates.Templates" + "fr.adrien1106.reframedtemplates.Templates" ], "client": [ - "io.github.cottonmc.templates.TemplatesClient" + "fr.adrien1106.reframedtemplates.TemplatesClient" ] }, "mixins": [ "templates.mixins.json" ], "depends": { - "minecraft": ">=1.20.1", - "fabricloader": "*", + "minecraft": ">=${minecraft_version}", + "fabricloader": "${loader_version}", "fabric-api": "*" } } \ No newline at end of file diff --git a/src/main/resources/templates-icon.png b/src/main/resources/templates-icon.png deleted file mode 100644 index 82a03b3..0000000 Binary files a/src/main/resources/templates-icon.png and /dev/null differ diff --git a/src/main/resources/templates.mixins.json b/src/main/resources/templates.mixins.json index 850b920..a7cd907 100644 --- a/src/main/resources/templates.mixins.json +++ b/src/main/resources/templates.mixins.json @@ -1,17 +1,17 @@ { "required": true, - "package": "io.github.cottonmc.templates.mixin", + "package": "fr.adrien1106.reframedtemplates.mixin", "compatibilityLevel": "JAVA_17", "mixins": [ - "MinecraftAccessor", - "WallBlockAccessor", - "particles.MixinEntity", - "particles.MixinLivingEntity" + "MinecraftAccessor", + "WallBlockAccessor", + "particles.MixinEntity", + "particles.MixinLivingEntity" ], "client": [ - "particles.AccessorParticle", - "particles.AccessorSpriteBillboardParticle", - "particles.MixinBlockDustParticle" + "particles.AccessorParticle", + "particles.AccessorSpriteBillboardParticle", + "particles.MixinBlockDustParticle" ], "injectors": { "defaultRequire": 1 diff --git a/unused/BbModelepic.java b/unused/BbModelepic.java deleted file mode 100644 index a8498a9..0000000 --- a/unused/BbModelepic.java +++ /dev/null @@ -1,67 +0,0 @@ -package io.github.cottonmc.templates.util; - -import com.google.gson.Gson; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; - -//i probalby shouldnt ship this in the mod lol -public class BbModelepic { - static class Model { - List elements; - } - - static class Elem { - Map> vertices; - Map faces; - } - - static class Face { - Map> uv; - List vertices; - } - - public static void main(String[] args) { - Model m = new Gson().fromJson(model, Model.class); - - Map> verts = m.elements.get(0).vertices; - List faces = m.elements.get(0).faces.values().stream().toList(); - - List classifications = List.of("TAG_LEFT", "TAG_RIGHT", "TAG_BOTTOM", "TAG_BACK", "TAG_SLOPE"); - Iterator asd = classifications.iterator(); - - for(Face face : faces) { - System.out.printf(".tag(%s)%n", asd.next()); - - for(int i = 0; i < 4; i++) { - String vertId = face.vertices.get(permute(i)); - List coords = verts.get(vertId); - System.out.printf(".pos(%s, %sf, %sf, %sf)", i, p(coords.get(0)/16f), p(coords.get(1)/16f), p(coords.get(2)/16f)); - - List uv = face.uv.get(vertId); - System.out.printf(".uv(%s, %sf, %sf)%n", i, p(uv.get(0)/16f), p(uv.get(1)/16f)); - } - - System.out.println(".color(-1, -1, -1, -1)\n.emit()"); - } - System.out.println(';'); - } - - //i don't like "16.0f" i'd rather "16f" - private static String p(float f) { - if(f == (long) f) return Long.toString((long) f); - else return Float.toString(f); - } - - private static int permute(int i) { - if(i == 0) return 2; - if(i == 1) return 0; - if(i == 2) return 1; - if(i == 3) return 3; - throw new IllegalArgumentException(); - } - - private static final String model = """ -{"meta":{"format_version":"4.5","model_format":"free","box_uv":false},"name":"","model_identifier":"","visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"timeline_setups":[],"unhandled_root_fields":{},"resolution":{"width":16,"height":16},"elements":[{"name":"cuboid","color":4,"origin":[-8,0,-8],"rotation":[0,0,0],"visibility":true,"locked":false,"vertices":{"Iy48":[16,8,16],"dg4s":[16,4,12],"ezd5":[16,0,16],"txzT":[16,0,8],"ZcIz":[0,8,16],"tgTW":[0,0,16],"Q2eV":[0,0,8],"8xsY":[0,4,12]},"faces":{"JSoJzuHO":{"uv":{"Iy48":[0,8],"ezd5":[0,16],"dg4s":[4,12],"txzT":[8,16]},"vertices":["Iy48","ezd5","dg4s","txzT"]},"0I6IF0zk":{"uv":{"ZcIz":[16,8],"tgTW":[16,16],"Q2eV":[8,16],"8xsY":[12,12]},"vertices":["ZcIz","8xsY","tgTW","Q2eV"]},"d7iH7DqS":{"uv":{"ezd5":[16,0],"tgTW":[0,0],"txzT":[16,8],"Q2eV":[0,8]},"vertices":["ezd5","tgTW","txzT","Q2eV"]},"OQ809wKZ":{"uv":{"Iy48":[16,8],"ZcIz":[0,8],"ezd5":[16,16],"tgTW":[0,16]},"vertices":["Iy48","ZcIz","ezd5","tgTW"]},"TSyHMrco":{"uv":{"txzT":[0,16],"Q2eV":[16,16],"Iy48":[0,8],"ZcIz":[16,8]},"vertices":["txzT","Q2eV","Iy48","ZcIz"]}},"type":"mesh","uuid":"3152a30a-ea8e-4ceb-57eb-58319c89815a"}],"outliner":["3152a30a-ea8e-4ceb-57eb-58319c89815a"],"textures":[]}"""; -} diff --git a/unused/TattletaleRandom.java b/unused/TattletaleRandom.java deleted file mode 100644 index c2717b2..0000000 --- a/unused/TattletaleRandom.java +++ /dev/null @@ -1,83 +0,0 @@ -package io.github.cottonmc.templates.util; - -import net.minecraft.util.math.random.Random; -import net.minecraft.util.math.random.RandomSplitter; - -public class TattletaleRandom implements Random { - public TattletaleRandom(Random delegate) { - this.delegate = delegate; - } - - private final Random delegate; - public boolean wasUsed = false; - - public Random split() { - wasUsed = true; - return delegate.split(); - } - - public RandomSplitter nextSplitter() { - wasUsed = true; - return delegate.nextSplitter(); - } - - public void setSeed(long l) { - wasUsed = true; - delegate.setSeed(l); - } - - public int nextInt() { - wasUsed = true; - return delegate.nextInt(); - } - - public int nextInt(int i) { - wasUsed = true; - return delegate.nextInt(i); - } - - public int nextBetween(int i, int j) { - wasUsed = true; - return delegate.nextBetween(i, j); - } - - public long nextLong() { - wasUsed = true; - return delegate.nextLong(); - } - - public boolean nextBoolean() { - wasUsed = true; - return delegate.nextBoolean(); - } - - public float nextFloat() { - wasUsed = true; - return delegate.nextFloat(); - } - - public double nextDouble() { - wasUsed = true; - return delegate.nextDouble(); - } - - public double nextGaussian() { - wasUsed = true; - return delegate.nextGaussian(); - } - - public double nextTriangular(double d, double e) { - wasUsed = true; - return delegate.nextTriangular(d, e); - } - - public void skip(int i) { - wasUsed = true; - delegate.skip(i); - } - - public int nextBetweenExclusive(int i, int j) { - wasUsed = true; - return delegate.nextBetweenExclusive(i, j); - } -}