Puts everywhere brackets

This commit is contained in:
thatsIch
2015-04-29 02:30:53 +02:00
parent 23aa8fd72d
commit 64ed05a1b4
465 changed files with 6726 additions and 14 deletions
@@ -193,9 +193,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
GL11.glScalef( 0.5f, 0.5f, 0.5f );
if( this.enabled )
{
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
}
else
{
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
}
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
@@ -212,9 +216,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
else
{
if( this.enabled )
{
GL11.glColor4f( 1.0f, 1.0f, 1.0f, 1.0f );
}
else
{
GL11.glColor4f( 0.5f, 0.5f, 0.5f, 1.0f );
}
par1Minecraft.renderEngine.bindTexture( ExtraBlockTextures.GuiTexture( "guis/states.png" ) );
this.field_146123_n = par2 >= this.xPosition && par3 >= this.yPosition && par2 < this.xPosition + this.width && par3 < this.yPosition + this.height;
@@ -236,7 +244,9 @@ public class GuiImgButton extends GuiButton implements ITooltip
{
ButtonAppearance app = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
if( app == null )
{
return 256 - 1;
}
return app.index;
}
return 256 - 1;
@@ -262,7 +272,9 @@ public class GuiImgButton extends GuiButton implements ITooltip
{
ButtonAppearance buttonAppearance = appearances.get( new EnumPair( this.buttonSetting, this.currentValue ) );
if( buttonAppearance == null )
{
return "No Such Message";
}
displayName = buttonAppearance.displayName;
displayValue = buttonAppearance.displayValue;
@@ -274,19 +286,27 @@ public class GuiImgButton extends GuiButton implements ITooltip
String value = StatCollector.translateToLocal( displayValue );
if( name == null || name.isEmpty() )
{
name = displayName;
}
if( value == null || value.isEmpty() )
{
value = displayValue;
}
if( this.fillVar != null )
{
value = COMPILE.matcher( value ).replaceFirst( this.fillVar );
}
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
StringBuilder sb = new StringBuilder( value );
int i = sb.lastIndexOf( "\n" );
if( i <= 0 )
{
i = 0;
}
while( i + 30 < sb.length() && ( i = sb.lastIndexOf( " ", i + 30 ) ) != -1 )
{
sb.replace( i, i + 1, "\n" );
@@ -357,9 +377,13 @@ public class GuiImgButton extends GuiButton implements ITooltip
public boolean equals( Object obj )
{
if( obj == null )
{
return false;
}
if( this.getClass() != obj.getClass() )
{
return false;
}
EnumPair other = (EnumPair) obj;
return other.setting == this.setting && other.value == this.value;
}
@@ -43,11 +43,17 @@ public class GuiNumberBox extends GuiTextField
try
{
if( this.type == int.class || this.type == Integer.class )
{
Integer.parseInt( this.getText() );
}
else if( this.type == long.class || this.type == Long.class )
{
Long.parseLong( this.getText() );
}
else if( this.type == double.class || this.type == Double.class )
{
Double.parseDouble( this.getText() );
}
}
catch( NumberFormatException e )
{
@@ -91,7 +91,9 @@ public class GuiProgressBar extends GuiButton implements ITooltip
public String getMessage()
{
if( this.fullMsg != null )
{
return this.fullMsg;
}
return ( this.titleName != null ? this.titleName : "" ) + '\n' + this.source.getCurrentProgress() + ' ' + GuiText.Of.getLocal() + ' ' + this.source.getMaxProgress();
}
@@ -109,7 +109,9 @@ public class GuiScrollbar implements IScrollSource
this.pageSize = pageSize;
if( this.minScroll > this.maxScroll )
{
this.maxScroll = this.minScroll;
}
this.applyRange();
}
@@ -128,7 +130,9 @@ public class GuiScrollbar implements IScrollSource
public void click( AEBaseGui aeBaseGui, int x, int y )
{
if( this.getRange() == 0 )
{
return;
}
if( x > this.displayX && x <= this.displayX + this.width )
{
@@ -93,16 +93,22 @@ public class GuiToggleButton extends GuiButton implements ITooltip
String value = StatCollector.translateToLocal( this.displayHint );
if( name == null || name.isEmpty() )
{
name = this.displayName;
}
if( value == null || value.isEmpty() )
{
value = this.displayHint;
}
value = PATTERN_NEW_LINE.matcher( value ).replaceAll( "\n" );
StringBuilder sb = new StringBuilder( value );
int i = sb.lastIndexOf( "\n" );
if( i <= 0 )
{
i = 0;
}
while( i + 30 < sb.length() && ( i = sb.lastIndexOf( " ", i + 30 ) ) != -1 )
{
sb.replace( i, i + 1, "\n" );