Skip to content

Commit

Permalink
migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
KrLite committed Apr 21, 2024
1 parent 519e762 commit 91e5fdc
Show file tree
Hide file tree
Showing 19 changed files with 124 additions and 74 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/build.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/call_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: Build

on: [ pull_request, push, workflow_dispatch ]

jobs:
call-workflow:
uses: KessokuTeaTime/.github/.github/workflows/build.yml@main
15 changes: 15 additions & 0 deletions .github/workflows/call_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Publish Release

on:
workflow_dispatch:
release:
types:
- published

permissions:
contents: write

jobs:
call-workflow:
uses: KessokuTeaTime/.github/.github/workflows/release.yml@main
secrets: inherit
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
### Changes

- Unified publishing using **modpublisher.**
- Jar name migrate: `{id}-{mcversion}-{modversion}` -> `{id}-{modversion}-{loader}{mcversion}`.
- Tag name migrate: `{id}-{modversion}-mc{mcversion}` -> `{id}-{modversion}-{loader}{mcversion}`.

### Ownership Transfer

- **Transferred** ownership to **[Kessoku Tea Time.](https://github.com/KessokuTeaTime)**
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### <p align=right>[`` Modrinth](https://modrinth.com/mod/tapestop)</p>
### <p align=right>[`` CurseForge](https://www.curseforge.com/minecraft/mc-mods/tapestop)&ensp;[`` Modrinth](https://modrinth.com/mod/tapestop)</p>

# Tape Stop

At your wish! **Tape Stop** prevents the game from rendering as you leave, which may result in a much better performance when you left the game window alone.

You can configure a various of things in the **Mod Menu.** Generously, **Tape Stop** provides 2 ways to decorate your window when the game stopped rendering.
You can configure various things through the **Mod Menu.** Generously, **Tape Stop** provides 2 ways to decorate your window when the game stopped rendering.

<blockquote>
<ol>
Expand Down
53 changes: 49 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
class Display {
lateinit var name: String
lateinit var loader: String
lateinit var version: String
}

var display: Display = Display()

plugins {
base
java
idea
`maven-publish`
alias(libs.plugins.fabric.loom)
alias(libs.plugins.modpublisher)
}

group = libs.versions.maven.group.get()
version = "${libs.versions.minecraft.get()}-${libs.versions.mod.get()}"
version = "${libs.versions.mod.get()}-${libs.versions.loader.get()}${libs.versions.minecraft.get()}"

display.name = libs.versions.display.name.get()
display.loader = libs.versions.display.loader.get()
display.version = libs.versions.display.version.get()

base {
archivesName.set(libs.versions.archives.name)
Expand Down Expand Up @@ -38,10 +51,11 @@ java {

tasks {
processResources {
inputs.property("version", libs.versions.mod.get())

filesMatching("fabric.mod.json") {
expand(mapOf("version" to libs.versions.mod.get()))
expand(mapOf(
"version" to libs.versions.mod.get(),
"display" to display
))
}
}

Expand All @@ -60,3 +74,34 @@ publishing {
repositories {
}
}

publisher {
apiKeys {
modrinth(System.getenv("MODRINTH_TOKEN"))
curseforge(System.getenv("CURSEFORGE_TOKEN"))
}

modrinthID.set(libs.versions.id.modrinth)
curseID.set(libs.versions.id.curseforge)

versionType.set("release")
projectVersion.set(project.version.toString())
gameVersions.set(listOf("1.20", "1.20.1", "1.20.2", "1.20.3", "1.20.4"))
loaders.set(listOf("fabric", "quilt"))
curseEnvironment.set("client")

modrinthDepends.required("fabric-api")
modrinthDepends.optional()
modrinthDepends.embedded()

curseDepends.required("fabric-api")
curseDepends.optional()
curseDepends.embedded()

displayName.set("${display.name} ${libs.versions.mod.get()} for ${display.loader} ${display.version}")

artifact.set(tasks.remapJar)
addAdditionalFile(tasks.remapSourcesJar)

changelog.set(file("CHANGELOG.md"))
}
18 changes: 15 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
[versions]
maven-group = "net.krlite"
archives-name = "tapestop"
mod = "3.0.1"
mod = "3.1.0"
loader = "fabric"

minecraft = "1.20"
yarn = "1.20+build.1"
fabric-loader = "0.15.7"
fabric-loader = "0.15.10"
fabric-api = "0.83.0+1.20"
fabric-loom = "1.5-SNAPSHOT"
fabric-loom = "1.6-SNAPSHOT"
modpublisher = "2.1.0"

cloth-config = "11.1.118"
modmenu = "7.0.1"

# id
id-modrinth = "i6WipvFw"
id-curseforge = "998433"

# display
display-name = "Tape Stop"
display-loader = "Fabric"
display-version = "1.20.x"

[libraries]
minecraft = { group = "com.mojang", name = "minecraft", version.ref = "minecraft" }
yarn = { group = "net.fabricmc", name = "yarn", version.ref = "yarn" }
Expand All @@ -23,6 +34,7 @@ modmenu = { group = "com.terraformersmc", name = "modmenu", version.ref = "modme

[plugins]
fabric-loom = { id = "fabric-loom", version.ref = "fabric-loom" }
modpublisher = { id = "com.hypherionmc.modutils.modpublisher", version.ref = "modpublisher" }

[bundles]
fabric = ["fabric-loader", "fabric-api"]
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pluginManagement {
name = "Fabric"
url = uri("https://maven.fabricmc.net/")
}
maven { url = uri("https://maven.firstdark.dev/releases") } // modpublisher
mavenCentral()
gradlePluginPortal()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.krlite.tapestop;
package band.kessokuteatime.tapestop;

import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.ConfigHolder;
import me.shedaniel.autoconfig.serializer.Toml4jConfigSerializer;
import net.fabricmc.api.ModInitializer;
import net.krlite.tapestop.config.TapeStopConfig;
import band.kessokuteatime.tapestop.config.TapeStopConfig;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.RotatingCubeMapRenderer;
import net.minecraft.client.gui.screen.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package net.krlite.tapestop;
package band.kessokuteatime.tapestop;

import com.mojang.blaze3d.platform.GlStateManager;
import com.mojang.blaze3d.systems.RenderSystem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.krlite.tapestop.config;
package band.kessokuteatime.tapestop.config;

import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
import me.shedaniel.autoconfig.annotation.ConfigEntry;
import me.shedaniel.clothconfig2.gui.entries.SelectionListEntry;
import net.krlite.tapestop.TapeStop;
import band.kessokuteatime.tapestop.TapeStop;
import org.jetbrains.annotations.NotNull;

@Config(name = "tapestop")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.krlite.tapestop.config.modmenu;
package band.kessokuteatime.tapestop.config.modmenu;

import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.shedaniel.autoconfig.AutoConfig;
import net.krlite.tapestop.TapeStop;
import net.krlite.tapestop.config.TapeStopConfig;
import band.kessokuteatime.tapestop.TapeStop;
import band.kessokuteatime.tapestop.config.TapeStopConfig;

public class TapeStopModMenuIntegration implements ModMenuApi {
@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.tapestop.mixin;
package band.kessokuteatime.tapestop.mixin;

import net.krlite.tapestop.TapeStop;
import band.kessokuteatime.tapestop.TapeStop;
import net.minecraft.client.Keyboard;
import net.minecraft.client.Mouse;
import org.spongepowered.asm.mixin.Mixin;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package net.krlite.tapestop.mixin;
package band.kessokuteatime.tapestop.mixin;

import com.mojang.blaze3d.systems.RenderSystem;
import com.mojang.blaze3d.systems.VertexSorter;
import net.krlite.tapestop.TapeStop;
import net.krlite.tapestop.TapeStopRenderer;
import net.krlite.tapestop.config.TapeStopConfig;
import band.kessokuteatime.tapestop.TapeStop;
import band.kessokuteatime.tapestop.TapeStopRenderer;
import band.kessokuteatime.tapestop.config.TapeStopConfig;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.render.GameRenderer;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.tapestop.mixin;
package band.kessokuteatime.tapestop.mixin;

import net.krlite.tapestop.TapeStop;
import band.kessokuteatime.tapestop.TapeStop;
import net.minecraft.client.MinecraftClient;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package net.krlite.tapestop.mixin;
package band.kessokuteatime.tapestop.mixin;

import net.krlite.tapestop.TapeStop;
import band.kessokuteatime.tapestop.TapeStop;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.RotatingCubeMapRenderer;
import net.minecraft.client.gui.screen.TitleScreen;
Expand Down
11 changes: 6 additions & 5 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@
"id": "tapestop",
"version": "${version}",

"name": "Tape Stop",
"name": "${display.name}",
"description": "Stops anything from rendering as you leave.",
"authors": [
"Kessoku Tea Time",
"KrLite"
],
"contact": {
"homepage": "https://modrinth.com/mod/tape-stop",
"sources": "https://github.com/KrLite/Mod.Tape-Stop",
"issues": "https://github.com/KrLite/Mod.Tape-Stop/issues"
"sources": "https://github.com/KessokuTeaTime/Tape-Stop",
"issues": "https://github.com/KessokuTeaTime/Tape-Stop/issues"
},

"license": "GPL-3.0",
Expand All @@ -20,10 +21,10 @@
"environment": "client",
"entrypoints": {
"main": [
"net.krlite.tapestop.TapeStop"
"band.kessokuteatime.tapestop.TapeStop"
],
"modmenu": [
"net.krlite.tapestop.config.modmenu.TapeStopModMenuIntegration"
"band.kessokuteatime.tapestop.config.modmenu.TapeStopModMenuIntegration"
]
},
"mixins": [
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/tapestop.mixins.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"minVersion": "0.8",
"package": "net.krlite.tapestop.mixin",
"package": "band.kessokuteatime.tapestop.mixin",
"compatibilityLevel": "JAVA_17",
"mixins": [
],
Expand Down

0 comments on commit 91e5fdc

Please sign in to comment.