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

Initial 1.21 support #192

Merged
merged 41 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
faafb65
Migrate to polymer
samolego Feb 7, 2024
cc5c8c8
npc selections glow again
samolego Feb 8, 2024
24d19d4
skin layers working again
samolego Feb 8, 2024
b4a92dc
set skin layers to all on by default
samolego Feb 8, 2024
47a9467
Fix #137 (rewrite/polymer) (#181)
MagicSweet-dev Mar 11, 2024
931eac9
Update gradle.properties to iterate mod_version
UntalentedAmateur May 19, 2024
d0e5f5d
Update Taterzens.java to init lang as the correct datatype
UntalentedAmateur May 21, 2024
39b5df7
Update LanguageUtil.java Language file path
UntalentedAmateur May 21, 2024
59e53ab
Update TextUtil.java Commenting out SERVER_TRANSLATION
UntalentedAmateur May 21, 2024
3f8d82e
Update EditorGUI.java Generate UUID to prevent GameProfile null crash
UntalentedAmateur May 21, 2024
c4f783a
Update Taterzens.java Syntax Error Fix
UntalentedAmateur May 22, 2024
aad035e
Update TaterzensClient.java
UntalentedAmateur Jul 23, 2024
4559ff7
Update TypeCommand.java
UntalentedAmateur Jul 23, 2024
253dd94
Update NPCData.java
UntalentedAmateur Jul 23, 2024
01dc8a8
Update TaterzenNPC.java
UntalentedAmateur Jul 23, 2024
36dfe98
Update TaterzenNPC.java
UntalentedAmateur Jul 23, 2024
4348161
Update build.gradle
UntalentedAmateur Jul 26, 2024
440ea56
Update gradle.properties
UntalentedAmateur Jul 26, 2024
4c26379
Update TextUtil.java
UntalentedAmateur Jul 26, 2024
e9d0a68
Update FabricPlatform.java
UntalentedAmateur Jul 26, 2024
4e5eb61
Update Taterzens.java
UntalentedAmateur Jul 27, 2024
e7f2564
Update NpcCommand.java
UntalentedAmateur Jul 27, 2024
adadb96
Update TaterzensCommand.java
UntalentedAmateur Jul 27, 2024
5490dde
Update TeleportCommand.java
UntalentedAmateur Jul 27, 2024
9c9317f
Update BehaviourCommand.java
UntalentedAmateur Jul 27, 2024
73b26dc
Update MovementCommand.java
UntalentedAmateur Jul 27, 2024
34825c8
Update TaterzensCommand.java
UntalentedAmateur Jul 27, 2024
08467ef
Update BehaviourCommand.java
UntalentedAmateur Jul 27, 2024
5138488
Update ProfessionsCommand.java
UntalentedAmateur Jul 27, 2024
67c8cdd
Update SoundCommand.java
UntalentedAmateur Jul 28, 2024
9a57032
Update TypeCommand.java
UntalentedAmateur Jul 28, 2024
cc30f46
Update CommandsCommand.java
UntalentedAmateur Jul 28, 2024
dac209d
Update ServerGamePacketListenerImplMixin_MsgEditor.java
UntalentedAmateur Jul 28, 2024
19a0963
Update TaterzenNPC.java
UntalentedAmateur Jul 28, 2024
b6a3209
Update BungeeCommand.java
UntalentedAmateur Jul 28, 2024
eebe017
Update ScarpetProfession.java
UntalentedAmateur Jul 28, 2024
ed3387f
Update FabricPlatform.java
UntalentedAmateur Jul 28, 2024
02d14c1
Update MessagesEditGUI.java
UntalentedAmateur Jul 28, 2024
c091ff8
Update ListItemsGUI.java
UntalentedAmateur Jul 28, 2024
34e5a3e
Update EditorGUI.java
UntalentedAmateur Jul 28, 2024
fa706a1
Merge branch 'master' into 1.21
samolego Jul 30, 2024
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
53 changes: 0 additions & 53 deletions .circleci/config.yml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/fabric-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
if: ${{ runner.os != 'Windows' }}
run: chmod +x ./gradlew
- name: build
run: ./gradlew fabric:build
run: ./gradlew build
- name: capture build artifacts
if: ${{ runner.os == 'Linux' }}
uses: actions/upload-artifact@v2
with:
name: Artifacts
path: fabric/build/libs/
path: build/libs/
6 changes: 3 additions & 3 deletions .github/workflows/fabric-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:
run: chmod +x gradlew

