Improved readability of variables

Hopefully improved semantics of variables

Fixed typos

Added hyphenations
This commit is contained in:
thatsIch
2014-09-28 11:47:17 +02:00
parent 6b60a0996b
commit 76b147fd5b
220 changed files with 1643 additions and 1662 deletions
@@ -191,12 +191,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
ItemStack itemstack = ItemStack.loadItemStackFromNBT( i );
if ( itemstack == null )
return null;
AEFluidStack aeis = AEFluidStack.create( itemstack );
// aeis.priority = i.getInteger( "Priority" );
aeis.stackSize = i.getLong( "Cnt" );
aeis.setCountRequestable( i.getLong( "Req" ) );
aeis.setCraftable( i.getBoolean( "Craft" ) );
return aeis;
AEFluidStack fluid = AEFluidStack.create( itemstack );
// fluid.priority = i.getInteger( "Priority" );
fluid.stackSize = i.getLong( "Cnt" );
fluid.setCountRequestable( i.getLong( "Req" ) );
fluid.setCraftable( i.getBoolean( "Craft" ) );
return fluid;
}
@Override
@@ -282,12 +282,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
if ( fluidStack == null )
return null;
AEFluidStack aeis = AEFluidStack.create( fluidStack );
// aeis.priority = (int) priority;
aeis.stackSize = stackSize;
aeis.setCountRequestable( countRequestable );
aeis.setCraftable( isCraftable );
return aeis;
AEFluidStack fluid = AEFluidStack.create( fluidStack );
// fluid.priority = (int) priority;
fluid.stackSize = stackSize;
fluid.setCountRequestable( countRequestable );
fluid.setCraftable( isCraftable );
return fluid;
}
@Override
@@ -22,7 +22,7 @@ public class AEItemDef
public Item item;
public int damageValue;
public int dspDamage;
public int displayDamage;
public int maxDamage;
public AESharedNBT tagCompound;
@@ -51,7 +51,7 @@ public class AEItemDef
AEItemDef t = new AEItemDef( item );
t.def = def;
t.damageValue = damageValue;
t.dspDamage = dspDamage;
t.displayDamage = displayDamage;
t.maxDamage = maxDamage;
t.tagCompound = tagCompound;
t.isOre = isOre;
+30 -30
View File
@@ -69,16 +69,16 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
*/
/*
* Super Hacky.
* Super hackery.
*
* is.itemID = appeng.api.Materials.matQuartz.itemID; damageValue = is.getItemDamage(); is.itemID = itemID;
*/
/*
* Kinda Hacky
* Kinda hackery
*/
def.damageValue = def.getDamageValueHack( is );
def.dspDamage = is.getItemDamageForDisplay();
def.displayDamage = is.getItemDamageForDisplay();
def.maxDamage = is.getMaxDamage();
NBTTagCompound tagCompound = is.getTagCompound();
@@ -218,12 +218,12 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
if ( itemstack == null )
return null;
AEItemStack aeis = AEItemStack.create( itemstack );
// aeis.priority = i.getInteger( "Priority" );
aeis.stackSize = i.getLong( "Cnt" );
aeis.setCountRequestable( i.getLong( "Req" ) );
aeis.setCraftable( i.getBoolean( "Craft" ) );
return aeis;
AEItemStack item = AEItemStack.create( itemstack );
// item.priority = i.getInteger( "Priority" );
item.stackSize = i.getLong( "Cnt" );
item.setCountRequestable( i.getLong( "Req" ) );
item.setCraftable( i.getBoolean( "Craft" ) );
return item;
}
@Override
@@ -242,10 +242,10 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
public int compareTo(AEItemStack b)
{
int id = compare( def.item.hashCode(), b.def.item.hashCode() );
int dv = compare( def.damageValue, b.def.damageValue );
int dspv = compare( def.dspDamage, b.def.dspDamage );
int damageValue = compare( def.damageValue, b.def.damageValue );
int displayDamage = compare( def.displayDamage, b.def.displayDamage );
// AELog.info( "NBT: " + nbt );
return id == 0 ? (dv == 0 ? (dspv == 0 ? compareNBT( b.def ) : dspv) : dv) : id;
return id == 0 ? (damageValue == 0 ? (displayDamage == 0 ? compareNBT( b.def ) : displayDamage) : damageValue) : id;
}
private int compareNBT(AEItemDef b)
@@ -370,12 +370,12 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
if ( itemstack == null )
return null;
AEItemStack aeis = AEItemStack.create( itemstack );
// aeis.priority = (int) priority;
aeis.stackSize = stackSize;
aeis.setCountRequestable( countRequestable );
aeis.setCraftable( isCraftable );
return aeis;
AEItemStack item = AEItemStack.create( itemstack );
// item.priority = (int) priority;
item.stackSize = stackSize;
item.setCountRequestable( countRequestable );
item.setCraftable( isCraftable );
return item;
}
@Override
@@ -508,7 +508,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
if ( ignoreMeta )
{
newDef.dspDamage = newDef.damageValue = 0;
newDef.displayDamage = newDef.damageValue = 0;
newDef.reHash();
return bottom;
}
@@ -517,23 +517,23 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
{
if ( fuzzy == FuzzyMode.IGNORE_ALL )
{
newDef.dspDamage = 0;
newDef.displayDamage = 0;
}
else if ( fuzzy == FuzzyMode.PERCENT_99 )
{
if ( def.damageValue == 0 )
newDef.dspDamage = 0;
newDef.displayDamage = 0;
else
newDef.dspDamage = 1;
newDef.displayDamage = 1;
}
else
{
int breakpoint = fuzzy.calculateBreakPoint( def.maxDamage );
newDef.dspDamage = breakpoint <= def.dspDamage ? breakpoint : 0;
newDef.displayDamage = breakpoint <= def.displayDamage ? breakpoint : 0;
}
newDef.damageValue = newDef.dspDamage;
newDef.damageValue = newDef.displayDamage;
}
newDef.tagCompound = AEItemDef.lowTag;
@@ -548,7 +548,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
if ( ignoreMeta )
{
newDef.dspDamage = newDef.damageValue = Integer.MAX_VALUE;
newDef.displayDamage = newDef.damageValue = Integer.MAX_VALUE;
newDef.reHash();
return top;
}
@@ -557,22 +557,22 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
{
if ( fuzzy == FuzzyMode.IGNORE_ALL )
{
newDef.dspDamage = def.maxDamage + 1;
newDef.displayDamage = def.maxDamage + 1;
}
else if ( fuzzy == FuzzyMode.PERCENT_99 )
{
if ( def.damageValue == 0 )
newDef.dspDamage = 0;
newDef.displayDamage = 0;
else
newDef.dspDamage = def.maxDamage + 1;
newDef.displayDamage = def.maxDamage + 1;
}
else
{
int breakpoint = fuzzy.calculateBreakPoint( def.maxDamage );
newDef.dspDamage = def.dspDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1;
newDef.displayDamage = def.displayDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1;
}
newDef.damageValue = newDef.dspDamage;
newDef.damageValue = newDef.displayDamage;
}
newDef.tagCompound = AEItemDef.highTag;
@@ -83,9 +83,9 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
return super.equals( par1Obj );
}
public boolean matches(Item itemid2, int meta2, int orderlessHash)
public boolean matches(Item item, int meta, int orderlessHash)
{
return itemid2 == item && meta == meta2 && hash == orderlessHash;
return item == this.item && this.meta == meta && hash == orderlessHash;
}
public boolean comparePreciseWithRegistry(AESharedNBT tagCompound)
@@ -148,7 +148,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
if ( tagCompound.hasNoTags() )
return null;
Item itemid = s.getItem();
Item item = s.getItem();
int meta = -1;
if ( s.getItem() != null && s.isItemStackDamageable() && s.getHasSubtypes() )
meta = s.getItemDamage();
@@ -156,7 +156,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
if ( isShared( tagCompound ) )
return tagCompound;
SharedSearchObject sso = new SharedSearchObject( itemid, meta, tagCompound );
SharedSearchObject sso = new SharedSearchObject( item, meta, tagCompound );
WeakReference<SharedSearchObject> c = sharedTagCompounds.get( sso );
if ( c != null )
@@ -167,7 +167,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
// as its already certain to exist..
}
AESharedNBT clone = AESharedNBT.createFromCompound( itemid, meta, tagCompound );
AESharedNBT clone = AESharedNBT.createFromCompound( item, meta, tagCompound );
sso.compound = (NBTTagCompound) sso.compound.copy(); // prevent
// modification
// of data based
@@ -12,8 +12,8 @@ import appeng.api.storage.data.IAEItemStack;
public class OreReference
{
private LinkedList<ItemStack> otherOptions = new LinkedList();
private ArrayList aeotherOptions = null;
private LinkedList<ItemStack> otherOptions = new LinkedList<ItemStack>();
private ArrayList<IAEItemStack> aeOtherOptions = null;
private HashSet<Integer> ores = new HashSet<Integer>();
public Collection<ItemStack> getEquivalents()
@@ -23,17 +23,17 @@ public class OreReference
public List<IAEItemStack> getAEEquivalents()
{
if ( aeotherOptions == null )
if ( aeOtherOptions == null )
{
aeotherOptions = new ArrayList( otherOptions.size() );
aeOtherOptions = new ArrayList<IAEItemStack>( otherOptions.size() );
// SUMMON AE STACKS!
for (ItemStack is : otherOptions)
if ( is.getItem() != null )
aeotherOptions.add( AEItemStack.create( is ) );
aeOtherOptions.add( AEItemStack.create( is ) );
}
return aeotherOptions;
return aeOtherOptions;
}
public Collection<Integer> getOres()