Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes for 1.17 #69

Open
wants to merge 28 commits into
base: 1.16-fabric
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
3c06f93
Updated build env
quiqueck Jun 17, 2021
77f535c
Updated Mappings
quiqueck Jun 17, 2021
7fce862
NBT-Related renaming
quiqueck Jun 17, 2021
458accf
`hasBlockEntity` moved from `AbstractBlock` to `AbstractBlockState`
quiqueck Jun 17, 2021
cc96f09
Initial update for DeathChestState handling
quiqueck Jun 17, 2021
3c7871f
Using getter for `.abilities`
quiqueck Jun 17, 2021
7f3e749
accessing rotation data using getters
quiqueck Jun 17, 2021
c2327c2
Using getter for `.inventory`
quiqueck Jun 17, 2021
b2d0d01
Using new `Entity.RemovalReason`
quiqueck Jun 17, 2021
00f0b5e
Replaced deprecated ModMenu-API
quiqueck Jun 17, 2021
084fc8b
updated minecraft version
quiqueck Jun 17, 2021
ee89e97
Autoconfig compile-time update
quiqueck Jun 18, 2021
fc30920
removed remapped files
quiqueck Jun 18, 2021
5a19a9c
removed old autoConfig from gradle
quiqueck Jun 18, 2021
4716350
there are multiple `dropStack`calls now calling a private version. Ho…
quiqueck Jun 18, 2021
f239d26
fixed read/writeNbt signtures
quiqueck Jun 18, 2021
6310670
ChunkRemoval works differently now. This needs to be fixed later!
quiqueck Jun 18, 2021
dd68107
viewCount is accessible through a static method
quiqueck Jun 18, 2021
557923f
Styleguide
quiqueck Jun 21, 2021
039cc9a
Use Jankson for config serialization (builtin TOML does not work)
quiqueck Jun 23, 2021
0286a74
fixed checkStyle issues
quiqueck Jun 23, 2021
d29bd37
write was read
quiqueck Jun 23, 2021
0952434
Consisten naming
quiqueck Jun 23, 2021
3f920ef
Try to detect chun-unloads in `onBlockEntityUnload`using the inventor…
quiqueck Jun 23, 2021
c60cece
Some debug logging
quiqueck Jun 23, 2021
8032ff5
CheckStyle fixes
quiqueck Jun 23, 2021
cdf2444
Removed unused variable
quiqueck Jun 23, 2021
3c74e83
Removed Debug Code
quiqueck Jul 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,27 @@ import com.modrinth.minotaur.TaskModrinthUpload

plugins {
id "java-library"
id "fabric-loom" version "0.5-SNAPSHOT"
id "fabric-loom" version "0.8-SNAPSHOT"
id "com.matthewprenger.cursegradle" version "1.4.0"
id "com.modrinth.minotaur" version "1.1.0"
id "com.modrinth.minotaur" version "1.2.1"
}

ext {
commonGradleBranch = "master"
minecraftVersion = "1.16.5"
yarnMappings = "1.16.5+build.1"
loaderVersion = "0.11.1"
fabricAPIVersion = "0.29.3+1.16"
modMenuVersion = "1.14.13+build.19"
clothConfigVersion = "4.8.3"
autoConfigVersion = "3.3.1"
autoConfigTOMLVersion = "autoconfig-3.x.x-fabric-SNAPSHOT"
minecraftVersion = "1.17"
yarnMappings = "1.17+build.10"
loaderVersion = "0.11.6"
fabricAPIVersion = "0.35.2+1.17"
modMenuVersion = "2.0.2"
clothConfigVersion = "5.0.34"
}

version = "2.0.6-fabric"
version = "2.1.0-fabric"
group = "com.therandomlabs.vanilladeathchest"
archivesBaseName = "vanilladeathchest"

apply from: "https://raw.githubusercontent.com/TheRandomLabs/Common-Gradle/${project.commonGradleBranch}/fabric.gradle"
//apply from: "https://raw.githubusercontent.com/TheRandomLabs/Common-Gradle/${project.commonGradleBranch}/fabric.gradle"
apply from: "fabric.gradle"