- name: Build with Gradle
run: ./gradlew fabric:build --stacktrace
run: ./gradlew :build --stacktrace

- name: Upload GitHub release
uses: AButler/[email protected]
with:
files: "fabric/build/libs/*.jar"
files: 'build/libs/*.jar'
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Publish with Gradle
run: ./gradlew fabric:modrinth fabric:curseforge --stacktrace
run: ./gradlew modrinth curseforge --stacktrace
env:
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,9 @@ bin/

run/

# Architectury
.architectury-transformer
# java

hs_err_*.log
replay_*.log
*.hprof
*.jfr
289 changes: 158 additions & 131 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,141 +1,168 @@
plugins {
// Fabric loom
id "fabric-loom" version "1.1-SNAPSHOT" apply false
// Forge Gradle
id 'net.minecraftforge.gradle' version '6.0.+' apply false
id 'fabric-loom' version '1.7-SNAPSHOT'
id 'maven-publish'

id 'com.matthewprenger.cursegradle' version '1.4.0' apply false
id "com.modrinth.minotaur" version "2.+" apply false
id 'com.matthewprenger.cursegradle' version '1.4.0'
id "com.modrinth.minotaur" version "2.+"
}

version = project.mod_version
group = project.maven_group

base {
archivesName = project.archives_base_name
}

repositories {
mavenCentral()
maven {
url 'https://jitpack.io'
}
maven { url "https://maven.pkg.jetbrains.space/public/p/kotlinx-html/maven" }
maven { url 'https://maven.nucleoid.xyz' }
maven {
url 'https://masa.dy.fi/maven'
}
maven { url 'https://jitpack.io' }
}

allprojects {
apply plugin: "java"
apply plugin: "maven-publish"

archivesBaseName = rootProject.archives_base_name + "-" + project.name + "-" + rootProject.minecraft_version
version = rootProject.mod_version
group = rootProject.maven_group

repositories {
mavenCentral()
maven {
url 'https://jitpack.io'
}
maven { url 'https://maven.nucleoid.xyz' }
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"

def javaTarget = 17
it.options.release = javaTarget

sourceCompatibility = JavaVersion.toVersion(javaTarget)
targetCompatibility = JavaVersion.toVersion(javaTarget)

if (JavaVersion.current() < JavaVersion.toVersion(javaTarget)) {
toolchain.languageVersion.set(JavaLanguageVersion.of(javaTarget))
}
}

publishing {
publications {
mavenJava(MavenPublication) {
artifactId = rootProject.archives_base_name + "-" + project.name
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.
mavenLocal()
}
}
loom {
splitEnvironmentSourceSets()

mods {
"taterzens" {
sourceSet sourceSets.main
sourceSet sourceSets.client
}
}

}

subprojects {

// Publishing plugins
if (it.name != "common") {
apply plugin: "com.modrinth.minotaur"
apply plugin: "com.matthewprenger.cursegradle"
}

if (it.name != "forge") {
apply plugin: "fabric-loom"
repositories {
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots'
}
maven {
url 'https://masa.dy.fi/maven'
}
}

loom {
accessWidenerPath = file("${project.rootDir}/common/src/main/resources/taterzens.accesswidener")
}

dependencies {
// To change the versions see the gradle.properties file
modImplementation "net.fabricmc:fabric-loader:${rootProject.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_version}"
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.layered {
//mappings("net.fabricmc:yarn:$project.yarn_mappings:v2")
it.officialMojangMappings()
}

// C2B
modImplementation("com.github.samolego.Config2Brigadier:config2brigadier-fabric:${rootProject.c2b_version}")


// Disguiselib
modImplementation("xyz.nucleoid:disguiselib-fabric:${project.disguiselib_version}")
}
}

if (it.name != "common") {
dependencies {
compileOnly project(":common")
}

processResources {
from project(":common").sourceSets.main.resources
}

tasks.withType(JavaCompile) {
source(project(":common").sourceSets.main.allSource)
}
}

jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}" }
}
manifest {
attributes([
"Specification-Title" : rootProject.archives_base_name,
"Specification-Vendor" : "",
"Specification-Version" : rootProject.mod_version,
"Implementation-Title" : project.name,
"Implementation-Version" : project.jar.archiveVersion,
"Implementation-Vendor" : "",
"MixinConfigs" : "${rootProject.archives_base_name}.mixins.json",
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ")
])
}
}
dependencies {
// To change the versions see the gradle.properties file
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings loom.layered {
//mappings("net.fabricmc:yarn:$project.yarn_mappings:v2")
it.officialMojangMappings()
}
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}"

