Skip to content

Commit 1673bd5

Browse files
committed
Reformat code
1 parent f2a2050 commit 1673bd5

File tree

1 file changed

+12
-23
lines changed

1 file changed

+12
-23
lines changed

src/main/java/com/falsepattern/lib/compat/GuiLabel.java

Lines changed: 12 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.falsepattern.lib.compat;
22

33
import com.google.common.collect.Lists;
4+
45
import java.util.List;
56

67
import cpw.mods.fml.relauncher.Side;
@@ -13,8 +14,7 @@
1314
import org.lwjgl.opengl.GL11;
1415

1516
@SideOnly(Side.CLIENT)
16-
public class GuiLabel extends Gui
17-
{
17+
public class GuiLabel extends Gui {
1818
protected int width;
1919
protected int height;
2020
public int x;
@@ -31,8 +31,7 @@ public class GuiLabel extends Gui
3131
private final FontRenderer fontRenderer;
3232
private final int border;
3333

34-
public GuiLabel(FontRenderer fontRendererObj, int p_i45540_2_, int p_i45540_3_, int p_i45540_4_, int p_i45540_5_, int p_i45540_6_, int p_i45540_7_)
35-
{
34+
public GuiLabel(FontRenderer fontRendererObj, int p_i45540_2_, int p_i45540_3_, int p_i45540_4_, int p_i45540_5_, int p_i45540_6_, int p_i45540_7_) {
3635
this.fontRenderer = fontRendererObj;
3736
this.id = p_i45540_2_;
3837
this.x = p_i45540_3_;
@@ -49,49 +48,39 @@ public GuiLabel(FontRenderer fontRendererObj, int p_i45540_2_, int p_i45540_3_,
4948
this.border = 0;
5049
}
5150

52-
public void addLine(String p_175202_1_)
53-
{
51+
public void addLine(String p_175202_1_) {
5452
this.labels.add(I18n.format(p_175202_1_));
5553
}
5654

5755
/**
5856
* Sets the Label to be centered
5957
*/
60-
public GuiLabel setCentered()
61-
{
58+
public GuiLabel setCentered() {
6259
this.centered = true;
6360
return this;
6461
}
6562

66-
public void drawLabel(Minecraft mc, int mouseX, int mouseY)
67-
{
68-
if (this.visible)
69-
{
63+
public void drawLabel(Minecraft mc, int mouseX, int mouseY) {
64+
if (this.visible) {
7065
GL11.glEnable(GL11.GL_BLEND);
7166
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
7267
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
7368
this.drawLabelBackground(mc, mouseX, mouseY);
7469
int i = this.y + this.height / 2 + this.border / 2;
7570
int j = i - this.labels.size() * 10 / 2;
7671

77-
for (int k = 0; k < this.labels.size(); ++k)
78-
{
79-
if (this.centered)
80-
{
72+
for (int k = 0; k < this.labels.size(); ++k) {
73+
if (this.centered) {
8174
this.drawCenteredString(this.fontRenderer, this.labels.get(k), this.x + this.width / 2, j + k * 10, this.textColor);
82-
}
83-
else
84-
{
75+
} else {
8576
this.drawString(this.fontRenderer, this.labels.get(k), this.x, j + k * 10, this.textColor);
8677
}
8778
}
8879
}
8980
}
9081

91-
protected void drawLabelBackground(Minecraft mcIn, int mouseX, int mouseY)
92-
{
93-
if (this.labelBgEnabled)
94-
{
82+
protected void drawLabelBackground(Minecraft mcIn, int mouseX, int mouseY) {
83+
if (this.labelBgEnabled) {
9584
int i = this.width + this.border * 2;
9685
int j = this.height + this.border * 2;
9786
int k = this.x - this.border;

0 commit comments

Comments
 (0)