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

feat: RVC Rederence #115

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
fba80ae
feat: minecraft 1.20.5
zly2006 Apr 11, 2024
1129f8c
Merge branch 'refs/heads/1.20.4' into 1.20.5
zly2006 Apr 11, 2024
515ab61
build: fix
zly2006 Apr 11, 2024
c28213c
cannot access private...
zly2006 Apr 30, 2024
c025ab4
Merge branch 'refs/heads/1.20.4' into rederence-part-2
zly2006 May 6, 2024
0ab3f2b
Merge branch 'refs/heads/1.20.4' into rederence-part-2
zly2006 May 7, 2024
de450bf
build: imgui go!
zly2006 May 11, 2024
235f9d9
build: imgui go!
zly2006 May 11, 2024
e3a6ac0
refactor(imgui)
zly2006 May 11, 2024
5322e8a
refactor(imgui)
zly2006 May 11, 2024
3df1dcc
refactor(imgui): fix callback registration
zly2006 May 12, 2024
112b6c1
feat: RvcTemplate
zly2006 May 12, 2024
e3069c1
refactor(imgui)
zly2006 May 13, 2024
5315244
refactor(imgi)
zly2006 May 13, 2024
f015cb7
refactor(imgui): fix use pushId/popId, see https://github.com/ocornu…
zly2006 May 13, 2024
fa71ff1
refactor(imgui)
zly2006 May 13, 2024
11cc12b
feat(imgui): confirm
zly2006 May 13, 2024
e3e0f44
refactor(imgui)
zly2006 May 13, 2024
656c5c6
build: exclude lwjgl jars
zly2006 May 13, 2024
eba0c8d
ci: java 21
zly2006 May 13, 2024
9ab9fff
build: exclude lwjgl jars
zly2006 May 13, 2024
ad6721b
feat(imgui): ttf
zly2006 May 14, 2024
dea2f1a
build
zly2006 May 21, 2024
6582ac8
build
zly2006 May 21, 2024
9dc8702
Merge branch 'refs/heads/1.20.4' into rederence-part-2
zly2006 May 21, 2024
ed49410
fix: default part of TrackedStructure placementInfo init
zly2006 May 21, 2024
b9c8e54
fix: launch -> execute to sync (at StructureTracker.kt), fix infinit…
zly2006 May 21, 2024
e448951
fix: RvcFileIO
zly2006 May 21, 2024
ee0934f
fix: RvcFileIO
zly2006 May 22, 2024
2c2b035
build: kotlin.2.0.0
zly2006 May 22, 2024
ab4024c
chore
zly2006 May 25, 2024
5132730
fix
zly2006 Jun 7, 2024
af99913
fix: Wormhole
zly2006 Jun 13, 2024
20a5d5d
fix
zly2006 Jun 13, 2024
305b45f
Merge branch 'refs/heads/1.20.5' into rederence-part-2
zly2006 Jul 1, 2024
645507d
feat: update 1.21
zly2006 Jul 1, 2024
c5acb43
feat: update 1.21
zly2006 Jul 1, 2024
ac85af4
feat: update 1.21
zly2006 Jul 1, 2024
2fccecf
feat: update 1.21
zly2006 Jul 1, 2024
0049ccd
feat: update 1.21
zly2006 Jul 1, 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
2 changes: 1 addition & 1 deletion .github/workflows/build-and-publish-pre-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
# Use thses Java versions:
java: [ 17, 21 ] # Current Java LTS and current latest Java version
java: [ 21 ] # Current Java LTS and current latest Java version
# Use these operating systems:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
# Use thses Java versions:
java: [17, 20] # Current Java LTS and current latest Java version
java: [ 21 ] # Current Java LTS and current latest Java version
# Use these operating systems:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
Expand Down
23 changes: 0 additions & 23 deletions .github/workflows/crowdin.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

145 changes: 102 additions & 43 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@file:Suppress("PropertyName")

import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.incremental.createDirectory
import kotlin.io.path.absolutePathString
import kotlin.math.floor
Expand All @@ -14,10 +15,12 @@ val loader_version: String by project
val jgit_version: String by project
val fabric_version: String by project
val owo_version: String by project
val imgui_version: String by project

