Skip to content

Commit

Permalink
WIP Can't use!!!
Browse files Browse the repository at this point in the history
  • Loading branch information
Wulian233 authored Jul 27, 2024
1 parent d1880f3 commit 1128d0e
Show file tree
Hide file tree
Showing 20 changed files with 125 additions and 37 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div align="center"><img height="150" src="https://cdn.modrinth.com/data/DnL1AGAI/517a08d79d7949cc6ae49a8ee66ad967e962809d.png" width="150"/>
<div align="center"><img height="150" src="common/src/main/resources/icon.png" width="150"/>

# Chat Impressive Animation

Expand All @@ -9,7 +9,7 @@

[Chat Animation](https://github.com/Ezzenix/ChatAnimation) unofficial architectury port.

Makes chat messages appear with a smooth animation.
This mod makes the chat look better by adding animations. Such as opening chat, sending messages. It also removes the message indicator.

<a href="https://modrinth.com/project/chat-impressive-animation/">
<img alt="modrinth" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg">
Expand All @@ -22,19 +22,21 @@ Makes chat messages appear with a smooth animation.

## 📖 What's this mod?

Chat Impressive Animation(CIA) is [Chat Animation](https://github.com/Ezzenix/ChatAnimation) unofficial architectury port, now available on Fabric Forge and Neoforge. This mod makes the chat look better by adding animations. It also removes the message indicator.
Chat Impressive Animation(CIA) is [Chat Animation](https://github.com/Ezzenix/ChatAnimation) unofficial architectury port, now available on Fabric Forge and Neoforge.

This mod makes the chat look better by adding animations. Such as opening chat, sending messages. It also removes the message indicator.

## ✅ Features:

- Open chat animation
- Message sending animation(mc1.20.x Forge unsupport)
- Message sending animation (Unsupported 1.20.x Forge)
- Removes the message indicator(mc1.19.1+)

## ✨ Screenshots

<img src="https://s11.ax1x.com/2024/02/19/pFYJyw9.jpg"></img>
<img src="img/message-indicator.jpg" width="550"/>

<img src="https://vmct-cn.top/img/CIA-preview.gif"></img>
<img src="img/preview.gif" width="350"/>

## 📖 Usage

Expand All @@ -44,4 +46,4 @@ Install Architectury API mod and this mod, then you can use it!

## 👀 License

This mod is available under [the MIT license](LICENSE).
This mod is available under the [MIT license](LICENSE).
15 changes: 9 additions & 6 deletions README_ZH.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div align="center"><img height="150" src="https://cdn.modrinth.com/data/DnL1AGAI/517a08d79d7949cc6ae49a8ee66ad967e962809d.png" width="150"/>
<div align="center"><img height="150" src="common/src/main/resources/icon.png" width="150"/>

# 聊动魅影

Expand All @@ -9,7 +9,7 @@

本模组是[Chat Animation](https://github.com/Ezzenix/ChatAnimation) 的非官方移植。

为聊天添加了一些平滑的淡入动画
添加了一些关于聊天栏的动画,如打开聊天栏,发送消息等。同时删除了提示类消息左侧的白条

<a href="https://modrinth.com/project/chat-impressive-animation/">
<img alt="modrinth" height="56" src="https://cdn.jsdelivr.net/npm/@intergrav/devins-badges@3/assets/cozy/available/modrinth_vector.svg">
Expand All @@ -22,7 +22,10 @@

## 📖 这个模组是什么?

聊动魅影(英文缩写CIA)是[Chat Animation](https://github.com/Ezzenix/ChatAnimation)的非官方移植版,现可在Fabric Forge和Neoforge使用。这个模组添加了一些关于聊天栏的动画,并且删除提示类消息左侧的白条。
聊动魅影(英文缩写CIA)是[Chat Animation](https://github.com/Ezzenix/ChatAnimation)的非官方移植版,现可在Fabric Forge和Neoforge使用。

这个模组添加了一些关于聊天栏的动画,如打开聊天栏,发送消息等。同时删除了提示类消息左侧的白条


## ✅ 功能:

Expand All @@ -32,9 +35,9 @@

## ✨ 截图

<img src="https://s11.ax1x.com/2024/02/19/pFYJyw9.jpg"></img>
<img src="img/message-indicator.jpg" width="550"/>

<img src="https://vmct-cn.top/img/CIA-preview.gif"></img>
<img src="img/preview.gif" width="350"/>

## 📖 使用

Expand All @@ -44,4 +47,4 @@

## 👀 协议

此模组使用MIT协议
此模组使用MIT许可证
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ allprojects {
group = rootProject.maven_group

repositories {
}
}

tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
Expand Down
3 changes: 1 addition & 2 deletions common/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies {
// Do NOT use other classes from fabric loader
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modApi "dev.architectury:architectury:${rootProject.architectury_version}"
modApi "me.shedaniel.cloth:cloth-config:${rootProject.clothconfig_version}"

compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.0"))
}
Expand All @@ -19,8 +20,6 @@ publishing {
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.wulian.chatimpressiveanimation.config;

import com.wulian.chatimpressiveanimation.ChatImpressiveAnimation;
import me.shedaniel.autoconfig.AutoConfig;
import me.shedaniel.autoconfig.ConfigData;
import me.shedaniel.autoconfig.annotation.Config;
import me.shedaniel.autoconfig.serializer.GsonConfigSerializer;
import net.minecraft.client.gui.screen.Screen;

@Config(name = ChatImpressiveAnimation.MOD_ID)
public class ModConfigs implements ConfigData {
public boolean enableOpenChatAnimation = true;
public boolean enableChatSendingAnimation = true;
public boolean removeMessageIndicator = true;

public static ModConfigs createConfig() {
return AutoConfig.register(ModConfigs.class, GsonConfigSerializer::new).getConfig();
}

public static Screen createConfigScreen(Screen parent) {
return AutoConfig.getConfigScreen(ModConfigs.class, parent).get();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.wulian.chatimpressiveanimation.mixin;

import com.wulian.chatimpressiveanimation.config.ModConfigs;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.screen.ChatScreen;
Expand All @@ -17,7 +18,7 @@ public class ChatScreenMixin {

@Inject(method = "render", at = @At("HEAD"))
private void render(DrawContext context, int mouseX, int mouseY, float delta, CallbackInfo ci) {
MinecraftClient client = MinecraftClient.getInstance();
MinecraftClient client = MinecraftClient.getInstance();
if (client.player != null) {
if (!wasOpenedLastFrame && !client.player.isSleeping()) {
wasOpenedLastFrame = true;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"modmenu.nameTranslation.chatimpressiveanimation": "Chat Impressive Animation",
"modmenu.descriptionTranslation.chatimpressiveanimation": "This mod makes the chat look better by adding animations. Such as opening chat, sending messages. It also removes the message indicator.",

"text.autoconfig.chatimpressiveanimation.title": "Chat Impressive Animation",
"text.autoconfig.chatimpressiveanimation.option.enableOpenChatAnimation": "Enable open chat animation",
"text.autoconfig.chatimpressiveanimation.option.enableChatSendingAnimation": "Enable message sending animation",
"text.autoconfig.chatimpressiveanimation.option.removeMessageIndicator": "Removes the message indicator"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"modmenu.nameTranslation.chatimpressiveanimation": "聊动魅影",
"modmenu.descriptionTranslation.chatimpressiveanimation": "添加了一些关于聊天栏的动画,如打开聊天栏,发送消息等。同时删除了提示类消息左侧的白条",

"text.autoconfig.chatimpressiveanimation.title": "聊动魅影",
"text.autoconfig.chatimpressiveanimation.option.enableOpenChatAnimation": "启用打开聊天栏动画",
"text.autoconfig.chatimpressiveanimation.option.enableChatSendingAnimation": "启用消息发送动画",
"text.autoconfig.chatimpressiveanimation.option.removeMessageIndicator": "删除提示类消息左侧的白条"
}
11 changes: 9 additions & 2 deletions fabric/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ configurations {
developmentFabric.extendsFrom common
}

repositories {
maven { url "https://maven.terraformersmc.com/releases/" }
maven { url "https://maven.nucleoid.xyz/" }
}

dependencies {
modImplementation "net.fabricmc:fabric-loader:${rootProject.fabric_loader_version}"
modApi "net.fabricmc.fabric-api:fabric-api:${rootProject.fabric_api_version}"
Expand All @@ -25,6 +30,10 @@ dependencies {

common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionFabric")) { transitive false }

modApi "me.shedaniel.cloth:cloth-config-fabric:${rootProject.clothconfig_version}"
modApi "com.terraformersmc:modmenu:${rootProject.modmenu_version}"
modApi "eu.pb4:placeholder-api:${rootProject.placeholder_api_version}"
}

processResources {
Expand Down Expand Up @@ -72,8 +81,6 @@ publishing {
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package com.wulian.chatimpressiveanimation.fabric;

import com.terraformersmc.modmenu.api.ConfigScreenFactory;
import com.terraformersmc.modmenu.api.ModMenuApi;
import me.shedaniel.autoconfig.AutoConfig;
import com.wulian.chatimpressiveanimation.config.ModConfigs;

public class ModMenuCompat implements ModMenuApi{
@Override
public ConfigScreenFactory<?> getModConfigScreenFactory() {
return screen -> AutoConfig.getConfigScreen(ModConfigs.class, screen).get();
}
}



18 changes: 11 additions & 7 deletions fabric/src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "chatimpressiveanimation",
"version": "${version}",
"name": "Chat Impressive Animation",
"description": "Makes chat messages appear with a smooth animation.",
"description": "This mod makes the chat look better by adding animations. Such as opening chat, sending messages. It also removes the message indicator.",
"authors": [
"Wulian233, TexTrue"
],
Expand All @@ -16,17 +16,21 @@
"icon": "icon.png",
"environment": "client",
"entrypoints": {
"client": [
"com.wulian.chatimpressiveanimation.fabric.ChatImpressiveAnimationClientFabric"
]
"client": [
"com.wulian.chatimpressiveanimation.fabric.ChatImpressiveAnimationClientFabric"
],
"modmenu": [
"com.wulian.chatimpressiveanimation.fabric.ModMenuCompat"
]
},
"mixins": [
"chatimpressiveanimation.mixins.json",
"chatimpressiveanimation.fabric.mixins.json"
],
"depends": {
"fabricloader": ">=0.15.0",
"minecraft": ">=1.19.1",
"architectury": "*"
"fabricloader": ">=0.15.0",
"minecraft": ">=1.20",
"architectury": "*",
"cloth-config": "*"
}
}
Binary file added fabric/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.
Binary file added fabric/src/main/resources/main/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 3 additions & 4 deletions forge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ configurations {
dependencies {
forge "net.minecraftforge:forge:${rootProject.forge_version}"
modApi "dev.architectury:architectury-forge:${rootProject.architectury_version}"
modApi "me.shedaniel.cloth:cloth-config-forge:${rootProject.clothconfig_version}"

// only forge, because fabric & neoforge include mixinextras
compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.3.5"))
implementation(include("io.github.llamalad7:mixinextras-forge:0.3.5"))
compileOnly(annotationProcessor("io.github.llamalad7:mixinextras-common:0.4.0"))
implementation(include("io.github.llamalad7:mixinextras-forge:0.4.0"))

common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
Expand Down Expand Up @@ -89,8 +90,6 @@ publishing {
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}
9 changes: 8 additions & 1 deletion forge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ displayName = "Chat Impressive Animation"
displayURL = "https://github.com/Wulian233/Chat-Impressive-Animation/"
authors = "Wulian233, TexTrue"
description = '''
Makes chat messages appear with a smooth animation.
This mod makes the chat look better by adding animations. Such as opening chat, sending messages. It also removes the message indicator.
'''
logoFile = "icon.png"

Expand All @@ -34,3 +34,10 @@ logoFile = "icon.png"
versionRange = "*"
ordering = "AFTER"
side = "BOTH"

[[dependencies.chatimpressiveanimation]]
modId = "cloth_config"
mandatory = true
versionRange = "*"
ordering = "AFTER"
side = "BOTH"
7 changes: 5 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ enabled_platforms=fabric,forge,neoforge
yarn_mappings=1.20.4+build.3

archives_base_name=ChatImpressiveAnimation
mod_version=1.0
mod_version=1.1.0
maven_group=com.wulian.chatimpressiveanimation

architectury_version=11.1.17
modmenu_version=9.2.0
placeholder_api_version=2.4.0-pre.1+1.20.4
clothconfig_version=13.0.121

fabric_loader_version=0.16.0
fabric_api_version=0.97.1+1.20.4

forge_version=1.20.4-49.1.4

neoforge_version=20.4.237
neoforge_version=20.4.237
Binary file added img/message-indicator.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions neoforge/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ repositories {
dependencies {
neoForge "net.neoforged:neoforge:${rootProject.neoforge_version}"
modApi "dev.architectury:architectury-neoforge:${rootProject.architectury_version}"
modApi "me.shedaniel.cloth:cloth-config-neoforge:${rootProject.clothconfig_version}"

common(project(path: ":common", configuration: "namedElements")) { transitive false }
shadowCommon(project(path: ":common", configuration: "transformProductionForge")) { transitive = false }
Expand Down Expand Up @@ -75,8 +76,6 @@ publishing {
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
}
}
11 changes: 9 additions & 2 deletions neoforge/src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ displayName = "Chat Impressive Animation"
displayURL = "https://github.com/Wulian233/Chat-Impressive-Animation"
authors = "Wulian233, TexTrue"
description = '''
Makes chat messages appear with a smooth animation.
This mod makes the chat look better by adding animations. Such as opening chat, sending messages. It also removes the message indicator.
'''
logoFile = "icon.png"

Expand All @@ -23,7 +23,7 @@ config = "chatimpressiveanimation.neoforge.mixins.json"
[[dependencies.chatimpressiveanimation]]
modId = "minecraft"
type = "required"
versionRange = "[1.20.2,1.20.4]"
versionRange = "[1.20.1,1.20.4]"
ordering = "NONE"
side = "BOTH"

Expand All @@ -33,3 +33,10 @@ type = "required"
versionRange = "*"
ordering = "AFTER"
side = "BOTH"

[[dependencies.chatimpressiveanimation]]
modId = "cloth_config"
type = "required"
versionRange = "*"
ordering = "AFTER"
side = "BOTH"

0 comments on commit 1128d0e

Please sign in to comment.