// Mod Dependencies

// Carpet Mod
modCompileOnly("com.github.gnembon:fabric-carpet:${project.carpet_core_version}")

// Disguiselib
// Commented out of main codebase for now, as TYPE change is achieved by Poylmer
//modCompileOnly("xyz.nucleoid:disguiselib-fabric:${project.disguiselib_version}")
//modImplementation(include('com.github.NucleoidMC:DisguiseLib:90bf223196'))

// Permission API
modImplementation(include('me.lucko:fabric-permissions-api:0.1-SNAPSHOT'))

// Server translations
// Commented out for now until we can confirm the 1.21 supported version. Does not impact general mod function
//modImplementation(include("xyz.nucleoid:server-translations-api:${project.translations_api}"))

// SGUI
modImplementation(include("eu.pb4:sgui:${project.sgui_version}"))

// C2B
modImplementation(include("com.github.samolego.Config2Brigadier:config2brigadier-fabric:${project.c2b_version}"))

// Polymer
modImplementation(include("eu.pb4:polymer-core:${project.polymer_version}"))

}

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

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

tasks.withType(JavaCompile).configureEach {
// One of the big changes to 1.21 is a requirement for at least Java 21, using 22 as it's current at time of dev.
it.options.release = 22
}

java {
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

sourceCompatibility = JavaVersion.VERSION_22
targetCompatibility = JavaVersion.VERSION_22
}

jar {
from("LICENSE") {
rename { "${it}_${project.base.archivesName.get()}" }
}
}

// 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.
}
}

def ENV = System.getenv()

// from FAPI https://github.com/FabricMC/fabric/blob/1.16/build.gradle
curseforge {
if (ENV.CURSEFORGE_API_KEY) {
apiKey = ENV.CURSEFORGE_API_KEY
}

project {
id = "446499"
changelog = ENV.CHANGELOG ?: "A changelog can be found at https://github.com/samolego/Taterzens/releases/tag/${version}"
releaseType = "release"
addGameVersion "${project.minecraft_version}"
addGameVersion "Fabric"
addGameVersion "Quilt"

mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}-fabric.jar")) {
displayName = "[${project.minecraft_version}] Taterzens ${version}"
}

afterEvaluate {
uploadTask.dependsOn("remapJar")
}
}

options {
forgeGradleIntegration = false
}
}

modrinth {
token = ENV.MODRINTH_TOKEN
projectId = "vE972Kux"
versionNumber = project.minecraft_version + "+" + version + "-fabric"
versionType = "release"
changelog = ENV.CHANGELOG ?: "A changelog can be found at https://github.com/samolego/Taterzens/releases/tag/${version}"
versionName = "[${project.minecraft_version}] Taterzens ${version} [Fabric]"

uploadFile = file("${project.buildDir}/libs/${archivesBaseName}-${version}-fabric.jar")

gameVersions = ["${project.minecraft_version}"]
loaders = ['fabric', 'quilt']

dependencies { // A special DSL for creating dependencies
required.project "fabric-api" // Creates a new required dependency on Fabric API
}
}
Empty file removed common/build.gradle
Empty file.
Loading
Loading