final variables and parameters

This commit is contained in:
thatsIch
2015-09-30 14:24:40 +02:00
parent 059523f543
commit 8b3a954f73
732 changed files with 9253 additions and 9256 deletions
+7 -7
View File
@@ -36,23 +36,23 @@ public class FacadeConfig extends Configuration
public static FacadeConfig instance;
final Pattern replacementPattern;
public FacadeConfig( File facadeFile )
public FacadeConfig( final File facadeFile )
{
super( facadeFile );
this.replacementPattern = Pattern.compile( "[^a-zA-Z0-9]" );
}
public boolean checkEnabled( Block id, int metadata, boolean automatic )
public boolean checkEnabled( final Block id, final int metadata, final boolean automatic )
{
if( id == null )
{
return false;
}
UniqueIdentifier blk = GameRegistry.findUniqueIdentifierFor( id );
final UniqueIdentifier blk = GameRegistry.findUniqueIdentifierFor( id );
if( blk == null )
{
for( Field f : Block.class.getFields() )
for( final Field f : Block.class.getFields() )
{
try
{
@@ -61,7 +61,7 @@ public class FacadeConfig extends Configuration
return this.get( "minecraft", f.getName() + ( metadata == 0 ? "" : "." + metadata ), automatic ).getBoolean( automatic );
}
}
catch( Throwable e )
catch( final Throwable e )
{
// :P
}
@@ -69,8 +69,8 @@ public class FacadeConfig extends Configuration
}
else
{
Matcher mod = this.replacementPattern.matcher( blk.modId );
Matcher name = this.replacementPattern.matcher( blk.name );
final Matcher mod = this.replacementPattern.matcher( blk.modId );
final Matcher name = this.replacementPattern.matcher( blk.name );
return this.get( mod.replaceAll( "" ), name.replaceAll( "" ) + ( metadata == 0 ? "" : "." + metadata ), automatic ).getBoolean( automatic );
}