Skip to content

Commit

Permalink
1.19.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MORIMORI0317 committed Mar 19, 2023
1 parent a83da93 commit df5eef3
Show file tree
Hide file tree
Showing 13 changed files with 111 additions and 71 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/builder.yml

This file was deleted.

20 changes: 20 additions & 0 deletions .github/workflows/released.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
uses: TeamFelnull/actions-reusable-workflows/.github/workflows/mcmod-release.yml@master
with:
build_tasks: "build curseforge modrinth"
secrets:
curseforge_token: ${{ secrets.CURESFORGEAPIKEY }}
modrinth_token: ${{ secrets.MODRINTH }}

postRelease:
name: Update after release
needs: release
uses: TeamFelnull/actions-reusable-workflows/.github/workflows/mcmod-post-release.yml@master
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Changelog

Changelog to track updates for this mod.
Add your changes to Unreleased if you want to commit.
Please write according to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## [Unreleased]

### Added

### Changed

- Port MC1.19.4

### Deprecated

### Removed

### Fixed

### Security

[Unreleased]: https://github.com/MORIMORI0317/MemoryUsageScreen/commits
11 changes: 11 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
plugins {
id "architectury-plugin" version "3.4.+"
id "dev.architectury.loom" version "1.0.+" apply false
id 'org.jetbrains.changelog' version "2.0.0"
}

changelog {
repositoryUrl = rootProject.repository_url
introduction = """
Changelog to track updates for this mod.
Add your changes to Unreleased if you want to commit.
Please write according to [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
"""
combinePreReleases = false
}

architectury {
Expand Down
4 changes: 3 additions & 1 deletion fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ curseforge {
project {
id = "${rootProject.curesforge_id}"

changelog = '';
changelogType = 'markdown'
changelog = file('../LATEST_CHANGELOG.md')

releaseType = "${rootProject.release_type}"
addGameVersion "${rootProject.minecraft_version}"
Expand Down Expand Up @@ -143,5 +144,6 @@ if (System.getenv('modrinthapikey') != null && "${project.modrinth_id}" != '') {
required.project("P7dR8mSH")//Fabric API
optional.project("9s6osm5g")//Cloth Config API
}
changelog = file('../LATEST_CHANGELOG.md').text
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@
import net.fabricmc.fabric.api.client.rendering.v1.HudRenderCallback;
import net.fabricmc.fabric.api.client.screen.v1.ScreenEvents;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiComponent;
import net.minecraft.client.gui.screens.Screen;
import net.morimori0317.mus.api.MemoryUsageScreenAPI;
import net.morimori0317.mus.handler.ClientHandler;
import net.morimori0317.mus.handler.RenderHandler;

import java.util.Arrays;

public class RenderHandlerFabric {
public static void init() {
ScreenEvents.AFTER_INIT.register(RenderHandlerFabric::onScreenAfterInit);
HudRenderCallback.EVENT.register(RenderHandlerFabric::onHudRender);
}

private static void onScreenAfterInit(Minecraft client, Screen screen, int scaledWidth, int scaledHeight) {
if (MemoryUsageScreenAPI.getInstance().isEnableScreen(screen))
ScreenEvents.afterRender(screen).register((screen1, matrices, mouseX, mouseY, tickDelta) -> RenderHandler.onScreenRender(matrices, screen1, tickDelta));
/* if (MemoryUsageScreenAPI.getInstance().isEnableScreen(screen))
ScreenEvents.afterRender(screen).register((screen1, matrices, mouseX, mouseY, tickDelta) -> RenderHandler.onScreenRender(matrices, screen1, tickDelta));*/

ClientHandler.onScreenInit(screen);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package net.morimori0317.mus.fabric.mixin;

import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.gui.screens.Screen;
import net.morimori0317.mus.api.MemoryUsageScreenAPI;
import net.morimori0317.mus.handler.RenderHandler;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;

@Mixin(Screen.class)
public class ScreenMixin {
@Inject(method = "renderWithTooltip", at = @At("TAIL"))
private void renderWithTooltip(PoseStack poseStack, int i, int j, float f, CallbackInfo ci) {
var thiz = (Screen) (Object) this;
if (MemoryUsageScreenAPI.getInstance().isEnableScreen(thiz))
RenderHandler.onScreenRender(poseStack, thiz, f);
}
}
Binary file modified fabric/src/main/resources/assets/memoryusagescreen/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 3 additions & 2 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@
]
},
"mixins": [
"memoryusagescreen-common.mixins.json"
"memoryusagescreen-common.mixins.json",
"memoryusagescreen.mixins.json"
],
"depends": {
"fabric": "*",
"minecraft": ">=1.19"
"minecraft": ">=1.19.4"
}
}
12 changes: 12 additions & 0 deletions fabric/src/main/resources/memoryusagescreen.mixins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"required": true,
"package": "net.morimori0317.mus.fabric.mixin",
"compatibilityLevel": "JAVA_17",
"minVersion": "0.8",
"client": [
"ScreenMixin"
],
"injectors": {
"defaultRequire": 1
}
}
4 changes: 3 additions & 1 deletion forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ curseforge {
project {
id = "${rootProject.curesforge_id}"

changelog = '';
changelogType = 'markdown'
changelog = file('../LATEST_CHANGELOG.md')

releaseType = "${rootProject.release_type}"
addGameVersion "${rootProject.minecraft_version}"
Expand Down Expand Up @@ -119,5 +120,6 @@ if (System.getenv('modrinthapikey') != null && "${project.modrinth_id}" != '') {
uploadFile = file("${project.buildDir}/libs/${rootProject.archives_base_name}-${project.name}-mc${rootProject.minecraft_version}-${project.mod_version}.jar")
gameVersions = List.of(project.support_versions.split(","))
loaders = ["forge"]
changelog = file('../LATEST_CHANGELOG.md').text
}
}
Binary file modified forge/src/main/resources/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 11 additions & 9 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
org.gradle.jvmargs=-Xmx6152M

minecraft_version=1.19.3
support_versions=1.19.3
minecraft_version=1.19.4
support_versions=1.19.4
enabled_platforms=fabric,forge

archives_base_name=memoryusagescreen
mod_display_name=MemoryUsageScreen
mod_version=1.7.0
mod_version=1.8.0
maven_group=net.morimori0317

architectury_version=7.0.65
cloth_config_version=9.0.94
cloth_config_version=10.0.96

fabric_loader_version=0.14.11
fabric_api_version=0.69.1+1.19.3
mod_menu_version=5.0.2
fabric_loader_version=0.14.17
fabric_api_version=0.76.0+1.19.4
mod_menu_version=6.1.0-rc.4

forge_version=1.19.3-44.0.30
forge_version=1.19.4-45.0.6

curesforge_id=500009
modrinth_id=n9mFA0ax
release_type=release


repository_url=https://github.com/MORIMORI0317/MemoryUsageScreen


0 comments on commit df5eef3

Please sign in to comment.