Use StringTextComponent.EMPTY
This commit is contained in:
@@ -51,7 +51,7 @@ public class QuartzKnifeScreen extends AEBaseScreen<QuartzKnifeContainer> {
|
||||
super.init();
|
||||
|
||||
this.name = new TextFieldWidget(this.font, this.guiLeft + 24, this.guiTop + 32, 79, this.font.FONT_HEIGHT,
|
||||
new StringTextComponent(""));
|
||||
StringTextComponent.EMPTY);
|
||||
this.name.setEnableBackgroundDrawing(false);
|
||||
this.name.setMaxStringLength(32);
|
||||
this.name.setTextColor(0xFFFFFF);
|
||||
|
||||
@@ -56,7 +56,7 @@ public class AETextField extends TextFieldWidget {
|
||||
final int height) {
|
||||
super(fontRenderer, xPos + PADDING, yPos + PADDING,
|
||||
width - 2 * PADDING - (int) fontRenderer.getStringWidth("_"), height - 2 * PADDING,
|
||||
new StringTextComponent(""));
|
||||
StringTextComponent.EMPTY);
|
||||
|
||||
this._fontPad = (int) fontRenderer.getStringWidth("_");
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ public abstract class IconButton extends Button implements ITooltip {
|
||||
private boolean halfSize = false;
|
||||
|
||||
public IconButton(final int x, final int y, IPressable onPress) {
|
||||
super(x, y, 16, 16, new StringTextComponent(""), onPress);
|
||||
super(x, y, 16, 16, StringTextComponent.EMPTY, onPress);
|
||||
}
|
||||
|
||||
public void setVisibility(final boolean vis) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class ProgressBar extends Widget implements ITooltip {
|
||||
public ProgressBar(final IProgressProvider source, final String texture, final int posX, final int posY,
|
||||
final int u, final int y, final int width, final int height, final Direction dir,
|
||||
final ITextComponent title) {
|
||||
super(posX, posY, width, height, new StringTextComponent(""));
|
||||
super(posX, posY, width, height, StringTextComponent.EMPTY);
|
||||
this.source = source;
|
||||
this.texture = new ResourceLocation("appliedenergistics2", "textures/" + texture);
|
||||
this.fill_u = u;
|
||||
@@ -85,7 +85,7 @@ public class ProgressBar extends Widget implements ITooltip {
|
||||
if (this.fullMsg != null) {
|
||||
return this.fullMsg;
|
||||
}
|
||||
ITextComponent result = this.titleName != null ? this.titleName : new StringTextComponent("");
|
||||
ITextComponent result = this.titleName != null ? this.titleName : StringTextComponent.EMPTY;
|
||||
|
||||
return result.deepCopy().appendString("\n").appendString(this.source.getCurrentProgress() + " ")
|
||||
.append(GuiText.Of.text().deepCopy().appendString(" " + this.source.getMaxProgress()));
|
||||
|
||||
@@ -45,7 +45,7 @@ public class ToggleButton extends Button implements ITooltip {
|
||||
|
||||
public ToggleButton(final int x, final int y, final int on, final int off, final String displayName,
|
||||
final String displayHint, IPressable onPress) {
|
||||
super(x, y, 16, 16, new StringTextComponent(""), onPress);
|
||||
super(x, y, 16, 16, StringTextComponent.EMPTY, onPress);
|
||||
this.iconIdxOn = on;
|
||||
this.iconIdxOff = off;
|
||||
this.displayName = displayName;
|
||||
@@ -102,7 +102,7 @@ public class ToggleButton extends Button implements ITooltip {
|
||||
|
||||
return new StringTextComponent(name + '\n' + sb);
|
||||
}
|
||||
return new StringTextComponent("");
|
||||
return StringTextComponent.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user