Skip to content

Commit

Permalink
Update to Minecraft 1.20.6
Browse files Browse the repository at this point in the history
  • Loading branch information
TheIllusiveC4 committed May 7, 2024
1 parent 94aba65 commit 6aa98ed
Show file tree
Hide file tree
Showing 37 changed files with 483 additions and 567 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/BUG-REPORT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ body:
label: Minecraft Version
description: What version of Minecraft are you running? (Unlisted versions are unsupported)
options:
- 1.20.6
- 1.20.4
- 1.20.1
- 1.19.2
- 1.18.2
validations:
required: true
- type: textarea
Expand Down
3 changes: 0 additions & 3 deletions .idea/scopes/Fabric_sources.xml

This file was deleted.

3 changes: 0 additions & 3 deletions .idea/scopes/Forge_sources.xml

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
Prior to version 3.1.0, this project used [Forge Recommended Versioning](https://mcforge.readthedocs.io/en/latest/conventions/versioning/).

## [6.0.0+1.20.6] - 2024.05.06
### Changed
- [API] Changed return of `CaelusApi#getFlightAttribute` to `Holder<Attribute>`
- Updated to Minecraft 1.20.6

## [5.1.0+1.20.4] - 2024.04.22
### Added
- Added `CaelusApi#canFallFly(LivingEntity)`
Expand Down
9 changes: 3 additions & 6 deletions CHANGELOG_LATEST.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@ Prior to version 3.1.0, this project used [Forge Recommended Versioning](https:/

This is a copy of the changelog for the most recent version. For the full version history, go [here](https://github.com/TheIllusiveC4/Caelus/blob/1.20.4/docs/CHANGELOG.md).

## [5.1.0+1.20.4] - 2024.04.22
### Added
- Added `CaelusApi#canFallFly(LivingEntity)`
## [6.0.0+1.20.6] - 2024.05.06
### Changed
- Refactored fall flying to account for three states instead of two for better mod compatibility
### Deprecated
- Deprecated `CaelusApi#canFly(LivingEntity)`
- [API] Changed return of `CaelusApi#getFlightAttribute` to `Holder<Attribute>`
- Updated to Minecraft 1.20.6
6 changes: 6 additions & 0 deletions LGPL_3_0_or_later.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Copyright (C) 2019-&amp;#36;today.year C4&#10;&#10;&amp;#36;project.name is free software: you can redistribute it and/or modify&#10;it under the terms of the GNU Lesser General Public License as published by&#10;the Free Software Foundation, either version 3 of the License, or&#10;(at your option) any later version.&#10;&#10;&amp;#36;project.name is distributed in the hope that it will be useful,&#10;but WITHOUT ANY WARRANTY; without even the implied warranty of&#10;MERCHANTABILITY or FITNESS FOR PARTICULAR PURPOSE. See the&#10;GNU Lesser General Public License for more details.&#10;&#10;You should have received a copy of the GNU General Public License&#10;and the GNU Lesser General Public License along with &amp;#36;project.name.&#10;If not, see &lt;https://www.gnu.org/licenses/&gt;." />
<option name="myName" value="LGPL-3.0-or-later" />
</copyright>
</component>
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (C) 2019-2023 C4
Copyright (C) 2019-2024 C4

Caelus is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
Expand Down
103 changes: 5 additions & 98 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,99 +6,6 @@ plugins {
id "org.jetbrains.gradle.plugin.idea-ext" version "1.1.7"
}

subprojects {
apply plugin: 'java'

java.toolchain.languageVersion = JavaLanguageVersion.of(17)
java.withSourcesJar()
java.withJavadocJar()

jar {
from(rootProject.file("LICENSE"))
from(rootProject.file("COPYING"))
from(rootProject.file("COPYING.LESSER"))
from(rootProject.file("README.md"))
from(rootProject.file("CHANGELOG.md"))
manifest {
attributes([
'Specification-Title' : mod_name,
'Specification-Vendor' : mod_author,
'Specification-Version' : project.jar.archiveVersion,
'Implementation-Title' : project.name,
'Implementation-Version' : project.jar.archiveVersion,
'Implementation-Vendor' : mod_author,
'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
'Timestamp' : System.currentTimeMillis(),
'Built-On-Java' : "${System.getProperty('java.vm.version')} (${System.getProperty('java.vm.vendor')})",
'Built-On-Minecraft' : minecraft_version
])
}
}

sourcesJar {
from(rootProject.file("LICENSE"))
from(rootProject.file("COPYING"))
from(rootProject.file("COPYING.LESSER"))
from(rootProject.file("README.md"))
from(rootProject.file("CHANGELOG.md"))
}

repositories {
mavenCentral()
maven {
name = 'Sponge / Mixin'
url = 'https://repo.spongepowered.org/repository/maven-public/'
}
maven {
name = 'BlameJared Maven (JEI / CraftTweaker / Bookshelf)'
url = 'https://maven.blamejared.com'
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
it.options.getRelease().set(17)
}

processResources {
def expandProps = [
"version" : version,
"group" : project.group, //Else we target the task's group.
"minecraft_version" : minecraft_version,
"forge_version" : forge_version,
"forge_loader_version_range" : forge_loader_version_range,
"forge_version_range" : forge_version_range,
"minecraft_version_range" : minecraft_version_range,
"minecraft_version_range_alt" : minecraft_version_range_alt,
"mod_name" : mod_name,
"mod_author" : mod_author,
"mod_id" : mod_id,
"license" : license,
"issues_url" : issues_url,
"sources_url" : sources_url,
"description" : project.description,
"neoforge_version" : neoforge_version,
"neoforge_loader_version_range": neoforge_loader_version_range
]

filesMatching(['pack.mcmeta', 'META-INF/mods.toml', '*.mixins.json']) {
expand expandProps
}
inputs.properties(expandProps)
}

// Disables Gradle's custom module metadata from being published to maven. The
// metadata includes mapped dependencies which are not reasonably consumable by
// other mod developers.
tasks.withType(GenerateModuleMetadata).configureEach {
enabled = false
}

tasks.withType(Jar).all {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
}

def publishDiscord() {
try {
def cfLinks = new StringJoiner('\\n')
Expand Down Expand Up @@ -126,7 +33,7 @@ def publishDiscord() {
changelog = changelog.replaceAll("\n", "\\\\n")

if (changelog.length() >= 1024) {
changelog = changelog.substring(0, changelog.length() - 100)
changelog = changelog.substring(0, 924)
changelog = changelog + "...[(See more)](${changelog_link})"
}
println(changelog)
Expand Down Expand Up @@ -171,7 +78,7 @@ def publishDiscord() {
}
"""
println(message)
final URL url = new URL("${discordWebhook}")
final URL url = URL.toURI("${discordWebhook}")
final HttpsURLConnection connection = (HttpsURLConnection) url.openConnection()
connection.addRequestProperty("Content-Type", "application/json; charset=UTF-8")
connection.addRequestProperty("User-Agent", "${mod_name} Gradle Upload")
Expand All @@ -198,23 +105,23 @@ def ordered(String... dependencyPaths) {
}

tasks.register('publishForge') {
dependsOn ordered(':forge:modrinth', 'forge:publishCurseForge')
dependsOn ordered(':forge:modrinth', ':forge:publishCurseForge')

doLast {
publishDiscord()
}
}

tasks.register('publishNeoForge') {
dependsOn ordered(':neoforge:modrinth', 'neoforge:publishCurseForge')
dependsOn ordered(':neoforge:modrinth', ':neoforge:publishCurseForge')

doLast {
publishDiscord()
}
}

tasks.register('publishForgeNeoForge') {
dependsOn ordered(':forge:modrinth', 'forge:publishCurseForge', ':neoforge:modrinth', 'neoforge:publishCurseForge')
dependsOn ordered(':forge:modrinth', ':forge:publishCurseForge', ':neoforge:modrinth', ':neoforge:publishCurseForge')

doLast {
publishDiscord()
Expand Down
3 changes: 3 additions & 0 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
plugins {
id 'groovy-gradle-plugin'
}
117 changes: 117 additions & 0 deletions buildSrc/src/main/groovy/multiloader-common.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
plugins {
id 'java-library'
id 'maven-publish'
}

base {
archivesName = "${mod_id}-${project.name}"
}

java {
toolchain.languageVersion = JavaLanguageVersion.of(java_version)
withSourcesJar()
withJavadocJar()
}

repositories {
mavenCentral()
// https://docs.gradle.org/current/userguide/declaring_repositories.html#declaring_content_exclusively_found_in_one_repository
exclusiveContent {
forRepository {
maven {
name = 'Sponge'
url = 'https://repo.spongepowered.org/repository/maven-public'
}
}
filter { includeGroupAndSubgroups("org.spongepowered") }
}
maven {
name = 'Illusive Soulworks'
url = 'https://maven.theillusivec4.top'
}
}

dependencies {
implementation 'org.jetbrains:annotations:24.1.0'
}

// Declare capabilities on the outgoing configurations.
// Read more about capabilities here: https://docs.gradle.org/current/userguide/component_capabilities.html#sec:declaring-additional-capabilities-for-a-local-component
['apiElements', 'runtimeElements', 'sourcesElements', 'javadocElements'].each { variant ->
configurations."$variant".outgoing {
capability("$group:$mod_id-${project.name}-${minecraft_version}:$version")
capability("$group:$mod_id:$version")
}
publishing.publications.configureEach {
suppressPomMetadataWarningsFor(variant)
}
}

sourcesJar {
from(rootProject.file("LICENSE"))
from(rootProject.file("COPYING"))
from(rootProject.file("COPYING.LESSER"))
from(rootProject.file("README.md"))
from(rootProject.file("CHANGELOG.md"))
}

jar {
from(rootProject.file("LICENSE"))
from(rootProject.file("COPYING"))
from(rootProject.file("COPYING.LESSER"))
from(rootProject.file("README.md"))
from(rootProject.file("CHANGELOG.md"))

manifest {
attributes([
'Specification-Title' : mod_name,
'Specification-Vendor' : mod_author,
'Specification-Version' : project.jar.archiveVersion,
'Implementation-Title' : project.name,
'Implementation-Version': project.jar.archiveVersion,
'Implementation-Vendor' : mod_author,
'Built-On-Minecraft' : minecraft_version
])
}
}

processResources {
def expandProps = [
"version" : version,
"group" : project.group, //Else we target the task's group.
"minecraft_version" : minecraft_version,
"forge_version" : forge_version,
"forge_version_range" : forge_version_range,
"minecraft_version_range" : minecraft_version_range,
"minecraft_version_range_alt": minecraft_version_range_alt,
"mod_name" : mod_name,
"mod_author" : mod_author,
"mod_id" : mod_id,
"license" : license,
"issues_url" : issues_url,
"sources_url" : sources_url,
"description" : project.description,
"neoforge_version" : neoforge_version,
"neoforge_version_range" : neoforge_version_range,
"java_version" : java_version
]

filesMatching(['pack.mcmeta', 'fabric.mod.json', 'META-INF/mods.toml', 'META-INF/neoforge.mods.toml', '*.mixins.json']) {
expand expandProps
}
inputs.properties(expandProps)
}

publishing {
publications {
register('mavenJava', MavenPublication) {
artifactId base.archivesName.get()
from components.java
}
}
repositories {
maven {
url System.getenv("local_maven_url")
}
}
}
44 changes: 44 additions & 0 deletions buildSrc/src/main/groovy/multiloader-loader.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
plugins {
id 'multiloader-common'
}

configurations {
commonJava{
canBeResolved = true
}
commonResources{
canBeResolved = true
}
}

dependencies {
compileOnly(project(':common')) {
capabilities {
requireCapability "$group:$mod_id"
}
}
commonJava project(path: ':common', configuration: 'commonJava')
commonResources project(path: ':common', configuration: 'commonResources')
}

tasks.named('compileJava', JavaCompile) {
dependsOn(configurations.commonJava)
source(configurations.commonJava)
}

processResources {
dependsOn(configurations.commonResources)
from(configurations.commonResources)
}

tasks.named('javadoc', Javadoc).configure {
dependsOn(configurations.commonJava)
source(configurations.commonJava)
}

tasks.named("sourcesJar", Jar) {
dependsOn(configurations.commonJava)
from(configurations.commonJava)
dependsOn(configurations.commonResources)
from(configurations.commonResources)
}
Loading

0 comments on commit 6aa98ed

Please sign in to comment.