Final fields, params and variables
This commit is contained in:
@@ -38,14 +38,14 @@ public class InvLayerData
|
||||
private final List<ISidedInventory> inventories;
|
||||
private final List<InvSot> slots;
|
||||
|
||||
public InvLayerData( int[][] a, List<ISidedInventory> b, List<InvSot> c )
|
||||
public InvLayerData( final int[][] a, final List<ISidedInventory> b, final List<InvSot> c )
|
||||
{
|
||||
this.sides = a;
|
||||
this.inventories = b;
|
||||
this.slots = c;
|
||||
}
|
||||
|
||||
public ItemStack decreaseStackSize( int slot, int amount )
|
||||
public ItemStack decreaseStackSize( final int slot, final int amount )
|
||||
{
|
||||
if( this.isSlotValid( slot ) )
|
||||
{
|
||||
@@ -62,7 +62,7 @@ public class InvLayerData
|
||||
*
|
||||
* @return true, if the slot exists.
|
||||
*/
|
||||
boolean isSlotValid( int slot )
|
||||
boolean isSlotValid( final int slot )
|
||||
{
|
||||
return this.slots != null && slot >= 0 && slot < this.slots.size();
|
||||
}
|
||||
@@ -77,7 +77,7 @@ public class InvLayerData
|
||||
return this.slots.size();
|
||||
}
|
||||
|
||||
public ItemStack getStackInSlot( int slot )
|
||||
public ItemStack getStackInSlot( final int slot )
|
||||
{
|
||||
if( this.isSlotValid( slot ) )
|
||||
{
|
||||
@@ -87,7 +87,7 @@ public class InvLayerData
|
||||
return null;
|
||||
}
|
||||
|
||||
public boolean isItemValidForSlot( int slot, ItemStack itemstack )
|
||||
public boolean isItemValidForSlot( final int slot, final ItemStack itemstack )
|
||||
{
|
||||
if( this.isSlotValid( slot ) )
|
||||
{
|
||||
@@ -97,7 +97,7 @@ public class InvLayerData
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setInventorySlotContents( int slot, ItemStack itemstack )
|
||||
public void setInventorySlotContents( final int slot, final ItemStack itemstack )
|
||||
{
|
||||
if( this.isSlotValid( slot ) )
|
||||
{
|
||||
@@ -105,7 +105,7 @@ public class InvLayerData
|
||||
}
|
||||
}
|
||||
|
||||
public boolean canExtractItem( int slot, ItemStack itemstack, EnumFacing side )
|
||||
public boolean canExtractItem( final int slot, final ItemStack itemstack, final EnumFacing side )
|
||||
{
|
||||
if( this.isSlotValid( slot ) )
|
||||
{
|
||||
@@ -115,7 +115,7 @@ public class InvLayerData
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean canInsertItem( int slot, ItemStack itemstack, EnumFacing side )
|
||||
public boolean canInsertItem( final int slot, final ItemStack itemstack, final EnumFacing side )
|
||||
{
|
||||
if( this.isSlotValid( slot ) )
|
||||
{
|
||||
@@ -129,14 +129,14 @@ public class InvLayerData
|
||||
{
|
||||
if( this.inventories != null )
|
||||
{
|
||||
for( IInventory inv : this.inventories )
|
||||
for( final IInventory inv : this.inventories )
|
||||
{
|
||||
inv.markDirty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int[] getSlotsForFace( EnumFacing side )
|
||||
public int[] getSlotsForFace( final EnumFacing side )
|
||||
{
|
||||
if( this.sides == null || side == null )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user