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
@@ -44,14 +44,14 @@ public abstract class InventoryAdaptor implements Iterable<ItemSlot>
{
// returns an appropriate adaptor, or null
public static InventoryAdaptor getAdaptor( Object te, ForgeDirection d )
public static InventoryAdaptor getAdaptor( final Object te, final ForgeDirection d )
{
if( te == null )
{
return null;
}
IBetterStorage bs = (IBetterStorage) ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BetterStorage ) ? IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BetterStorage ) : null );
final IBetterStorage bs = (IBetterStorage) ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BetterStorage ) ? IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BetterStorage ) : null );
if( te instanceof EntityPlayer )
{
@@ -74,8 +74,8 @@ public abstract class InventoryAdaptor implements Iterable<ItemSlot>
}
else if( te instanceof ISidedInventory )
{
ISidedInventory si = (ISidedInventory) te;
int[] slots = si.getAccessibleSlotsFromSide( d.ordinal() );
final ISidedInventory si = (ISidedInventory) te;
final int[] slots = si.getAccessibleSlotsFromSide( d.ordinal() );
if( si.getSizeInventory() > 0 && slots != null && slots.length > 0 )
{
return new AdaptorIInventory( new WrapperMCISidedInventory( si, d ) );
@@ -83,7 +83,7 @@ public abstract class InventoryAdaptor implements Iterable<ItemSlot>
}
else if( te instanceof IInventory )
{
IInventory i = (IInventory) te;
final IInventory i = (IInventory) te;
if( i.getSizeInventory() > 0 )
{
return new AdaptorIInventory( i );