-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.20.3/4 support; add config; import polish
- Loading branch information
Showing
31 changed files
with
191 additions
and
236 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
common/src/main/java/com/wulian/chatimpressiveanimation/config/ConfigUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package com.wulian.chatimpressiveanimation.config; | ||
|
||
import me.shedaniel.autoconfig.AutoConfig; | ||
import me.shedaniel.autoconfig.serializer.GsonConfigSerializer; | ||
|
||
public class ConfigUtil { | ||
private static ModConfigs modConfigs; | ||
|
||
public static ModConfigs getConfig() { | ||
if (modConfigs == null) { | ||
AutoConfig.register(ModConfigs.class, GsonConfigSerializer::new); | ||
modConfigs = AutoConfig.getConfigHolder(ModConfigs.class).getConfig(); | ||
} | ||
return modConfigs; | ||
} | ||
} |
13 changes: 1 addition & 12 deletions
13
common/src/main/java/com/wulian/chatimpressiveanimation/config/ModConfigs.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,12 @@ | ||
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 enableOpenChatAnimation = 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(); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
common/src/main/java/com/wulian/chatimpressiveanimation/mixin/ChatHudLineVisibleMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package com.wulian.chatimpressiveanimation.mixin; | ||
|
||
import com.wulian.chatimpressiveanimation.config.ConfigUtil; | ||
import net.minecraft.client.gui.hud.ChatHudLine; | ||
import net.minecraft.client.gui.hud.MessageIndicator; | ||
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.CallbackInfoReturnable; | ||
|
||
@Mixin(ChatHudLine.Visible.class) | ||
public class ChatHudLineVisibleMixin { | ||
@Inject(method = "indicator", at = @At("HEAD"), cancellable = true) | ||
private void injectIndicator(CallbackInfoReturnable<MessageIndicator> cir) { | ||
if (ConfigUtil.getConfig().removeMessageIndicator){ | ||
cir.setReturnValue(null); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
common/src/main/resources/assets/chatimpressiveanimation/lang/en_ud.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"modmenu.nameTranslation.chatimpressiveanimation": "uoı̣ʇɐɯı̣uⱯ ǝʌı̣ssǝɹdɯI ʇɐɥƆ", | ||
"modmenu.descriptionTranslation.chatimpressiveanimation": "˙ɹoʇɐɔı̣puı̣ ǝƃɐssǝɯ ǝɥʇ sǝʌoɯǝɹ osןɐ ʇI ˙sǝƃɐssǝɯ ƃuı̣puǝs 'ʇɐɥɔ ƃuı̣uǝdo sɐ ɥɔnS ˙suoı̣ʇɐɯı̣uɐ ƃuı̣ppɐ ʎq ɹǝʇʇǝq ʞooן ʇɐɥɔ ǝɥʇ sǝʞɐɯ poɯ sı̣ɥꓕ", | ||
|
||
"text.autoconfig.chatimpressiveanimation.title": "uoı̣ʇɐɯı̣uⱯ ǝʌı̣ssǝɹdɯI ʇɐɥƆ", | ||
"text.autoconfig.chatimpressiveanimation.option.enableChatSendingAnimation": "uoı̣ʇɐɯı̣uɐ ƃuı̣puǝs ǝƃɐssǝɯ ǝןqɐuƎ", | ||
"text.autoconfig.chatimpressiveanimation.option.enableOpenChatAnimation": "uoı̣ʇɐɯı̣uɐ ʇɐɥɔ uǝdo ǝןqɐuƎ", | ||
"text.autoconfig.chatimpressiveanimation.option.removeMessageIndicator": "ɹoʇɐɔı̣puı̣ ǝƃɐssǝɯ ǝɥʇ sǝʌoɯǝꓤ" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
common/src/main/resources/assets/chatimpressiveanimation/lang/zh_hk.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.enableChatSendingAnimation": "啟用消息發送動畫", | ||
"text.autoconfig.chatimpressiveanimation.option.enableOpenChatAnimation": "啟用打開聊天欄動畫", | ||
"text.autoconfig.chatimpressiveanimation.option.removeMessageIndicator": "刪除提示類消息左側的白條" | ||
} |
9 changes: 9 additions & 0 deletions
9
common/src/main/resources/assets/chatimpressiveanimation/lang/zh_tw.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.enableChatSendingAnimation": "啟用消息發送動畫", | ||
"text.autoconfig.chatimpressiveanimation.option.enableOpenChatAnimation": "啟用打開聊天欄動畫", | ||
"text.autoconfig.chatimpressiveanimation.option.removeMessageIndicator": "刪除提示類消息左側的白條" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.