Skip to content

Commit 99655ce

Browse files
committed
Moved custom tooltip handling to Better Advanced Tooltips mod, JIJ'd it, updated gradle
1 parent 5c1778a commit 99655ce

35 files changed

+151
-498
lines changed

build.gradle

Lines changed: 80 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ plugins {
55
id 'java'
66
id 'idea'
77
id 'maven-publish'
8-
id 'net.neoforged.moddev' version "2.0.112"
8+
id 'net.neoforged.moddev' version "2.0.137"
99
id "me.shedaniel.unified-publishing" version "0.1.+"
1010
}
1111

12-
ext.ENV = System.getenv()
13-
def isLocal = !ENV.containsKey("GITHUB_RUN_NUMBER")
12+
var ENV = System.getenv()
13+
var CI = ENV.CI == "true"
14+
var isLocal = !ENV.containsKey("GITHUB_RUN_NUMBER")
1415

1516
version = "${mod_version}-${isLocal ? "local.${Instant.now().epochSecond}" : "build.${ENV.GITHUB_RUN_NUMBER}"}"
1617
group = project.maven_group
@@ -19,47 +20,50 @@ base.archivesName = project.archives_base_name
1920
println("Building version: ${version}")
2021

2122
neoForge {
22-
version = project.neoforge_version
23-
validateAccessTransformers = true
23+
enable {
24+
version = project.neoforge_version
25+
validateAccessTransformers = !CI
26+
disableRecompilation = CI
2427

25-
accessTransformers {
26-
publish(project.file('src/main/resources/META-INF/accesstransformer.cfg'))
27-
}
28-
29-
interfaceInjectionData {
30-
from(file('interfaces.json'))
31-
publish(file('interfaces.json'))
32-
}
33-
34-
runs {
35-
configureEach {
36-
logLevel = org.slf4j.event.Level.INFO
28+
accessTransformers {
29+
publish(project.file('src/main/resources/META-INF/accesstransformer.cfg'))
3730
}
3831

39-
client {
40-
ideName = 'Client'
41-
client()
42-
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
32+
interfaceInjectionData {
33+
from(file('interfaces.json'))
34+
publish(file('interfaces.json'))
35+
}
4336

44-
if (ENV.MC_CLIENT_ARGS) {
45-
programArguments.addAll(ENV.MC_CLIENT_ARGS.split(' '))
37+
runs {
38+
configureEach {
39+
logLevel = org.slf4j.event.Level.INFO
4640
}
4741

48-
jvmArguments.addAll("-XX:+IgnoreUnrecognizedVMOptions", "-XX:+AllowEnhancedClassRedefinition")
49-
gameDirectory = file 'runs/client'
50-
}
42+
client {
43+
ideName = 'Client'
44+
client()
45+
systemProperty 'neoforge.enabledGameTestNamespaces', project.mod_id
46+
47+
if (ENV.MC_CLIENT_ARGS) {
48+
programArguments.addAll(ENV.MC_CLIENT_ARGS.split(' '))
49+
}
5150

52-
server {
53-
ideName = 'Server'
54-
server()
55-
programArgument("--nogui")
56-
gameDirectory = file 'runs/server'
51+
jvmArguments.addAll("-XX:+IgnoreUnrecognizedVMOptions", "-XX:+AllowEnhancedClassRedefinition")
52+
gameDirectory = file 'runs/client'
53+
}
54+
55+
server {
56+
ideName = 'Server'
57+
server()
58+
programArgument("--nogui")
59+
gameDirectory = file 'runs/server'
60+
}
5761
}
58-
}
5962

60-
mods {
61-
kubejs {
62-
sourceSet sourceSets.main
63+
mods {
64+
kubejs {
65+
sourceSet sourceSets.main
66+
}
6367
}
6468
}
6569
}
@@ -105,29 +109,15 @@ repositories {
105109
}
106110

107111
maven {
108-
url "https://maven.architectury.dev/"
109-
}
110-
111-
maven {
112-
url "https://maven.blamejared.com"
112+
url "https://maven.latvian.dev/mirror"
113113
content {
114+
includeGroup "dev.architectury"
115+
includeGroup "me.shedaniel"
116+
includeGroup "me.shedaniel.cloth"
114117
includeGroup "mezz.jei"
115118
includeGroup "net.darkhax.bookshelf"
116119
includeGroup "net.darkhax.gamestages"
117-
}
118-
}
119-
120-
maven {
121-
name = "TerraformersMC"
122-
url = "https://maven.terraformersmc.com/"
123-
content {
124120
includeGroup "dev.emi"
125-
}
126-
}
127-
128-
maven {
129-
url 'https://jitpack.io'
130-
content {
131121
includeGroup "com.github.rtyley"
132122
}
133123
}
@@ -154,6 +144,13 @@ dependencies {
154144
prefer "animated-gif-lib-$gif_lib_version"
155145
}
156146
}
147+
148+
jarJar(implementation('dev.latvian.mods:better-advanced-tooltips')) {
149+
version {
150+
strictly "[$bat_version,)"
151+
prefer "$bat_version"
152+
}
153+
}
157154
}
158155

159156
processResources {
@@ -164,6 +161,7 @@ processResources {
164161
"jei_version" : project.jei_version,
165162
"rei_version" : project.rei_version,
166163
"emi_version" : project.emi_version,
164+
"bat_version": project.bat_version,
167165
]
168166

169167
println("[Process Resources] Replacing properties in resources: " + toReplace)
@@ -243,33 +241,35 @@ unifiedPublishing {
243241

244242
idea {
245243
module {
246-
downloadSources = true
247-
downloadJavadoc = true
248-
249-
["client", "server"].each {
250-
[
251-
".architectury-transformer",
252-
"config",
253-
"crash-reports",
254-
"debug",
255-
"downloads",
256-
"dumps",
257-
"flashback",
258-
"local",
259-
"logs",
260-
"mods",
261-
"pack-sync",
262-
"profilekeys",
263-
"saves",
264-
"command_history.txt",
265-
"options.txt",
266-
"server.properties",
267-
"world",
268-
"emi.json",
269-
"usercache.json",
270-
"usernamecache.json"
271-
].each { ext ->
272-
excludeDirs.add(file("runs/$it/$ext"))
244+
if (!CI) {
245+
downloadSources = true
246+
downloadJavadoc = true
247+
248+
["client", "server"].each {
249+
[
250+
".architectury-transformer",
251+
"config",
252+
"crash-reports",
253+
"debug",
254+
"downloads",
255+
"dumps",
256+
"flashback",
257+
"local",
258+
"logs",
259+
"mods",
260+
"profilekeys",
261+
"saves",
262+
"voicechat_recordings",
263+
"command_history.txt",
264+
"options.txt",
265+
"server.properties",
266+
"world",
267+
"emi.json",
268+
"usercache.json",
269+
"usernamecache.json"
270+
].each { ext ->
271+
excludeDirs.add(file("runs/$it/$ext"))
272+
}
273273
}
274274
}
275275
}

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ neoForge.parchment.mappingsVersion=2024.11.17
1919
rhino_version=2101.2.7-build.81
2020
tiny_server_version=1.0.0-build.33
2121
gif_lib_version=1.7
22+
bat_version=2101.1.0-build.1
2223

2324
architectury_version=13.0.8
2425
rei_version=16.0.799

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.0-all.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

src/main/java/dev/latvian/mods/kubejs/client/ClientProperties.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,7 @@ public static void reload() {
2222
// private static final ColourScheme.Colour DEFAULT_FOREGROUND_COLOR = new ColourScheme.Colour(236, 239, 244); // #ECEFF4
2323

2424
public String windowTitle;
25-
public boolean showTagNames;
26-
public boolean showComponents;
27-
public boolean showFuelValue;
2825
public boolean disableRecipeBook;
29-
public boolean disableComponentCountTooltip;
30-
public boolean disableTabNameTooltip;
3126
public boolean exportAtlases;
3227
// public ColourScheme.Colour launchBackgroundColor;
3328
// public ColourScheme.Colour launchForegroundColor;
@@ -45,12 +40,7 @@ private ClientProperties() {
4540
@Override
4641
protected void load() {
4742
windowTitle = get("window_title", "");
48-
showTagNames = get("show_tag_names", true);
49-
showComponents = get("show_components", true);
50-
showFuelValue = get("show_fuel_value", true);
5143
disableRecipeBook = get("disable_recipe_book", false);
52-
disableComponentCountTooltip = get("disable_component_count_tooltip", true);
53-
disableTabNameTooltip = get("disable_tab_name_tooltip", false);
5444
exportAtlases = get("export_atlases", false);
5545
// launchBackgroundColor = getColor("launch_background_color", DEFAULT_BACKGROUND_COLOR);
5646
// launchForegroundColor = getColor("launch_foreground_color", DEFAULT_FOREGROUND_COLOR);

0 commit comments

Comments
 (0)