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