final variables and parameters

seeing some methods it does actually help to enforce the parameters
This commit is contained in:
thatsIch
2015-09-25 23:10:56 +02:00
parent e52400bf26
commit 410d2f1e0d
819 changed files with 9390 additions and 9396 deletions
@@ -42,7 +42,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
protected IAEAppEngInventory te;
protected int maxStack;
public AppEngInternalInventory( IAEAppEngInventory inventory, int size )
public AppEngInternalInventory( final IAEAppEngInventory inventory, final int size )
{
this.te = inventory;
this.size = size;
@@ -74,17 +74,17 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
}
@Override
public ItemStack getStackInSlot( int var1 )
public ItemStack getStackInSlot( final int var1 )
{
return this.inv[var1];
}
@Override
public ItemStack decrStackSize( int slot, int qty )
public ItemStack decrStackSize( final int slot, final int qty )
{
if( this.inv[slot] != null )
{
ItemStack split = this.getStackInSlot( slot );
final ItemStack split = this.getStackInSlot( slot );
ItemStack ns = null;
if( qty >= split.stackSize )
@@ -115,15 +115,15 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
}
@Override
public ItemStack getStackInSlotOnClosing( int var1 )
public ItemStack getStackInSlotOnClosing( final int var1 )
{
return null;
}
@Override
public void setInventorySlotContents( int slot, ItemStack newItemStack )
public void setInventorySlotContents( final int slot, final ItemStack newItemStack )
{
ItemStack oldStack = this.inv[slot];
final ItemStack oldStack = this.inv[slot];
this.inv[slot] = newItemStack;
if( this.te != null && this.eventsEnabled() )
@@ -185,7 +185,7 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
}
@Override
public boolean isUseableByPlayer( EntityPlayer var1 )
public boolean isUseableByPlayer( final EntityPlayer var1 )
{
return true;
}
@@ -201,18 +201,18 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
}
@Override
public boolean isItemValidForSlot( int i, ItemStack itemstack )
public boolean isItemValidForSlot( final int i, final ItemStack itemstack )
{
return true;
}
public void setMaxStackSize( int s )
public void setMaxStackSize( final int s )
{
this.maxStack = s;
}
// for guis...
public void markDirty( int slotIndex )
public void markDirty( final int slotIndex )
{
if( this.te != null && this.eventsEnabled() )
{
@@ -220,20 +220,20 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
}
}
public void writeToNBT( NBTTagCompound data, String name )
public void writeToNBT( final NBTTagCompound data, final String name )
{
NBTTagCompound c = new NBTTagCompound();
final NBTTagCompound c = new NBTTagCompound();
this.writeToNBT( c );
data.setTag( name, c );
}
public void writeToNBT( NBTTagCompound target )
public void writeToNBT( final NBTTagCompound target )
{
for( int x = 0; x < this.size; x++ )
{
try
{
NBTTagCompound c = new NBTTagCompound();
final NBTTagCompound c = new NBTTagCompound();
if( this.inv[x] != null )
{
@@ -242,35 +242,35 @@ public class AppEngInternalInventory implements IInventory, Iterable<ItemStack>
target.setTag( "#" + x, c );
}
catch( Exception ignored )
catch( final Exception ignored )
{
}
}
}
public void readFromNBT( NBTTagCompound data, String name )
public void readFromNBT( final NBTTagCompound data, final String name )
{
NBTTagCompound c = data.getCompoundTag( name );
final NBTTagCompound c = data.getCompoundTag( name );
if( c != null )
{
this.readFromNBT( c );
}
}
public void readFromNBT( NBTTagCompound target )
public void readFromNBT( final NBTTagCompound target )
{
for( int x = 0; x < this.size; x++ )
{
try
{
NBTTagCompound c = target.getCompoundTag( "#" + x );
final NBTTagCompound c = target.getCompoundTag( "#" + x );
if( c != null )
{
this.inv[x] = ItemStack.loadItemStackFromNBT( c );
}
}
catch( Exception e )
catch( final Exception e )
{
AELog.error( e );
}