mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-21 20:42:16 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
6b208b98bc
commit
a309488cdf
214 files changed
+9283
-9265
No files matched your search
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* To change this license header, choose License Headers in Project Properties.
|
||||
* To change this template file, choose Tools | Templates
|
||||
* and open the template in the editor.
|
||||
* To change this license header, choose License Headers in Project Properties. To change this template file, choose
|
||||
* Tools | Templates and open the template in the editor.
|
||||
*/
|
||||
|
||||
package minetweaker.mc1710.formatting;
|
||||
|
||||
import minetweaker.api.formatting.IFormattedText;
|
||||
|
||||
import net.minecraft.util.EnumChatFormatting;
|
||||
|
||||
/**
|
||||
@@ -14,31 +14,32 @@ import net.minecraft.util.EnumChatFormatting;
|
||||
* @author Stan
|
||||
*/
|
||||
public class FormattedMarkupString implements IMCFormattedString {
|
||||
private final EnumChatFormatting markup;
|
||||
private final IMCFormattedString contents;
|
||||
|
||||
public FormattedMarkupString(EnumChatFormatting markup, IMCFormattedString contents) {
|
||||
this.markup = markup;
|
||||
this.contents = contents;
|
||||
}
|
||||
private final EnumChatFormatting markup;
|
||||
private final IMCFormattedString contents;
|
||||
|
||||
@Override
|
||||
public String getTooltipString() {
|
||||
return markup + contents.getTooltipString(markup.toString());
|
||||
}
|
||||
public FormattedMarkupString(EnumChatFormatting markup, IMCFormattedString contents) {
|
||||
this.markup = markup;
|
||||
this.contents = contents;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTooltipString(String context) {
|
||||
return markup + contents.getTooltipString(context + markup);
|
||||
}
|
||||
@Override
|
||||
public String getTooltipString() {
|
||||
return markup + contents.getTooltipString(markup.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFormattedText add(IFormattedText other) {
|
||||
return cat(other);
|
||||
}
|
||||
@Override
|
||||
public String getTooltipString(String context) {
|
||||
return markup + contents.getTooltipString(context + markup);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFormattedText cat(IFormattedText other) {
|
||||
return new FormattedStringJoin(this, (IMCFormattedString) other);
|
||||
}
|
||||
@Override
|
||||
public IFormattedText add(IFormattedText other) {
|
||||
return cat(other);
|
||||
}
|
||||
|
||||
@Override
|
||||
public IFormattedText cat(IFormattedText other) {
|
||||
return new FormattedStringJoin(this, (IMCFormattedString) other);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user