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
+11 -11
View File
@@ -32,7 +32,7 @@ public final class AECommand extends CommandBase
{
private final MinecraftServer srv;
public AECommand( MinecraftServer server )
public AECommand( final MinecraftServer server )
{
this.srv = server;
}
@@ -47,7 +47,7 @@ public final class AECommand extends CommandBase
* wtf?
*/
@Override
public int compareTo( Object arg0 )
public int compareTo( final Object arg0 )
{
return 1;
}
@@ -59,15 +59,15 @@ public final class AECommand extends CommandBase
}
@Override
public String getCommandUsage( ICommandSender icommandsender )
public String getCommandUsage( final ICommandSender icommandsender )
{
return "commands.ae2.usage";
}
@Override
public void processCommand(
ICommandSender sender,
String[] args ) throws CommandException
final ICommandSender sender,
final String[] args ) throws CommandException
{
if( args.length == 0 )
{
@@ -79,15 +79,15 @@ public final class AECommand extends CommandBase
{
if( args.length > 1 )
{
Commands c = Commands.valueOf( args[1] );
final Commands c = Commands.valueOf( args[1] );
throw new WrongUsageException( c.command.getHelp( this.srv ) );
}
}
catch( WrongUsageException wrong )
catch( final WrongUsageException wrong )
{
throw wrong;
}
catch( Throwable er )
catch( final Throwable er )
{
throw new WrongUsageException( "commands.ae2.usage" );
}
@@ -100,7 +100,7 @@ public final class AECommand extends CommandBase
{
try
{
Commands c = Commands.valueOf( args[0] );
final Commands c = Commands.valueOf( args[0] );
if( sender.canCommandSenderUseCommand( c.level, this.getCommandName() ) )
{
c.command.call( this.srv, args, sender );
@@ -110,11 +110,11 @@ public final class AECommand extends CommandBase
throw new WrongUsageException( "commands.ae2.permissions" );
}
}
catch( WrongUsageException wrong )
catch( final WrongUsageException wrong )
{
throw wrong;
}
catch( Throwable er )
catch( final Throwable er )
{
throw new WrongUsageException( "commands.ae2.usage" );
}
+1 -1
View File
@@ -30,7 +30,7 @@ public enum Commands
public final int level;
public final ISubCommand command;
Commands( int level, ISubCommand w )
Commands( final int level, final ISubCommand w )
{
this.level = level;
this.command = w;
+17 -17
View File
@@ -69,7 +69,7 @@ public class ServerHelper extends CommonHelper
}
@Override
public void bindTileEntitySpecialRenderer( Class <? extends TileEntity> tile, AEBaseBlock blk )
public void bindTileEntitySpecialRenderer( final Class <? extends TileEntity> tile, final AEBaseBlock blk )
{
throw new UnsupportedOperationException( "This is a server..." );
}
@@ -79,7 +79,7 @@ public class ServerHelper extends CommonHelper
{
if( !Platform.isClient() )
{
MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
final MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();
if( server != null )
{
@@ -91,22 +91,22 @@ public class ServerHelper extends CommonHelper
}
@Override
public void sendToAllNearExcept( EntityPlayer p, double x, double y, double z, double dist, World w, AppEngPacket packet )
public void sendToAllNearExcept( final EntityPlayer p, final double x, final double y, final double z, final double dist, final World w, final AppEngPacket packet )
{
if( Platform.isClient() )
{
return;
}
for( EntityPlayer o : this.getPlayers() )
for( final EntityPlayer o : this.getPlayers() )
{
EntityPlayerMP entityplayermp = (EntityPlayerMP) o;
final EntityPlayerMP entityplayermp = (EntityPlayerMP) o;
if( entityplayermp != p && entityplayermp.worldObj == w )
{
double dX = x - entityplayermp.posX;
double dY = y - entityplayermp.posY;
double dZ = z - entityplayermp.posZ;
final double dX = x - entityplayermp.posX;
final double dY = y - entityplayermp.posY;
final double dZ = z - entityplayermp.posZ;
if( dX * dX + dY * dY + dZ * dZ < dist * dist )
{
@@ -117,13 +117,13 @@ public class ServerHelper extends CommonHelper
}
@Override
public void spawnEffect( EffectType type, World worldObj, double posX, double posY, double posZ, Object o )
public void spawnEffect( final EffectType type, final World worldObj, final double posX, final double posY, final double posZ, final Object o )
{
// :P
}
@Override
public boolean shouldAddParticles( Random r )
public boolean shouldAddParticles( final Random r )
{
return false;
}
@@ -135,7 +135,7 @@ public class ServerHelper extends CommonHelper
}
@Override
public void doRenderItem( ItemStack sis, World tile )
public void doRenderItem( final ItemStack sis, final World tile )
{
}
@@ -164,7 +164,7 @@ public class ServerHelper extends CommonHelper
}
@Override
public void updateRenderMode( EntityPlayer player )
public void updateRenderMode( final EntityPlayer player )
{
this.renderModeBased = player;
}
@@ -176,29 +176,29 @@ public class ServerHelper extends CommonHelper
}
@Override
public void configureIcon( Object item, String name )
public void configureIcon( final Object item, final String name )
{
}
@Override
public ResourceLocation addIcon( String string )
public ResourceLocation addIcon( final String string )
{
// TODO Auto-generated method stub
return null;
}
protected CableRenderMode renderModeForPlayer( EntityPlayer player )
protected CableRenderMode renderModeForPlayer( final EntityPlayer player )
{
if( player != null )
{
for( int x = 0; x < InventoryPlayer.getHotbarSize(); x++ )
{
ItemStack is = player.inventory.getStackInSlot( x );
final ItemStack is = player.inventory.getStackInSlot( x );
if( is != null && is.getItem() instanceof ToolNetworkTool )
{
NBTTagCompound c = is.getTagCompound();
final NBTTagCompound c = is.getTagCompound();
if( c != null && c.getBoolean( "hideFacades" ) )
{
return CableRenderMode.CableView;
@@ -37,7 +37,7 @@ public class ChunkLogger implements ISubCommand
boolean enabled = false;
@SubscribeEvent
public void onChunkLoadEvent( ChunkEvent.Load event )
public void onChunkLoadEvent( final ChunkEvent.Load event )
{
if( !event.world.isRemote )
{
@@ -51,7 +51,7 @@ public class ChunkLogger implements ISubCommand
if( AEConfig.instance.isFeatureEnabled( AEFeature.ChunkLoggerTrace ) )
{
boolean output = false;
for( StackTraceElement e : Thread.currentThread().getStackTrace() )
for( final StackTraceElement e : Thread.currentThread().getStackTrace() )
{
if( output )
{
@@ -66,7 +66,7 @@ public class ChunkLogger implements ISubCommand
}
@SubscribeEvent
public void onChunkUnloadEvent( ChunkEvent.Unload unload )
public void onChunkUnloadEvent( final ChunkEvent.Unload unload )
{
if( !unload.world.isRemote )
{
@@ -76,13 +76,13 @@ public class ChunkLogger implements ISubCommand
}
@Override
public String getHelp( MinecraftServer srv )
public String getHelp( final MinecraftServer srv )
{
return "commands.ae2.ChunkLogger";
}
@Override
public void call( MinecraftServer srv, String[] data, ICommandSender sender )
public void call( final MinecraftServer srv, final String[] data, final ICommandSender sender )
{
this.enabled = !this.enabled;
@@ -31,15 +31,15 @@ public class Supporters implements ISubCommand
{
@Override
public String getHelp( MinecraftServer srv )
public String getHelp( final MinecraftServer srv )
{
return "commands.ae2.Supporters";
}
@Override
public void call( MinecraftServer srv, String[] data, ICommandSender sender )
public void call( final MinecraftServer srv, final String[] data, final ICommandSender sender )
{
String[] who = { "Stig Halvorsen", "Josh Ricker", "Jenny \"Othlon\" Sutherland", "Hristo Bogdanov", "BevoLJ" };
final String[] who = { "Stig Halvorsen", "Josh Ricker", "Jenny \"Othlon\" Sutherland", "Hristo Bogdanov", "BevoLJ" };
sender.addChatMessage( new ChatComponentText( "Special thanks to " + Joiner.on( ", " ).join( who ) ) );
}
}