Use StringTextComponent.EMPTY

This commit is contained in:
Sebastian Hartte
2020-07-28 20:24:07 +02:00
parent 2b9c997191
commit 3802eace7a
6 changed files with 9 additions and 9 deletions
@@ -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
@@ -43,7 +43,7 @@ public class FluidTankWidget extends Widget implements ITooltip {
private final int slot;
public FluidTankWidget(IAEFluidTank tank, int slot, int x, int y, int w, int h) {
super(x, y, w, h, new StringTextComponent(""));
super(x, y, w, h, StringTextComponent.EMPTY);
this.tank = tank;
this.slot = slot;
}
@@ -95,7 +95,7 @@ public class FluidTankWidget extends Widget implements ITooltip {
return fluid.getFluid().getAttributes().getDisplayName(fluid.getFluidStack()).deepCopy()
.appendString("\n" + (fluid.getStackSize() + "mB"));
}
return new StringTextComponent("");
return StringTextComponent.EMPTY;
}
@Override