0
0
mirror of https://github.com/Wurst-Imperium/Wurst7.git synced 2024-09-19 17:02:13 +02:00

Merge branch 'master' into v7.44

This commit is contained in:
Alexander01998 2024-06-18 08:03:52 +02:00
commit 3b36b1030d
3 changed files with 21 additions and 14 deletions

View File

@ -11,13 +11,13 @@ plugins {
def ENV = System.getenv()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group
base {
archivesName = project.archives_base_name
}
repositories {
// Add repositories to retrieve artifacts from in here.
// You should only use this when depending on other mods because
@ -31,7 +31,7 @@ dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
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}"
@ -66,11 +66,14 @@ java {
// if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
jar {
from("LICENSE") {
rename { "${it}_${project.archivesBaseName}"}
rename { "${it}_${project.base.archivesName.get()}"}
}
}
@ -86,8 +89,9 @@ spotless {
task moveDevLibs(dependsOn: [remapJar, remapSourcesJar]) {
doLast {
ant.move(file:"${project.buildDir}/devlibs/${archivesBaseName}-${version}-dev.jar", tofile:"${project.buildDir}/libs/${archivesBaseName}-${version}-dev.jar")
ant.move(file:"${project.buildDir}/devlibs/${archivesBaseName}-${version}-sources.jar", tofile:"${project.buildDir}/libs/${archivesBaseName}-${version}-sources-dev.jar")
def archivesName = project.base.archivesName.get() as String
ant.move(file:"${project.buildDir}/devlibs/${archivesName}-${version}-dev.jar", tofile:"${project.buildDir}/libs/${archivesName}-${version}-dev.jar")
ant.move(file:"${project.buildDir}/devlibs/${archivesName}-${version}-sources.jar", tofile:"${project.buildDir}/libs/${archivesName}-${version}-sources-dev.jar")
}
}
@ -98,11 +102,12 @@ task github(dependsOn: moveDevLibs) {
onlyIf {
ENV.GITHUB_TOKEN
}
doLast {
def github = GitHub.connectUsingOAuth(ENV.GITHUB_TOKEN as String)
def repository = github.getRepository("Wurst-Imperium/Wurst-MCX2")
def ghVersion = version.substring(0, version.indexOf("-"))
def archivesName = project.base.archivesName.get() as String
def ghRelease = repository.getReleaseByTagName(ghVersion as String)
if(ghRelease == null) {
@ -113,7 +118,7 @@ task github(dependsOn: moveDevLibs) {
ghRelease.uploadAsset(remapJar.archiveFile.get().getAsFile(), "application/java-archive")
ghRelease.uploadAsset(remapSourcesJar.archiveFile.get().getAsFile(), "application/java-archive")
ghRelease.uploadAsset(new File("${project.buildDir}/libs/${archivesBaseName}-${version}-dev.jar"), "application/java-archive")
ghRelease.uploadAsset(new File("${project.buildDir}/libs/${archivesBaseName}-${version}-sources-dev.jar"), "application/java-archive")
ghRelease.uploadAsset(new File("${project.buildDir}/libs/${archivesName}-${version}-dev.jar"), "application/java-archive")
ghRelease.uploadAsset(new File("${project.buildDir}/libs/${archivesName}-${version}-sources-dev.jar"), "application/java-archive")
}
}

View File

@ -40,7 +40,7 @@ public final class NewChunksReasonsRenderer
BufferBuilder bufferBuilder = tessellator
.begin(VertexFormat.DrawMode.QUADS, VertexFormats.POSITION);
renderBlocks(new ArrayList<>(reasons), bufferBuilder);
return bufferBuilder.end();
return bufferBuilder.endNullable();
}
private void renderBlocks(List<BlockPos> blocks,

View File

@ -124,12 +124,14 @@ public abstract class GameMenuScreenMixin extends Screen
private boolean isFeedbackButton(ClickableWidget button)
{
return hasTrKey(button, "menu.sendFeedback");
return hasTrKey(button, "menu.sendFeedback")
|| hasTrKey(button, "menu.feedback");
}
private boolean isBugReportButton(ClickableWidget button)
{
return hasTrKey(button, "menu.reportBugs");
return hasTrKey(button, "menu.reportBugs")
|| hasTrKey(button, "menu.server_links");
}
private boolean hasTrKey(ClickableWidget button, String key)