mirror of
https://github.com/chylex/Minecraft-Window-Title.git
synced 2025-05-13 00:34:06 +02:00
Update to Minecraft 1.17
This commit is contained in:
parent
639f96dbed
commit
466de670f3
@ -8,7 +8,6 @@
|
||||
<option name="testRunner" value="GRADLE" />
|
||||
<option name="distributionType" value="DEFAULT_WRAPPED" />
|
||||
<option name="externalProjectPath" value="$PROJECT_DIR$" />
|
||||
<option name="gradleJvm" value="16" />
|
||||
<option name="modules">
|
||||
<set>
|
||||
<option value="$PROJECT_DIR$" />
|
||||
|
@ -27,6 +27,6 @@
|
||||
|
||||
"depends": {
|
||||
"fabricloader": ">=0.7.2",
|
||||
"minecraft": ">=1.15"
|
||||
"minecraft": ">=1.17"
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
package chylex.customwindowtitle.forge;
|
||||
import chylex.customwindowtitle.TitleConfig;
|
||||
import chylex.customwindowtitle.TitleParser;
|
||||
import net.minecraft.client.MainWindow;
|
||||
import com.mojang.blaze3d.platform.Window;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
@ -21,11 +21,11 @@ public class CustomWindowTitle {
|
||||
|
||||
@SubscribeEvent
|
||||
public void onClientSetup(final FMLClientSetupEvent e) {
|
||||
e.getMinecraftSupplier().get().execute(this::updateTitle);
|
||||
e.enqueueWork(this::updateTitle);
|
||||
}
|
||||
|
||||
private void updateTitle() {
|
||||
final MainWindow window = Minecraft.getInstance().getWindow();
|
||||
final Window window = Minecraft.getInstance().getWindow();
|
||||
window.setTitle(TitleParser.parse(config.getTitle()));
|
||||
|
||||
if (config.hasIcon()) {
|
||||
|
@ -1,8 +1,8 @@
|
||||
package chylex.customwindowtitle.forge;
|
||||
import chylex.customwindowtitle.TokenException;
|
||||
import net.minecraft.util.SharedConstants;
|
||||
import net.minecraft.SharedConstants;
|
||||
import net.minecraftforge.fml.ModList;
|
||||
import net.minecraftforge.fml.loading.moddiscovery.ModFileInfo;
|
||||
import net.minecraftforge.forgespi.language.IModFileInfo;
|
||||
import net.minecraftforge.forgespi.language.IModInfo;
|
||||
import static chylex.customwindowtitle.TitleTokens.noArgs;
|
||||
import static chylex.customwindowtitle.TitleTokens.oneArg;
|
||||
@ -19,7 +19,7 @@ final class TokenData {
|
||||
}
|
||||
|
||||
static String getModVersion(final String modId) {
|
||||
final ModFileInfo file = ModList.get().getModFileById(modId);
|
||||
final IModFileInfo file = ModList.get().getModFileById(modId);
|
||||
|
||||
if (file == null) {
|
||||
throw new TokenException("mod file for '" + modId + "' not found");
|
||||
|
@ -14,7 +14,7 @@ displayURL = "https://github.com/chylex/Minecraft-Window-Title"
|
||||
[[dependencies.customwindowtitle]]
|
||||
modId = "minecraft"
|
||||
mandatory = true
|
||||
versionRange = "[1.15.2,)"
|
||||
versionRange = "[1.17,)"
|
||||
ordering = "NONE"
|
||||
side = "CLIENT"
|
||||
|
||||
|
@ -73,10 +73,13 @@ allprojects {
|
||||
implementation("org.jetbrains:annotations:22.0.0")
|
||||
}
|
||||
|
||||
extensions.getByType<JavaPluginExtension>().apply {
|
||||
toolchain.languageVersion.set(JavaLanguageVersion.of(16))
|
||||
}
|
||||
|
||||
tasks.withType<JavaCompile> {
|
||||
options.encoding = "UTF-8"
|
||||
sourceCompatibility = "1.8"
|
||||
targetCompatibility = "1.8"
|
||||
options.release.set(16)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -9,9 +9,9 @@ modSourcesURL=https://github.com/chylex/Minecraft-Window-Title
|
||||
modIssuesURL=https://github.com/chylex/Minecraft-Window-Title/issues
|
||||
|
||||
# Dependencies
|
||||
minecraftVersion=1.16.5
|
||||
forgeVersion=36.2.0
|
||||
fabricVersion=0.12.5
|
||||
minecraftVersion=1.17.1
|
||||
forgeVersion=37.0.75
|
||||
fabricVersion=0.11.7
|
||||
mixinVersion=0.8.4
|
||||
|
||||
# Gradle
|
||||
|
@ -3,7 +3,7 @@
|
||||
"minVersion": "0.8",
|
||||
"package": "chylex.customwindowtitle.mixin",
|
||||
"refmap": "customwindowtitle.refmap.json",
|
||||
"compatibilityLevel": "JAVA_8",
|
||||
"compatibilityLevel": "JAVA_16",
|
||||
"client": [
|
||||
"DisableVanillaTitle"
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user