Close #477 Auto-Format code with new formatting settings

This commit is contained in:
mezz committed 2015-01-26 22:26:21 -08:00
1 parent 8e92d16320
commit 5b8b0c78b0
763 files changed
+13174 -8868

No files matched your search

@@ -4,21 +4,23 @@
* are made available under the terms of the GNU Lesser Public License v3
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-3.0.txt
*
*
* Various Contributors including, but not limited to:
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
******************************************************************************/
package forestry.mail.gui;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.proxy.Proxies;
import forestry.core.utils.ForestryResource;
import forestry.mail.POBoxInfo;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.gui.Gui;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
public class GuiMailboxInfo extends Gui {
@@ -33,14 +35,18 @@ public class GuiMailboxInfo extends Gui {
}
public void render(int x, int y) {
if (poInfo == null)
if (poInfo == null) {
return;
if (Proxies.common.getRenderWorld() == null)
}
if (Proxies.common.getRenderWorld() == null) {
return;
if (!Config.mailAlertEnabled)
}
if (!Config.mailAlertEnabled) {
return;
if (!poInfo.hasMail())
}
if (!poInfo.hasMail()) {
return;
}
GL11.glEnable(3042);
GL11.glEnable(32826);
@@ -51,7 +57,7 @@ public class GuiMailboxInfo extends Gui {
this.drawTexturedModalRect(x, y, 0, 0, 98, 17);
fontRendererObj
.drawString(Integer.toString(poInfo.playerLetters), x + 27 + getCenteredOffset(Integer.toString(poInfo.playerLetters), 22), y + 5, 0xffffff);
.drawString(Integer.toString(poInfo.playerLetters), x + 27 + getCenteredOffset(Integer.toString(poInfo.playerLetters), 22), y + 5, 0xffffff);
fontRendererObj.drawString(Integer.toString(poInfo.tradeLetters), x + 75 + getCenteredOffset(Integer.toString(poInfo.tradeLetters), 22), y + 5, 0xffffff);
GL11.glDisable(32826);
@@ -66,14 +72,17 @@ public class GuiMailboxInfo extends Gui {
public void setPOBoxInfo(POBoxInfo info) {
boolean playJingle = false;
if (info.hasMail())
if (this.poInfo == null)
if (info.hasMail()) {
if (this.poInfo == null) {
playJingle = true;
else if (this.poInfo.playerLetters != info.playerLetters || this.poInfo.tradeLetters != info.tradeLetters)
} else if (this.poInfo.playerLetters != info.playerLetters || this.poInfo.tradeLetters != info.tradeLetters) {
playJingle = true;
}
}
if (playJingle)
if (playJingle) {
Proxies.common.getRenderWorld().playSoundAtEntity(Proxies.common.getClientInstance().thePlayer, "random.levelup", 1.0f, 1.0f);
}
this.poInfo = info;
}