plugins {
kotlin("jvm") version "1.9.22"
kotlin("plugin.serialization") version "1.9.22"
kotlin("jvm") version "2.0.0"
kotlin("plugin.serialization") version "2.0.0"

id("fabric-loom") version "1.6-SNAPSHOT"
`maven-publish`
id("org.ajoberstar.grgit") version "5.2.2"
Expand Down Expand Up @@ -129,7 +132,7 @@ enum class VersionType(val prereleaseName: String) {
val versionType = when (System.getenv()["REDEN_BUILD_TYPE"]) {
"RELEASE" -> VersionType.RELEASE
"BETA" -> VersionType.BETA
else -> VersionType.DEV
else -> VersionType.DEV
}
val gitBranch = grgit.branch?.current()?.name ?: "no-git"

Expand Down Expand Up @@ -184,6 +187,7 @@ allprojects {
name = "CottonMC"
url = uri("https://server.bbkr.space/artifactory/libs-release")
}
maven { url = uri("https://jitpack.io") }
}

tasks {
Expand Down Expand Up @@ -215,50 +219,42 @@ allprojects {
}

shadowJar {
/**
* Note: use of this shadowJar task is on your own risk.
* It contains minecraft classes so make sure to not distribute it.
* See Mojang's EULA for more information.
*/
isZip64 = true
exclude("META-INF/**")
exclude("kotlin/**")
exclude("kotlinx/**")
exclude("*.json")
exclude("*.properties")
exclude("*.accesswidener")
exclude("LICENSE*")
exclude("Log4j*")
exclude("mixin/**")
exclude("mappings/**")

doLast {
val jar = archiveFile.get().asFile
println("Jar size: " + floor(jar.length().toDouble() / 1024 / 1024) + "MB")

javaexec {
classpath(files("classpath/public-jar-1.2-all.jar"))
mainClass.set("com.redenmc.publicizer.MainKt")
args(
jar.absolutePath,
jar.toPath().parent.resolve("publiced-" + jar.name).absolutePathString()
)
}
configurations = listOf(project.configurations.getByName("shadow"))
archiveClassifier = "shadow-dev"
dependencies {
exclude(dependency("org.lwjgl:lwjgl"))
exclude(dependency("org.lwjgl:lwjgl-glfw"))
exclude(dependency("org.lwjgl:lwjgl-opengl"))

// glfw is embedded in minecraft
exclude("windows/x64/org/lwjgl/**")
exclude("windows/x86/org/lwjgl/**")
exclude("linux/x64/org/lwjgl/**")
exclude("linux/x86/org/lwjgl/**")
exclude("macos/x64/org/lwjgl/**")
exclude("macos/arm64/org/lwjgl/**")
exclude("org/lwjgl/**")
}
}

remapJar {
dependsOn(shadowJar)
inputFile.set(shadowJar.get().archiveFile.get())
}
}

kotlin {
compilerOptions {
freeCompilerArgs.add("-Xjvm-default=all")
}
jvmToolchain(17)
jvmToolchain(21)
}

java {
withSourcesJar()
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
languageVersion.set(JavaLanguageVersion.of(21))
}
}
}
Expand All @@ -270,17 +266,81 @@ afterEvaluate {
}
}

tasks.create<ShadowJar>("exportJat") {
/**
* Note: use of this shadowJar task is on your own risk.
* It contains minecraft classes so make sure to not distribute it.
* See Mojang's EULA for more information.
*/

isZip64 = true
exclude("META-INF/**")
exclude("_COROUTINE/**")
exclude("kotlin/**")
exclude("kotlinx/**")
exclude("macos/**")
exclude("windows/**")
exclude("linux/**")
exclude("io/netty/**")
exclude("com/ibm/**")
exclude("assets/minecraft/textures/**")
exclude("*.json")
exclude("*.jpg")
exclude("*.png")
exclude("*.properties")
exclude("*.accesswidener")
exclude("LICENSE*")
exclude("Log4j*")
exclude("mixin/**")
exclude("mappings/**")

doLast {
val jar = archiveFile.get().asFile
println("Jar size: " + floor(jar.length().toDouble() / 1024 / 1024) + "MB")

javaexec {
classpath(File("classpath/public-jar-1.2-all.jar"))
mainClass.set("Main")
args(
jar.absolutePath,
jar.toPath().parent.resolve("publiced-" + jar.name).absolutePathString(),
"--field"
)
}
}
}

