Compare commits

...

4 Commits

Author SHA1 Message Date
Jill 0bb24bea8d
switch to curseforgegradle
i originally did this to see if it would fix a 403 error (it did not) but its api is nicer sooooo
2023-08-29 14:09:49 +03:00
Jill dbcbc873b4
bump to 1.3 2023-08-29 13:48:06 +03:00
Jill ee2bb2d769
fix gmod logo option 2023-08-29 13:46:54 +03:00
Jill f6f8d096c1
update readme 2023-08-29 04:19:01 +03:00
5 changed files with 38 additions and 51 deletions

View File

@ -1 +1,2 @@
- Ported to 1.20.1 1.20.1-specific fix:
- Fix the GMod logo option

View File

@ -1,6 +1,4 @@
<center> <h1><img src="./docs/icon.png" width="32" height="32">&nbsp;GMod Title Screen</h1>
<h1 style="vertical-align:center"><img src="./docs/icon.png" width="32"> GMod Title Screen</h1>
</center>
Transforms the usual Minecraft title screen into one that looks highly reminiscent of Transforms the usual Minecraft title screen into one that looks highly reminiscent of
[Garry's Mod](https://store.steampowered.com/app/4000/Garrys_Mod/)'s title screen. Lightly configurable. Originally taken from a [Garry's Mod](https://store.steampowered.com/app/4000/Garrys_Mod/)'s title screen. Lightly configurable. Originally taken from a
@ -8,6 +6,12 @@ Transforms the usual Minecraft title screen into one that looks highly reminisce
![](./docs/screenshot1.png) ![](./docs/screenshot1.png)
<center>
<a href="https://legacy.curseforge.com/minecraft/mc-mods/gmod-title-screen"><img alt="curseforge" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/curseforge_vector.svg"></a>
<a href="https://modrinth.com/mod/gmod-title-screen"><img alt="modrinth" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg"></a>
<img alt="forge" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/unsupported/forge_vector.svg">
</center>
--- ---
Currently, there is no way to change the backgrounds (at least, without having to abide by the resolution and amount Currently, there is no way to change the backgrounds (at least, without having to abide by the resolution and amount

View File

@ -2,7 +2,7 @@ plugins {
id 'fabric-loom' version '1.0-SNAPSHOT' id 'fabric-loom' version '1.0-SNAPSHOT'
id 'maven-publish' id 'maven-publish'
id 'io.github.juuxel.loom-quiltflower' version '1.7.+' id 'io.github.juuxel.loom-quiltflower' version '1.7.+'
id 'me.hypherionmc.cursegradle' version '2.+' id 'net.darkhax.curseforgegradle' version '1.+'
id "com.modrinth.minotaur" version "2.+" id "com.modrinth.minotaur" version "2.+"
} }
@ -100,32 +100,30 @@ publishing {
import com.modrinth.minotaur.dependencies.ModDependency import com.modrinth.minotaur.dependencies.ModDependency
curseforge { task curseforge(type: net.darkhax.curseforgegradle.TaskPublishCurseForge) {
if (!file('./CHANGELOG.md').canRead()) { throw new FileNotFoundException("Could not read changelog file") } if (!file('./CHANGELOG.md').canRead()) { throw new FileNotFoundException("Could not read changelog file") }
apiKey = project.hasProperty("CURSEFORGE_TOKEN") ? project.CURSEFORGE_TOKEN : ""
project {
id = '699839'
changelog = file('./CHANGELOG.md')
changelogType = 'markdown'
releaseType = 'release'
accepted_minecraft_version.split(",").each {
addGameVersion it.trim()
}
mainArtifact(remapJar) { apiToken = project.hasProperty("CURSEFORGE_TOKEN") ? project.CURSEFORGE_TOKEN : ""
displayName = "${mod_version_friendly}"
relations { disableVersionDetection()
requiredDependency 'fabric-api'
requiredDependency 'cloth-config' def mainFile = upload('699839', jar)
optionalDependency 'modmenu' mainFile.displayName = "${mod_version_friendly}"
} mainFile.changelog = file('./CHANGELOG.md')
} mainFile.changelogType = 'markdown'
} mainFile.releaseType = 'release'
options {
//debug = true mainFile.addModLoader('fabric', 'quilt')
javaVersionAutoDetect = false
forgeGradleIntegration = false accepted_minecraft_version.split(",").each {
mainFile.addGameVersion it.trim()
} }
mainFile.addRelation('fabric-api', 'requiredDependency')
mainFile.addRelation('cloth-config', 'requiredDependency')
mainFile.addRelation('modmenu', 'optionalDependency')
//debugMode = true
} }
modrinth { modrinth {

View File

@ -9,8 +9,8 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.14.22 loader_version=0.14.22
# Mod Properties # Mod Properties
mod_version = 1.2+1.20.1 mod_version = 1.3+1.20.1
mod_version_friendly = 1.2 for 1.20.1 mod_version_friendly = 1.3 for 1.20.1
maven_group = zone.oat maven_group = zone.oat
archives_base_name = gmod-title-screen archives_base_name = gmod-title-screen

View File

@ -1,5 +1,6 @@
package zone.oat.gmodtitlescreen.screen; package zone.oat.gmodtitlescreen.screen;
import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.systems.RenderSystem;
import com.terraformersmc.modmenu.gui.ModsScreen; import com.terraformersmc.modmenu.gui.ModsScreen;
import net.fabricmc.api.EnvType; import net.fabricmc.api.EnvType;
@ -325,41 +326,24 @@ public class CustomTitleScreen extends Screen {
ctx.fill(0, this.height - 24, this.width, this.height, 0x70111111); ctx.fill(0, this.height - 24, this.width, this.height, 0x70111111);
if (Mod.config.showGModLogo) { if (Mod.config.showGModLogo) {
/*RenderSystem.setShader(GameRenderer::getPositionTexProgram); RenderSystem.setShader(GameRenderer::getPositionTexProgram);
//RenderSystem.defaultBlendFunc(); //RenderSystem.defaultBlendFunc();
RenderSystem.enableBlend(); RenderSystem.enableBlend();
RenderSystem.blendFunc(GlStateManager.SrcFactor.ONE, GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA); RenderSystem.blendFunc(GlStateManager.SrcFactor.ONE, GlStateManager.DstFactor.ONE_MINUS_SRC_ALPHA);
RenderSystem.setShaderTexture(0, GMOD_TITLE_TEXTURE);
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
this.drawTexture(ctx, logoX, logoY, 0, 0, 256, 256); ctx.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
ctx.drawTexture(GMOD_TITLE_TEXTURE, logoX, logoY, 0.0F, 0.0F, 256, 256, 256, 256);
RenderSystem.disableBlend(); RenderSystem.disableBlend();
RenderSystem.defaultBlendFunc();*/ RenderSystem.defaultBlendFunc();
} else { } else {
logoDrawer.draw(ctx, logoXMiddle, 1.0f, logoY); logoDrawer.draw(ctx, logoXMiddle, 1.0f, logoY);
} }
/*
RenderSystem.setShaderTexture(0, EDITION_TITLE_TEXTURE);
drawTexture(matrices, logoX + 88, logoY + 37, 0.0F, 0.0F, 98, 14, 128, 16);
*/
if (this.splashText != null && Mod.config.showSplashText) { if (this.splashText != null && Mod.config.showSplashText) {
this.splashText.render(ctx, logoXMiddle, this.textRenderer, 0xFF000000); this.splashText.render(ctx, logoXMiddle, this.textRenderer, 0xFF000000);
} }
/*if (this.splashText != null && Mod.config.showSplashText) {
matrices.push();
matrices.translate(getSplashTextX(), logoY + getLogoHeight() - 10, 0.0);
matrices.multiply(RotationAxis.POSITIVE_Z.rotationDegrees(-20.0F));
float h = 1.8F - MathHelper.abs(MathHelper.sin((float)(Util.getMeasuringTimeMs() % 1000L) / 1000.0F * (float) (Math.PI * 2)) * 0.1F);
h = h * 100.0F / (float)(this.textRenderer.getWidth(this.splashText) + 32);
matrices.scale(h, h, h);
drawCenteredTextWithShadow(matrices, this.textRenderer, this.splashText, 0, -8, 16776960);
matrices.pop();
}*/
super.render(ctx, mouseX, mouseY, delta); super.render(ctx, mouseX, mouseY, delta);
} }
} }