Replaces all method parameter regarding their naming conventions

This commit is contained in:
thatsIch
2015-05-08 23:25:19 +02:00
parent a44369a272
commit f193c2adc4
76 changed files with 381 additions and 381 deletions
@@ -105,7 +105,7 @@ public class AdaptorList extends InventoryAdaptor
}
@Override
public ItemStack removeSimilarItems( int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
public ItemStack removeSimilarItems( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
{
int s = this.i.size();
for( int x = 0; x < s; x++ )
@@ -113,20 +113,20 @@ public class AdaptorList extends InventoryAdaptor
ItemStack is = this.i.get( x );
if( is != null && ( filter == null || Platform.isSameItemFuzzy( is, filter, fuzzyMode ) ) )
{
if( how_many > is.stackSize )
if( amount > is.stackSize )
{
how_many = is.stackSize;
amount = is.stackSize;
}
if( destination != null && !destination.canInsert( is ) )
{
how_many = 0;
amount = 0;
}
if( how_many > 0 )
if( amount > 0 )
{
ItemStack rv = is.copy();
rv.stackSize = how_many;
is.stackSize -= how_many;
rv.stackSize = amount;
is.stackSize -= amount;
// remove it..
if( is.stackSize <= 0 )
@@ -36,17 +36,17 @@ import appeng.util.iterators.NullIterator;
public class AdaptorPlayerHand extends InventoryAdaptor
{
private final EntityPlayer p;
private final EntityPlayer player;
public AdaptorPlayerHand( EntityPlayer _p )
public AdaptorPlayerHand( EntityPlayer player )
{
this.p = _p;
this.player = player;
}
@Override
public ItemStack removeItems( int amount, ItemStack filter, IInventoryDestination destination )
{
ItemStack hand = this.p.inventory.getItemStack();
ItemStack hand = this.player.inventory.getItemStack();
if( hand == null )
{
return null;
@@ -59,7 +59,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
hand.stackSize -= amount;
if( hand.stackSize <= 0 )
{
this.p.inventory.setItemStack( null );
this.player.inventory.setItemStack( null );
}
return result;
}
@@ -71,7 +71,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
public ItemStack simulateRemove( int amount, ItemStack filter, IInventoryDestination destination )
{
ItemStack hand = this.p.inventory.getItemStack();
ItemStack hand = this.player.inventory.getItemStack();
if( hand == null )
{
return null;
@@ -88,22 +88,22 @@ public class AdaptorPlayerHand extends InventoryAdaptor
}
@Override
public ItemStack removeSimilarItems( int how_many, ItemStack Filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
public ItemStack removeSimilarItems( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
{
ItemStack hand = this.p.inventory.getItemStack();
ItemStack hand = this.player.inventory.getItemStack();
if( hand == null )
{
return null;
}
if( Filter == null || Platform.isSameItemFuzzy( Filter, hand, fuzzyMode ) )
if( filter == null || Platform.isSameItemFuzzy( filter, hand, fuzzyMode ) )
{
ItemStack result = hand.copy();
result.stackSize = hand.stackSize > how_many ? how_many : hand.stackSize;
hand.stackSize -= how_many;
result.stackSize = hand.stackSize > amount ? amount : hand.stackSize;
hand.stackSize -= amount;
if( hand.stackSize <= 0 )
{
this.p.inventory.setItemStack( null );
this.player.inventory.setItemStack( null );
}
return result;
}
@@ -112,16 +112,16 @@ public class AdaptorPlayerHand extends InventoryAdaptor
}
@Override
public ItemStack simulateSimilarRemove( int amount, ItemStack Filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
public ItemStack simulateSimilarRemove( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
{
ItemStack hand = this.p.inventory.getItemStack();
ItemStack hand = this.player.inventory.getItemStack();
if( hand == null )
{
return null;
}
if( Filter == null || Platform.isSameItemFuzzy( Filter, hand, fuzzyMode ) )
if( filter == null || Platform.isSameItemFuzzy( filter, hand, fuzzyMode ) )
{
ItemStack result = hand.copy();
result.stackSize = hand.stackSize > amount ? amount : hand.stackSize;
@@ -143,16 +143,16 @@ public class AdaptorPlayerHand extends InventoryAdaptor
{
return null;
}
if( this.p == null )
if( this.player == null )
{
return toBeAdded;
}
if( this.p.inventory == null )
if( this.player.inventory == null )
{
return toBeAdded;
}
ItemStack hand = this.p.inventory.getItemStack();
ItemStack hand = this.player.inventory.getItemStack();
if( hand != null && !Platform.isSameItemPrecise( toBeAdded, hand ) )
{
@@ -177,18 +177,18 @@ public class AdaptorPlayerHand extends InventoryAdaptor
newHand.stackSize = newHand.getMaxStackSize();
ItemStack B = toBeAdded.copy();
B.stackSize -= newHand.stackSize - original;
this.p.inventory.setItemStack( newHand );
this.player.inventory.setItemStack( newHand );
return B;
}
this.p.inventory.setItemStack( newHand );
this.player.inventory.setItemStack( newHand );
return null;
}
@Override
public ItemStack simulateAdd( ItemStack toBeSimulated )
{
ItemStack hand = this.p.inventory.getItemStack();
ItemStack hand = this.player.inventory.getItemStack();
if( toBeSimulated == null )
{
return null;
@@ -226,7 +226,7 @@ public class AdaptorPlayerHand extends InventoryAdaptor
@Override
public boolean containsItems()
{
return this.p.inventory.getItemStack() != null;
return this.player.inventory.getItemStack() != null;
}
@Override
+12 -12
View File
@@ -21,10 +21,10 @@ package appeng.util.inv;
import java.util.Iterator;
import net.minecraft.item.ItemStack;
import com.google.common.collect.ImmutableList;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
import appeng.api.config.FuzzyMode;
@@ -66,11 +66,11 @@ public class IMEAdaptor extends InventoryAdaptor
return this.doRemoveItems( amount, filter, destination, Actionable.MODULATE );
}
public ItemStack doRemoveItems( int how_many, ItemStack Filter, IInventoryDestination destination, Actionable type )
public ItemStack doRemoveItems( int amount, ItemStack filter, IInventoryDestination destination, Actionable type )
{
IAEItemStack req = null;
if( Filter == null )
if( filter == null )
{
IItemList<IAEItemStack> list = this.getList();
if( !list.isEmpty() )
@@ -80,14 +80,14 @@ public class IMEAdaptor extends InventoryAdaptor
}
else
{
req = AEItemStack.create( Filter );
req = AEItemStack.create( filter );
}
IAEItemStack out = null;
if( req != null )
{
req.setStackSize( how_many );
req.setStackSize( amount );
out = this.target.extractItems( req, type, this.src );
}
@@ -106,18 +106,18 @@ public class IMEAdaptor extends InventoryAdaptor
}
@Override
public ItemStack removeSimilarItems( int how_many, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
public ItemStack removeSimilarItems( int amount, ItemStack filter, FuzzyMode fuzzyMode, IInventoryDestination destination )
{
if( filter == null )
{
return this.doRemoveItems( how_many, null, destination, Actionable.MODULATE );
return this.doRemoveItems( amount, null, destination, Actionable.MODULATE );
}
return this.doRemoveItemsFuzzy( how_many, filter, destination, Actionable.MODULATE, fuzzyMode );
return this.doRemoveItemsFuzzy( amount, filter, destination, Actionable.MODULATE, fuzzyMode );
}
public ItemStack doRemoveItemsFuzzy( int how_many, ItemStack Filter, IInventoryDestination destination, Actionable type, FuzzyMode fuzzyMode )
public ItemStack doRemoveItemsFuzzy( int amount, ItemStack filter, IInventoryDestination destination, Actionable type, FuzzyMode fuzzyMode )
{
IAEItemStack reqFilter = AEItemStack.create( Filter );
IAEItemStack reqFilter = AEItemStack.create( filter );
if( reqFilter == null )
{
return null;
@@ -129,7 +129,7 @@ public class IMEAdaptor extends InventoryAdaptor
{
if( req != null )
{
req.setStackSize( how_many );
req.setStackSize( amount );
out = this.target.extractItems( req, type, this.src );
if( out != null )
{
@@ -44,13 +44,13 @@ public class WrapperInventoryRange implements IInventory
this.ignoreValidItems = ignoreValid;
}
public WrapperInventoryRange( IInventory a, int _min, int _size, boolean ignoreValid )
public WrapperInventoryRange( IInventory a, int min, int size, boolean ignoreValid )
{
this.src = a;
this.slots = new int[_size];
for( int x = 0; x < _size; x++ )
this.slots = new int[size];
for( int x = 0; x < size; x++ )
{
this.slots[x] = _min + x;
this.slots[x] = min + x;
}
this.ignoreValidItems = ignoreValid;
}