Replaces all method parameter regarding their naming conventions
This commit is contained in:
@@ -243,7 +243,7 @@ public class Platform
|
||||
return ForgeDirection.UNKNOWN;
|
||||
}
|
||||
|
||||
public static <T extends Enum> T rotateEnum( T ce, boolean backwards, EnumSet ValidOptions )
|
||||
public static <T extends Enum> T rotateEnum( T ce, boolean backwards, EnumSet validOptions )
|
||||
{
|
||||
do
|
||||
{
|
||||
@@ -256,7 +256,7 @@ public class Platform
|
||||
ce = nextEnum( ce );
|
||||
}
|
||||
}
|
||||
while( !ValidOptions.contains( ce ) || isNotValidSetting( ce ) );
|
||||
while( !validOptions.contains( ce ) || isNotValidSetting( ce ) );
|
||||
|
||||
return ce;
|
||||
}
|
||||
@@ -455,18 +455,18 @@ public class Platform
|
||||
* then the vanilla version which likes to fail when NBT Compound data changes order, it is pretty expensive
|
||||
* performance wise, so try an use shared tag compounds as long as the system remains in AE.
|
||||
*/
|
||||
public static boolean NBTEqualityTest( NBTBase A, NBTBase B )
|
||||
public static boolean NBTEqualityTest( NBTBase left, NBTBase right )
|
||||
{
|
||||
// same type?
|
||||
byte id = A.getId();
|
||||
if( id == B.getId() )
|
||||
byte id = left.getId();
|
||||
if( id == right.getId() )
|
||||
{
|
||||
switch( id )
|
||||
{
|
||||
case 10:
|
||||
{
|
||||
NBTTagCompound ctA = (NBTTagCompound) A;
|
||||
NBTTagCompound ctB = (NBTTagCompound) B;
|
||||
NBTTagCompound ctA = (NBTTagCompound) left;
|
||||
NBTTagCompound ctB = (NBTTagCompound) right;
|
||||
|
||||
Set<String> cA = ctA.func_150296_c();
|
||||
Set<String> cB = ctB.func_150296_c();
|
||||
@@ -496,8 +496,8 @@ public class Platform
|
||||
|
||||
case 9: // ) // A instanceof NBTTagList )
|
||||
{
|
||||
NBTTagList lA = (NBTTagList) A;
|
||||
NBTTagList lB = (NBTTagList) B;
|
||||
NBTTagList lA = (NBTTagList) left;
|
||||
NBTTagList lB = (NBTTagList) right;
|
||||
if( lA.tagCount() != lB.tagCount() )
|
||||
{
|
||||
return false;
|
||||
@@ -527,25 +527,25 @@ public class Platform
|
||||
}
|
||||
|
||||
case 1: // ( A instanceof NBTTagByte )
|
||||
return ( (NBTTagByte) A ).func_150287_d() == ( (NBTTagByte) B ).func_150287_d();
|
||||
return ( (NBTTagByte) left ).func_150287_d() == ( (NBTTagByte) right ).func_150287_d();
|
||||
|
||||
case 4: // else if ( A instanceof NBTTagLong )
|
||||
return ( (NBTTagLong) A ).func_150291_c() == ( (NBTTagLong) B ).func_150291_c();
|
||||
return ( (NBTTagLong) left ).func_150291_c() == ( (NBTTagLong) right ).func_150291_c();
|
||||
|
||||
case 8: // else if ( A instanceof NBTTagString )
|
||||
return ( (NBTTagString) A ).func_150285_a_().equals( ( (NBTTagString) B ).func_150285_a_() ) || ( (NBTTagString) A ).func_150285_a_().equals( ( (NBTTagString) B ).func_150285_a_() );
|
||||
return ( (NBTTagString) left ).func_150285_a_().equals( ( (NBTTagString) right ).func_150285_a_() ) || ( (NBTTagString) left ).func_150285_a_().equals( ( (NBTTagString) right ).func_150285_a_() );
|
||||
|
||||
case 6: // else if ( A instanceof NBTTagDouble )
|
||||
return ( (NBTTagDouble) A ).func_150286_g() == ( (NBTTagDouble) B ).func_150286_g();
|
||||
return ( (NBTTagDouble) left ).func_150286_g() == ( (NBTTagDouble) right ).func_150286_g();
|
||||
|
||||
case 5: // else if ( A instanceof NBTTagFloat )
|
||||
return ( (NBTTagFloat) A ).func_150288_h() == ( (NBTTagFloat) B ).func_150288_h();
|
||||
return ( (NBTTagFloat) left ).func_150288_h() == ( (NBTTagFloat) right ).func_150288_h();
|
||||
|
||||
case 3: // else if ( A instanceof NBTTagInt )
|
||||
return ( (NBTTagInt) A ).func_150287_d() == ( (NBTTagInt) B ).func_150287_d();
|
||||
return ( (NBTTagInt) left ).func_150287_d() == ( (NBTTagInt) right ).func_150287_d();
|
||||
|
||||
default:
|
||||
return A.equals( B );
|
||||
return left.equals( right );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -591,17 +591,17 @@ public class Platform
|
||||
* Orderless hash on NBT Data, used to work thought huge piles fast, but ignores the order just in case MC decided
|
||||
* to change it... WHICH IS BAD...
|
||||
*/
|
||||
public static int NBTOrderlessHash( NBTBase A )
|
||||
public static int NBTOrderlessHash( NBTBase nbt )
|
||||
{
|
||||
// same type?
|
||||
int hash = 0;
|
||||
byte id = A.getId();
|
||||
byte id = nbt.getId();
|
||||
hash += id;
|
||||
switch( id )
|
||||
{
|
||||
case 10:
|
||||
{
|
||||
NBTTagCompound ctA = (NBTTagCompound) A;
|
||||
NBTTagCompound ctA = (NBTTagCompound) nbt;
|
||||
|
||||
Set<String> cA = ctA.func_150296_c();
|
||||
|
||||
@@ -615,7 +615,7 @@ public class Platform
|
||||
|
||||
case 9: // ) // A instanceof NBTTagList )
|
||||
{
|
||||
NBTTagList lA = (NBTTagList) A;
|
||||
NBTTagList lA = (NBTTagList) nbt;
|
||||
hash += 9 * lA.tagCount();
|
||||
|
||||
List<NBTBase> l = tagList( lA );
|
||||
@@ -628,22 +628,22 @@ public class Platform
|
||||
}
|
||||
|
||||
case 1: // ( A instanceof NBTTagByte )
|
||||
return hash + ( (NBTTagByte) A ).func_150290_f();
|
||||
return hash + ( (NBTTagByte) nbt ).func_150290_f();
|
||||
|
||||
case 4: // else if ( A instanceof NBTTagLong )
|
||||
return hash + (int) ( (NBTTagLong) A ).func_150291_c();
|
||||
return hash + (int) ( (NBTTagLong) nbt ).func_150291_c();
|
||||
|
||||
case 8: // else if ( A instanceof NBTTagString )
|
||||
return hash + ( (NBTTagString) A ).func_150285_a_().hashCode();
|
||||
return hash + ( (NBTTagString) nbt ).func_150285_a_().hashCode();
|
||||
|
||||
case 6: // else if ( A instanceof NBTTagDouble )
|
||||
return hash + (int) ( (NBTTagDouble) A ).func_150286_g();
|
||||
return hash + (int) ( (NBTTagDouble) nbt ).func_150286_g();
|
||||
|
||||
case 5: // else if ( A instanceof NBTTagFloat )
|
||||
return hash + (int) ( (NBTTagFloat) A ).func_150288_h();
|
||||
return hash + (int) ( (NBTTagFloat) nbt ).func_150288_h();
|
||||
|
||||
case 3: // else if ( A instanceof NBTTagInt )
|
||||
return hash + ( (NBTTagInt) A ).func_150287_d();
|
||||
return hash + ( (NBTTagInt) nbt ).func_150287_d();
|
||||
|
||||
default:
|
||||
return hash;
|
||||
@@ -653,14 +653,14 @@ public class Platform
|
||||
/*
|
||||
* The usual version of this returns an ItemStack, this version returns the recipe.
|
||||
*/
|
||||
public static IRecipe findMatchingRecipe( InventoryCrafting par1InventoryCrafting, World par2World )
|
||||
public static IRecipe findMatchingRecipe( InventoryCrafting inventoryCrafting, World par2World )
|
||||
{
|
||||
CraftingManager cm = CraftingManager.getInstance();
|
||||
List<IRecipe> rl = cm.getRecipeList();
|
||||
|
||||
for( IRecipe r : rl )
|
||||
{
|
||||
if( r.matches( par1InventoryCrafting, par2World ) )
|
||||
if( r.matches( inventoryCrafting, par2World ) )
|
||||
{
|
||||
return r;
|
||||
}
|
||||
@@ -1236,7 +1236,7 @@ public class Platform
|
||||
return isSameItem( is, filter ) && sameStackStags( is, filter );
|
||||
}
|
||||
|
||||
public static boolean isSameItemFuzzy( ItemStack a, ItemStack b, FuzzyMode Mode )
|
||||
public static boolean isSameItemFuzzy( ItemStack a, ItemStack b, FuzzyMode mode )
|
||||
{
|
||||
if( a == null && b == null )
|
||||
{
|
||||
@@ -1263,11 +1263,11 @@ public class Platform
|
||||
{
|
||||
try
|
||||
{
|
||||
if( Mode == FuzzyMode.IGNORE_ALL )
|
||||
if( mode == FuzzyMode.IGNORE_ALL )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( Mode == FuzzyMode.PERCENT_99 )
|
||||
else if( mode == FuzzyMode.PERCENT_99 )
|
||||
{
|
||||
return ( a.getItemDamageForDisplay() > 1 ) == ( b.getItemDamageForDisplay() > 1 );
|
||||
}
|
||||
@@ -1276,16 +1276,16 @@ public class Platform
|
||||
float APercentDamaged = 1.0f - (float) a.getItemDamageForDisplay() / (float) a.getMaxDamage();
|
||||
float BPercentDamaged = 1.0f - (float) b.getItemDamageForDisplay() / (float) b.getMaxDamage();
|
||||
|
||||
return ( APercentDamaged > Mode.breakPoint ) == ( BPercentDamaged > Mode.breakPoint );
|
||||
return ( APercentDamaged > mode.breakPoint ) == ( BPercentDamaged > mode.breakPoint );
|
||||
}
|
||||
}
|
||||
catch( Throwable e )
|
||||
{
|
||||
if( Mode == FuzzyMode.IGNORE_ALL )
|
||||
if( mode == FuzzyMode.IGNORE_ALL )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if( Mode == FuzzyMode.PERCENT_99 )
|
||||
else if( mode == FuzzyMode.PERCENT_99 )
|
||||
{
|
||||
return ( a.getItemDamage() > 1 ) == ( b.getItemDamage() > 1 );
|
||||
}
|
||||
@@ -1294,7 +1294,7 @@ public class Platform
|
||||
float APercentDamaged = (float) a.getItemDamage() / (float) a.getMaxDamage();
|
||||
float BPercentDamaged = (float) b.getItemDamage() / (float) b.getMaxDamage();
|
||||
|
||||
return ( APercentDamaged > Mode.breakPoint ) == ( BPercentDamaged > Mode.breakPoint );
|
||||
return ( APercentDamaged > mode.breakPoint ) == ( BPercentDamaged > mode.breakPoint );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user