if (project.hasProperty("curseForgeAPIKey")) {
curseforge {
Expand All @@ -33,9 +32,11 @@ if (project.hasProperty("curseForgeAPIKey")) {
id = "393000"

addGameVersion "Fabric"
addGameVersion "Java 16"
addGameVersion "Java 10"
addGameVersion "Java 9"
addGameVersion "Java 8"
addGameVersion "1.17"
addGameVersion "1.16.5"
addGameVersion "1.16.4"
addGameVersion "1.16.3"
Expand Down Expand Up @@ -83,6 +84,7 @@ if (project.hasProperty("modrinthToken")) {
changelog = new File("changelog.md").getText()
uploadFile = remapJar
releaseType = "alpha"
addGameVersion("1.17")
addGameVersion("1.16.5")
addGameVersion("1.16.4")
addGameVersion("1.16.3")
Expand Down
139 changes: 139 additions & 0 deletions fabric.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
def branch = project.findProperty("commonGradleBranch") ?: "master"
def includeClothConfig = !project.hasProperty("includeClothConfig") || project.includeClothConfig
def testMod = project.findProperty("testMod")

ext {
useSpotBugs = false
testing = false
defaultCompileDependencies = false
includeLicense = false
buildSourcesJar = false
registerDefaultMavenPublication = false
}

apply from: "https://raw.githubusercontent.com/TheRandomLabs/Common-Gradle/$branch/build.gradle"

if (testMod) {
sourceSets {
testmod {
compileClasspath += main.compileClasspath
runtimeClasspath += main.runtimeClasspath
}
}
}

repositories {
if (project.hasProperty("clothConfigVersion")) {
maven { url "https://maven.shedaniel.me/" }
}

if (project.hasProperty("autoConfigVersion")) {
maven {
url "https://dl.bintray.com/shedaniel/autoconfig1u"
}
}

if (project.hasProperty("autoConfigTOMLVersion")) {
maven {
url "https://jitpack.io"
}
}

if (project.hasProperty("modMenuVersion")) {
maven {
url "https://maven.terraformersmc.com/releases/"
}
}
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraftVersion}"
mappings "net.fabricmc:yarn:${project.yarnMappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loaderVersion}"

if (project.hasProperty("fabricAPIVersion")) {
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabricAPIVersion}"
}

if (project.hasProperty("modMenuVersion")) {
modImplementation "com.terraformersmc:modmenu:${modMenuVersion}"
}

if (project.hasProperty("clothConfigVersion")) {
modApi("me.shedaniel.cloth:cloth-config-fabric:${project.clothConfigVersion}") {
exclude(group: "net.fabricmc.fabric-api")
}

if (includeClothConfig) {
include "me.shedaniel.cloth:cloth-config-fabric:${project.clothConfigVersion}"
}
}

if (project.hasProperty("autoConfigVersion")) {
modImplementation("me.sargunvohra.mcmods:autoconfig1u:${project.autoConfigVersion}") {
exclude(module: "fabric-api")
}

if (includeClothConfig) {
include "me.sargunvohra.mcmods:autoconfig1u:${project.autoConfigVersion}"
}
}

if (project.hasProperty("autoConfigTOMLVersion")) {

modImplementation "com.github.TheRandomLabs:AutoConfig-TOML:${project.autoConfigTOMLVersion}"
include "com.github.TheRandomLabs:AutoConfig-TOML:${project.autoConfigTOMLVersion}"
}

if (testMod) {
afterEvaluate {
testmodImplementation(sourceSets.main.output)
}
}
}

processResources {
inputs.property "version", project.version

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

java {
withSourcesJar()
}

jar {
from("LICENSE") {
rename {
"${it}_${project.archivesBaseName}"
}
}
}

if (testMod) {
runClient {
classpath(sourceSets.testmod.runtimeClasspath)
}

runServer {
classpath(sourceSets.testmod.runtimeClasspath)
}
}

publishing {
publications {
mavenJava(MavenPublication) {
artifact(remapJar) {
builtBy remapJar
}

artifact(sourcesJar) {
builtBy remapSourcesJar
}

artifact javadocJar
}
}
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
178 changes: 89 additions & 89 deletions gradlew.bat
Original file line number Diff line number Diff line change
@@ -1,89 +1,89 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="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

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem

@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar


@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="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

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega
Loading