Publish 1.0.0.2 to add reset to the chat color parser

This commit is contained in:
Zontreck 2022-10-13 19:08:49 -07:00
parent dbacec9b47
commit c3ed34322d
4 changed files with 14 additions and 4 deletions

View file

@ -5,4 +5,4 @@ org.gradle.daemon=false
mc_version=1.19.2 mc_version=1.19.2
forge_version=43.1.16 forge_version=43.1.16
myversion=1.0.0.1 myversion=1.0.0.2

View file

@ -23,7 +23,8 @@ public class ChatColor {
Bold, Bold,
Italic, Italic,
Strikethrough, Strikethrough,
Crazy Crazy,
Reset
} }
public static char CODE = '§'; public static char CODE = '§';
public static String BLACK = build("0"); public static String BLACK = build("0");
@ -164,6 +165,10 @@ public class ChatColor {
{ {
return CRAZY; return CRAZY;
} }
case Reset:
{
return RESET+WHITE;
}
default: default:
{ {
return RESET+CRAZY; return RESET+CRAZY;

View file

@ -10,12 +10,17 @@ public class ChatColorFactory {
public String build(){ public String build(){
return built; return built;
} }
public void reset()
{
built="";
append(ChatColor.resetChat());
}
public ColorBuilder(){} public ColorBuilder(){}
} }
private ColorBuilder instance; private ColorBuilder instance;
public ChatColorFactory reset() public ChatColorFactory reset()
{ {
instance.append(ChatColor.resetChat()); instance.reset();
return this; return this;
} }
public ChatColorFactory set(ChatColor.ColorOptions option) public ChatColorFactory set(ChatColor.ColorOptions option)

View file

@ -19,7 +19,7 @@ modId="libzontreck" #mandatory
# The version number of the mod - there's a few well known ${} variables useable here or just hardcode it # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it
# ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata # ${file.jarVersion} will substitute the value of the Implementation-Version as read from the mod's JAR file metadata
# see the associated build.gradle script for how to populate this completely automatically during a build # see the associated build.gradle script for how to populate this completely automatically during a build
version="1.0.0.1" #mandatory version="1.0.0.2" #mandatory
# A display name for the mod # A display name for the mod
displayName="LibZontreck" #mandatory displayName="LibZontreck" #mandatory
# A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/ # A URL to query for updates for this mod. See the JSON update specification https://mcforge.readthedocs.io/en/latest/gettingstarted/autoupdate/