format, fixes #254
This commit is contained in:
1 parent
0b72f85474
commit
7577c475f6
6 files changed
+177
-6
No files matched your search
@@ -0,0 +1,40 @@
|
||||
package carpet.script.value;
|
||||
|
||||
import net.minecraft.text.BaseText;
|
||||
|
||||
public class FormattedTextValue extends StringValue
|
||||
{
|
||||
BaseText text;
|
||||
public FormattedTextValue(BaseText text)
|
||||
{
|
||||
super(null);
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getString() {
|
||||
return text.getString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getBoolean() {
|
||||
return text.getSiblings().size() > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Value clone()
|
||||
{
|
||||
return new FormattedTextValue(text);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeString()
|
||||
{
|
||||
return "text";
|
||||
}
|
||||
|
||||
public BaseText getText()
|
||||
{
|
||||
return text;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user