dependencies {
minecraft("com.mojang:minecraft:${minecraft_version}")
mappings("net.fabricmc:yarn:${yarn_mappings}:v2")
modImplementation("net.fabricmc:fabric-loader:${loader_version}")


implementation("com.google.code.findbugs:jsr305:3.0.2")

// implementation("io.github.spair:imgui-java-binding:${imgui_version}")
// shadow("io.github.spair:imgui-java-binding:${imgui_version}")
// implementation("io.github.spair:imgui-java-lwjgl3:${imgui_version}")
// shadow("io.github.spair:imgui-java-lwjgl3:${imgui_version}")
//
// implementation("io.github.spair:imgui-java-natives-windows:${imgui_version}")
// shadow("io.github.spair:imgui-java-natives-windows:${imgui_version}")
// implementation("io.github.spair:imgui-java-natives-linux:${imgui_version}")
// shadow("io.github.spair:imgui-java-natives-linux:${imgui_version}")
// implementation("io.github.spair:imgui-java-natives-macos:${imgui_version}")
// shadow("io.github.spair:imgui-java-natives-macos:${imgui_version}")

// ImGui, https://github.com/SpaiR/imgui-java/pull/190
val imguiAll = "imgui-app-1.86.11-11-gbdf3fc2-all.jar"
implementation(files("classpath/$imguiAll"))
shadow(files("classpath/$imguiAll"))

// Essential dependencies
modImplementation("net.fabricmc.fabric-api:fabric-api:${fabric_version}")
modImplementation("net.fabricmc:fabric-language-kotlin:1.10.17+kotlin.1.9.22")
modImplementation("fi.dy.masa.malilib:malilib-fabric-1.20.4:0.18.0")
modImplementation("carpet:fabric-carpet:1.20.3-1.4.128+v231205")
modImplementation("net.fabricmc:fabric-language-kotlin:1.11.0+kotlin.2.0.0")
modImplementation("carpet:fabric-carpet:1.21-1.4.147+v240613")
modImplementation("io.wispforest:owo-lib:${owo_version}")
modImplementation("com.github.sakura-ryoko:malilib:b012771deb")
// Game test
modImplementation("net.fabricmc:fabric-loader-junit:${loader_version}")
// Embedded dependencies
Expand All @@ -301,15 +361,14 @@ dependencies {
include(implementation("com.jcraft:jsch:0.1.55")!!)

// Optional dependencies
modImplementation("fi.dy.masa.litematica:litematica:0.17.1")
modImplementation("fi.dy.masa.tweakeroo:tweakeroo:0.19.2")
modImplementation("com.glisco:isometric-renders:0.4.7+1.20.3")
modImplementation("com.terraformersmc:modmenu:9.0.0")
modImplementation("com.github.sakura-ryoko:litematica:8e285513a6")
modImplementation("com.github.sakura-ryoko:tweakeroo:36a640f2c6")
// modImplementation("com.glisco:isometric-renders:0.4.7+1.20.3")
modImplementation("com.terraformersmc:modmenu:11.0.1")

// Runtime only dependencies (game optimization)
modRuntimeOnly("maven.modrinth:ferrite-core:6.0.3-fabric")
modRuntimeOnly("maven.modrinth:in-game-account-switcher:8.0.2-fabric1.20.4")
modRuntimeOnly("maven.modrinth:notenoughcrashes:4.4.7+1.20.4-fabric")
modRuntimeOnly("maven.modrinth:ferrite-core:7.0.0")
// modRuntimeOnly("maven.modrinth:notenoughcrashes:4.4.7+1.20.4-fabric")
}

base {
Expand Down
Binary file added classpath/imgui-app-1.86.11-11-gbdf3fc2-all.jar
Binary file not shown.
11 changes: 6 additions & 5 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ archives_base_name = reden-is-what-we-made

# check these on https://fabricmc.net/develop
# Fabric Properties
minecraft_version=1.20.4
yarn_mappings=1.20.4+build.3
minecraft_version=1.21
yarn_mappings=1.21+build.7
loader_version=0.15.11
# Fabric API
fabric_version=0.97.0+1.20.4
owo_version=0.12.6+1.20.3
fabric_version=0.100.4+1.21
owo_version=0.12.10+1.21
jgit_version=6.8.0.202311291450-r

imgui_version=1.86.11
macos
is_main_branch=true
Loading
Loading