Changed access to use this qualifier
This commit is contained in:
@@ -47,13 +47,13 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getFluidStack().toString();
|
||||
return this.getFluidStack().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAETagCompound getTagCompound()
|
||||
{
|
||||
return tagCompound;
|
||||
return this.tagCompound;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -65,19 +65,19 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
// if ( priority < ((AEFluidStack) option).priority )
|
||||
// priority = ((AEFluidStack) option).priority;
|
||||
|
||||
incStackSize( option.getStackSize() );
|
||||
setCountRequestable( getCountRequestable() + option.getCountRequestable() );
|
||||
setCraftable( isCraftable() || option.isCraftable() );
|
||||
this.incStackSize( option.getStackSize() );
|
||||
this.setCountRequestable( this.getCountRequestable() + option.getCountRequestable() );
|
||||
this.setCraftable( this.isCraftable() || option.isCraftable() );
|
||||
}
|
||||
|
||||
private AEFluidStack(AEFluidStack is) {
|
||||
|
||||
fluid = is.fluid;
|
||||
stackSize = is.stackSize;
|
||||
this.fluid = is.fluid;
|
||||
this.stackSize = is.stackSize;
|
||||
|
||||
// priority = is.priority;
|
||||
setCraftable( is.isCraftable() );
|
||||
setCountRequestable( is.getCountRequestable() );
|
||||
this.setCraftable( is.isCraftable() );
|
||||
this.setCountRequestable( is.getCountRequestable() );
|
||||
|
||||
this.myHash = is.myHash;
|
||||
}
|
||||
@@ -86,16 +86,16 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
if ( is == null )
|
||||
throw new RuntimeException( "Invalid Itemstack." );
|
||||
|
||||
fluid = is.getFluid();
|
||||
this.fluid = is.getFluid();
|
||||
|
||||
if ( fluid == null )
|
||||
if ( this.fluid == null )
|
||||
throw new RuntimeException( "Fluid is null." );
|
||||
|
||||
stackSize = is.amount;
|
||||
setCraftable( false );
|
||||
setCountRequestable( 0 );
|
||||
this.stackSize = is.amount;
|
||||
this.setCraftable( false );
|
||||
this.setCountRequestable( 0 );
|
||||
|
||||
myHash = fluid.hashCode() ^ (tagCompound == null ? 0 : System.identityHashCode( tagCompound ));
|
||||
this.myHash = this.fluid.hashCode() ^ (this.tagCompound == null ? 0 : System.identityHashCode( this.tagCompound ));
|
||||
}
|
||||
|
||||
public static AEFluidStack create(Object a)
|
||||
@@ -114,7 +114,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
{
|
||||
if ( ia instanceof AEFluidStack )
|
||||
{
|
||||
return ((AEFluidStack) ia).fluid == fluid && tagCompound == ((AEFluidStack) ia).tagCompound;
|
||||
return ((AEFluidStack) ia).fluid == this.fluid && this.tagCompound == ((AEFluidStack) ia).tagCompound;
|
||||
}
|
||||
else if ( ia instanceof FluidStack )
|
||||
{
|
||||
@@ -122,7 +122,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
|
||||
if ( is.fluidID == this.fluid.getID() )
|
||||
{
|
||||
NBTTagCompound ta = (NBTTagCompound) tagCompound;
|
||||
NBTTagCompound ta = (NBTTagCompound) this.tagCompound;
|
||||
NBTTagCompound tb = is.tag;
|
||||
if ( ta == tb )
|
||||
return true;
|
||||
@@ -146,9 +146,9 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
@Override
|
||||
public FluidStack getFluidStack()
|
||||
{
|
||||
FluidStack is = new FluidStack( fluid, (int) Math.min( Integer.MAX_VALUE, stackSize ) );
|
||||
if ( tagCompound != null )
|
||||
is.tag = tagCompound.getNBTTagCompoundCopy();
|
||||
FluidStack is = new FluidStack( this.fluid, (int) Math.min( Integer.MAX_VALUE, this.stackSize ) );
|
||||
if ( this.tagCompound != null )
|
||||
is.tag = this.tagCompound.getNBTTagCompoundCopy();
|
||||
|
||||
return is;
|
||||
}
|
||||
@@ -197,8 +197,8 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
* 1 : 0); else
|
||||
*/i.setBoolean( "Craft", this.isCraftable() );
|
||||
|
||||
if ( tagCompound != null )
|
||||
i.setTag( "tag", (NBTTagCompound) tagCompound );
|
||||
if ( this.tagCompound != null )
|
||||
i.setTag( "tag", (NBTTagCompound) this.tagCompound );
|
||||
else
|
||||
i.removeTag( "tag" );
|
||||
|
||||
@@ -220,26 +220,26 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
@Override
|
||||
public boolean hasTagCompound()
|
||||
{
|
||||
return tagCompound != null;
|
||||
return this.tagCompound != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return myHash;
|
||||
return this.myHash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(AEFluidStack b)
|
||||
{
|
||||
int diff = hashCode() - b.hashCode();
|
||||
int diff = this.hashCode() - b.hashCode();
|
||||
return diff > 0 ? 1 : (diff < 0 ? -1 : 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
void writeIdentity(ByteBuf i) throws IOException
|
||||
{
|
||||
byte[] name = fluid.getName().getBytes( "UTF-8" );
|
||||
byte[] name = this.fluid.getName().getBytes( "UTF-8" );
|
||||
i.writeByte( (byte) name.length );
|
||||
i.writeBytes( name );
|
||||
}
|
||||
@@ -247,12 +247,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
@Override
|
||||
void readNBT(ByteBuf i) throws IOException
|
||||
{
|
||||
if ( hasTagCompound() )
|
||||
if ( this.hasTagCompound() )
|
||||
{
|
||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||
DataOutputStream data = new DataOutputStream( bytes );
|
||||
|
||||
CompressedStreamTools.write( (NBTTagCompound) getTagCompound(), data );
|
||||
CompressedStreamTools.write( (NBTTagCompound) this.getTagCompound(), data );
|
||||
|
||||
byte[] tagBytes = bytes.toByteArray();
|
||||
int size = tagBytes.length;
|
||||
@@ -311,13 +311,13 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
@Override
|
||||
public Fluid getFluid()
|
||||
{
|
||||
return fluid;
|
||||
return this.fluid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEFluidStack empty()
|
||||
{
|
||||
IAEFluidStack dup = copy();
|
||||
IAEFluidStack dup = this.copy();
|
||||
dup.reset();
|
||||
return dup;
|
||||
}
|
||||
@@ -327,12 +327,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
|
||||
{
|
||||
if ( st instanceof FluidStack )
|
||||
{
|
||||
return ((FluidStack) st).getFluid() == getFluid();
|
||||
return ((FluidStack) st).getFluid() == this.getFluid();
|
||||
}
|
||||
|
||||
if ( st instanceof IAEFluidStack )
|
||||
{
|
||||
return ((IAEFluidStack) st).getFluid() == getFluid();
|
||||
return ((IAEFluidStack) st).getFluid() == this.getFluid();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -59,19 +59,19 @@ public class AEItemDef
|
||||
static final AESharedNBT highTag = new AESharedNBT( Integer.MAX_VALUE );
|
||||
|
||||
public AEItemDef(Item it) {
|
||||
item = it;
|
||||
itemID = System.identityHashCode( item );
|
||||
this.item = it;
|
||||
this.itemID = System.identityHashCode( this.item );
|
||||
}
|
||||
|
||||
public AEItemDef copy()
|
||||
{
|
||||
AEItemDef t = new AEItemDef( item );
|
||||
t.def = def;
|
||||
t.damageValue = damageValue;
|
||||
t.displayDamage = displayDamage;
|
||||
t.maxDamage = maxDamage;
|
||||
t.tagCompound = tagCompound;
|
||||
t.isOre = isOre;
|
||||
AEItemDef t = new AEItemDef( this.item );
|
||||
t.def = this.def;
|
||||
t.damageValue = this.damageValue;
|
||||
t.displayDamage = this.displayDamage;
|
||||
t.maxDamage = this.maxDamage;
|
||||
t.tagCompound = this.tagCompound;
|
||||
t.isOre = this.isOre;
|
||||
return t;
|
||||
}
|
||||
|
||||
@@ -80,10 +80,10 @@ public class AEItemDef
|
||||
{
|
||||
if ( obj == null )
|
||||
return false;
|
||||
if ( getClass() != obj.getClass() )
|
||||
if ( this.getClass() != obj.getClass() )
|
||||
return false;
|
||||
AEItemDef other = (AEItemDef) obj;
|
||||
return other.damageValue == damageValue && other.item == item && tagCompound == other.tagCompound;
|
||||
return other.damageValue == this.damageValue && other.item == this.item && this.tagCompound == other.tagCompound;
|
||||
}
|
||||
|
||||
public int getDamageValueHack(ItemStack is)
|
||||
@@ -94,15 +94,15 @@ public class AEItemDef
|
||||
public boolean isItem(ItemStack otherStack)
|
||||
{
|
||||
// hackery!
|
||||
int dmg = getDamageValueHack( otherStack );
|
||||
int dmg = this.getDamageValueHack( otherStack );
|
||||
|
||||
if ( item == otherStack.getItem() && dmg == damageValue )
|
||||
if ( this.item == otherStack.getItem() && dmg == this.damageValue )
|
||||
{
|
||||
if ( (tagCompound != null) == otherStack.hasTagCompound() )
|
||||
if ( (this.tagCompound != null) == otherStack.hasTagCompound() )
|
||||
return true;
|
||||
|
||||
if ( tagCompound != null && otherStack.hasTagCompound() )
|
||||
return Platform.NBTEqualityTest( tagCompound, otherStack.getTagCompound() );
|
||||
if ( this.tagCompound != null && otherStack.hasTagCompound() )
|
||||
return Platform.NBTEqualityTest( this.tagCompound, otherStack.getTagCompound() );
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ public class AEItemDef
|
||||
|
||||
public void reHash()
|
||||
{
|
||||
def = itemID << Platform.DEF_OFFSET | damageValue;
|
||||
myHash = def ^ (tagCompound == null ? 0 : System.identityHashCode( tagCompound ));
|
||||
this.def = this.itemID << Platform.DEF_OFFSET | this.damageValue;
|
||||
this.myHash = this.def ^ (this.tagCompound == null ? 0 : System.identityHashCode( this.tagCompound ));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return getItemStack().toString();
|
||||
return this.getItemStack().toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -61,25 +61,25 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
// if ( priority < ((AEItemStack) option).priority )
|
||||
// priority = ((AEItemStack) option).priority;
|
||||
|
||||
incStackSize( option.getStackSize() );
|
||||
setCountRequestable( getCountRequestable() + option.getCountRequestable() );
|
||||
setCraftable( isCraftable() || option.isCraftable() );
|
||||
this.incStackSize( option.getStackSize() );
|
||||
this.setCountRequestable( this.getCountRequestable() + option.getCountRequestable() );
|
||||
this.setCraftable( this.isCraftable() || option.isCraftable() );
|
||||
}
|
||||
|
||||
private AEItemStack(AEItemStack is) {
|
||||
def = is.def;
|
||||
stackSize = is.stackSize;
|
||||
setCraftable( is.isCraftable() );
|
||||
setCountRequestable( is.getCountRequestable() );
|
||||
this.def = is.def;
|
||||
this.stackSize = is.stackSize;
|
||||
this.setCraftable( is.isCraftable() );
|
||||
this.setCountRequestable( is.getCountRequestable() );
|
||||
}
|
||||
|
||||
protected AEItemStack(ItemStack is) {
|
||||
if ( is == null )
|
||||
throw new RuntimeException( "Invalid Itemstack." );
|
||||
|
||||
def = new AEItemDef( is.getItem() );
|
||||
this.def = new AEItemDef( is.getItem() );
|
||||
|
||||
if ( def.item == null )
|
||||
if ( this.def.item == null )
|
||||
throw new RuntimeException( "This ItemStack is bad, it has a null item." );
|
||||
|
||||
/*
|
||||
@@ -95,20 +95,20 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
/*
|
||||
* Kinda hackery
|
||||
*/
|
||||
def.damageValue = def.getDamageValueHack( is );
|
||||
def.displayDamage = is.getItemDamageForDisplay();
|
||||
def.maxDamage = is.getMaxDamage();
|
||||
this.def.damageValue = this.def.getDamageValueHack( is );
|
||||
this.def.displayDamage = is.getItemDamageForDisplay();
|
||||
this.def.maxDamage = is.getMaxDamage();
|
||||
|
||||
NBTTagCompound tagCompound = is.getTagCompound();
|
||||
if ( tagCompound != null )
|
||||
def.tagCompound = (AESharedNBT) AESharedNBT.getSharedTagCompound( tagCompound, is );
|
||||
this.def.tagCompound = (AESharedNBT) AESharedNBT.getSharedTagCompound( tagCompound, is );
|
||||
|
||||
stackSize = is.stackSize;
|
||||
setCraftable( false );
|
||||
setCountRequestable( 0 );
|
||||
this.stackSize = is.stackSize;
|
||||
this.setCraftable( false );
|
||||
this.setCountRequestable( 0 );
|
||||
|
||||
def.reHash();
|
||||
def.isOre = OreHelper.instance.isOre( is );
|
||||
this.def.reHash();
|
||||
this.def.isOre = OreHelper.instance.isOre( is );
|
||||
}
|
||||
|
||||
public static AEItemStack create(Object a)
|
||||
@@ -123,7 +123,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@Override
|
||||
public Item getItem()
|
||||
{
|
||||
return def.item;
|
||||
return this.def.item;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -131,15 +131,15 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
{
|
||||
if ( ia instanceof AEItemStack )
|
||||
{
|
||||
return ((AEItemStack) ia).def.equals( def );// && def.tagCompound == ((AEItemStack) ia).def.tagCompound;
|
||||
return ((AEItemStack) ia).def.equals( this.def );// && def.tagCompound == ((AEItemStack) ia).def.tagCompound;
|
||||
}
|
||||
else if ( ia instanceof ItemStack )
|
||||
{
|
||||
ItemStack is = (ItemStack) ia;
|
||||
|
||||
if ( is.getItem() == def.item && is.getItemDamage() == this.def.damageValue )
|
||||
if ( is.getItem() == this.def.item && is.getItemDamage() == this.def.damageValue )
|
||||
{
|
||||
NBTTagCompound ta = def.tagCompound;
|
||||
NBTTagCompound ta = this.def.tagCompound;
|
||||
NBTTagCompound tb = is.getTagCompound();
|
||||
if ( ta == tb )
|
||||
return true;
|
||||
@@ -163,9 +163,9 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@Override
|
||||
public ItemStack getItemStack()
|
||||
{
|
||||
ItemStack is = new ItemStack( def.item, (int) Math.min( Integer.MAX_VALUE, stackSize ), def.damageValue );
|
||||
if ( def.tagCompound != null )
|
||||
is.setTagCompound( def.tagCompound.getNBTTagCompoundCopy() );
|
||||
ItemStack is = new ItemStack( this.def.item, (int) Math.min( Integer.MAX_VALUE, this.stackSize ), this.def.damageValue );
|
||||
if ( this.def.tagCompound != null )
|
||||
is.setTagCompound( this.def.tagCompound.getNBTTagCompoundCopy() );
|
||||
|
||||
return is;
|
||||
}
|
||||
@@ -220,8 +220,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
*/
|
||||
i.setShort( "Damage", (short) this.def.damageValue );
|
||||
|
||||
if ( def.tagCompound != null )
|
||||
i.setTag( "tag", def.tagCompound );
|
||||
if ( this.def.tagCompound != null )
|
||||
i.setTag( "tag", this.def.tagCompound );
|
||||
else
|
||||
i.removeTag( "tag" );
|
||||
|
||||
@@ -247,30 +247,30 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@Override
|
||||
public boolean hasTagCompound()
|
||||
{
|
||||
return def.tagCompound != null;
|
||||
return this.def.tagCompound != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return def.myHash;
|
||||
return this.def.myHash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(AEItemStack b)
|
||||
{
|
||||
int id = compare( def.item.hashCode(), b.def.item.hashCode() );
|
||||
int damageValue = compare( def.damageValue, b.def.damageValue );
|
||||
int displayDamage = compare( def.displayDamage, b.def.displayDamage );
|
||||
int id = this.compare( this.def.item.hashCode(), b.def.item.hashCode() );
|
||||
int damageValue = this.compare( this.def.damageValue, b.def.damageValue );
|
||||
int displayDamage = this.compare( this.def.displayDamage, b.def.displayDamage );
|
||||
// AELog.info( "NBT: " + nbt );
|
||||
return id == 0 ? (damageValue == 0 ? (displayDamage == 0 ? compareNBT( b.def ) : displayDamage) : damageValue) : id;
|
||||
return id == 0 ? (damageValue == 0 ? (displayDamage == 0 ? this.compareNBT( b.def ) : displayDamage) : damageValue) : id;
|
||||
}
|
||||
|
||||
private int compareNBT(AEItemDef b)
|
||||
{
|
||||
int nbt = compare( (def.tagCompound == null ? 0 : def.tagCompound.getHash()), (b.tagCompound == null ? 0 : b.tagCompound.getHash()) );
|
||||
int nbt = this.compare( (this.def.tagCompound == null ? 0 : this.def.tagCompound.getHash()), (b.tagCompound == null ? 0 : b.tagCompound.getHash()) );
|
||||
if ( nbt == 0 )
|
||||
return compare( System.identityHashCode( def.tagCompound ), System.identityHashCode( b.tagCompound ) );
|
||||
return this.compare( System.identityHashCode( this.def.tagCompound ), System.identityHashCode( b.tagCompound ) );
|
||||
return nbt;
|
||||
}
|
||||
|
||||
@@ -282,28 +282,28 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@SideOnly(Side.CLIENT)
|
||||
public List getToolTip()
|
||||
{
|
||||
if ( def.tooltip != null )
|
||||
return def.tooltip;
|
||||
if ( this.def.tooltip != null )
|
||||
return this.def.tooltip;
|
||||
|
||||
return def.tooltip = Platform.getTooltip( getItemStack() );
|
||||
return this.def.tooltip = Platform.getTooltip( this.getItemStack() );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getDisplayName()
|
||||
{
|
||||
if ( def.displayName != null )
|
||||
return def.displayName;
|
||||
if ( this.def.displayName != null )
|
||||
return this.def.displayName;
|
||||
|
||||
return def.displayName = Platform.getItemDisplayName( getItemStack() );
|
||||
return this.def.displayName = Platform.getItemDisplayName( this.getItemStack() );
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public String getModID()
|
||||
{
|
||||
if ( def.uniqueID != null )
|
||||
return getModName( def.uniqueID );
|
||||
if ( this.def.uniqueID != null )
|
||||
return this.getModName( this.def.uniqueID );
|
||||
|
||||
return getModName( def.uniqueID = GameRegistry.findUniqueIdentifierFor( def.item ) );
|
||||
return this.getModName( this.def.uniqueID = GameRegistry.findUniqueIdentifierFor( this.def.item ) );
|
||||
}
|
||||
|
||||
private String getModName(UniqueIdentifier uniqueIdentifier)
|
||||
@@ -317,7 +317,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@Override
|
||||
public IAEItemStack empty()
|
||||
{
|
||||
IAEItemStack dup = copy();
|
||||
IAEItemStack dup = this.copy();
|
||||
dup.reset();
|
||||
return dup;
|
||||
}
|
||||
@@ -325,25 +325,25 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@Override
|
||||
public int getItemDamage()
|
||||
{
|
||||
return def.damageValue;
|
||||
return this.def.damageValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
void writeIdentity(ByteBuf i) throws IOException
|
||||
{
|
||||
i.writeShort( Item.itemRegistry.getIDForObject( def.item ) );
|
||||
i.writeShort( getItemDamage() );
|
||||
i.writeShort( Item.itemRegistry.getIDForObject( this.def.item ) );
|
||||
i.writeShort( this.getItemDamage() );
|
||||
}
|
||||
|
||||
@Override
|
||||
void readNBT(ByteBuf i) throws IOException
|
||||
{
|
||||
if ( hasTagCompound() )
|
||||
if ( this.hasTagCompound() )
|
||||
{
|
||||
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
|
||||
DataOutputStream data = new DataOutputStream( bytes );
|
||||
|
||||
CompressedStreamTools.write( (NBTTagCompound) getTagCompound(), data );
|
||||
CompressedStreamTools.write( (NBTTagCompound) this.getTagCompound(), data );
|
||||
|
||||
byte[] tagBytes = bytes.toByteArray();
|
||||
int size = tagBytes.length;
|
||||
@@ -409,14 +409,14 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
{
|
||||
IAEItemStack o = (IAEItemStack) st;
|
||||
|
||||
if ( sameOre( o ) )
|
||||
if ( this.sameOre( o ) )
|
||||
return true;
|
||||
|
||||
if ( o.getItem() == getItem() )
|
||||
if ( o.getItem() == this.getItem() )
|
||||
{
|
||||
if ( def.item.isDamageable() )
|
||||
if ( this.def.item.isDamageable() )
|
||||
{
|
||||
ItemStack a = getItemStack();
|
||||
ItemStack a = this.getItemStack();
|
||||
ItemStack b = o.getItemStack();
|
||||
|
||||
try
|
||||
@@ -467,11 +467,11 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
|
||||
OreHelper.instance.sameOre( this, o );
|
||||
|
||||
if ( o.getItem() == getItem() )
|
||||
if ( o.getItem() == this.getItem() )
|
||||
{
|
||||
if ( def.item.isDamageable() )
|
||||
if ( this.def.item.isDamageable() )
|
||||
{
|
||||
ItemStack a = getItemStack();
|
||||
ItemStack a = this.getItemStack();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -538,7 +538,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
}
|
||||
else if ( fuzzy == FuzzyMode.PERCENT_99 )
|
||||
{
|
||||
if ( def.damageValue == 0 )
|
||||
if ( this.def.damageValue == 0 )
|
||||
newDef.displayDamage = 0;
|
||||
else
|
||||
newDef.displayDamage = 1;
|
||||
@@ -546,8 +546,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
}
|
||||
else
|
||||
{
|
||||
int breakpoint = fuzzy.calculateBreakPoint( def.maxDamage );
|
||||
newDef.displayDamage = breakpoint <= def.displayDamage ? breakpoint : 0;
|
||||
int breakpoint = fuzzy.calculateBreakPoint( this.def.maxDamage );
|
||||
newDef.displayDamage = breakpoint <= this.def.displayDamage ? breakpoint : 0;
|
||||
}
|
||||
|
||||
newDef.damageValue = newDef.displayDamage;
|
||||
@@ -574,19 +574,19 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
{
|
||||
if ( fuzzy == FuzzyMode.IGNORE_ALL )
|
||||
{
|
||||
newDef.displayDamage = def.maxDamage + 1;
|
||||
newDef.displayDamage = this.def.maxDamage + 1;
|
||||
}
|
||||
else if ( fuzzy == FuzzyMode.PERCENT_99 )
|
||||
{
|
||||
if ( def.damageValue == 0 )
|
||||
if ( this.def.damageValue == 0 )
|
||||
newDef.displayDamage = 0;
|
||||
else
|
||||
newDef.displayDamage = def.maxDamage + 1;
|
||||
newDef.displayDamage = this.def.maxDamage + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
int breakpoint = fuzzy.calculateBreakPoint( def.maxDamage );
|
||||
newDef.displayDamage = def.displayDamage < breakpoint ? breakpoint - 1 : def.maxDamage + 1;
|
||||
int breakpoint = fuzzy.calculateBreakPoint( this.def.maxDamage );
|
||||
newDef.displayDamage = this.def.displayDamage < breakpoint ? breakpoint - 1 : this.def.maxDamage + 1;
|
||||
}
|
||||
|
||||
newDef.damageValue = newDef.displayDamage;
|
||||
@@ -600,7 +600,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
@Override
|
||||
public IAETagCompound getTagCompound()
|
||||
{
|
||||
return def.tagCompound;
|
||||
return this.def.tagCompound;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -609,7 +609,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
if ( otherStack == null )
|
||||
return false;
|
||||
|
||||
return def.equals( ((AEItemStack) otherStack).def );
|
||||
return this.def.equals( ((AEItemStack) otherStack).def );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -618,7 +618,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
if ( otherStack == null )
|
||||
return false;
|
||||
|
||||
return def.isItem( otherStack );
|
||||
return this.def.isItem( otherStack );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -641,7 +641,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
|
||||
|
||||
public boolean isOre()
|
||||
{
|
||||
return def.isOre != null;
|
||||
return this.def.isOre != null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -43,32 +43,32 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
|
||||
public int getHash()
|
||||
{
|
||||
return hash;
|
||||
return this.hash;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemComparison getSpecialComparison()
|
||||
{
|
||||
return comp;
|
||||
return this.comp;
|
||||
}
|
||||
|
||||
private AESharedNBT(Item itemID, int damageValue) {
|
||||
super();
|
||||
item = itemID;
|
||||
meta = damageValue;
|
||||
this.item = itemID;
|
||||
this.meta = damageValue;
|
||||
}
|
||||
|
||||
public AESharedNBT(int fakeValue) {
|
||||
super();
|
||||
item = null;
|
||||
meta = 0;
|
||||
hash = fakeValue;
|
||||
this.item = null;
|
||||
this.meta = 0;
|
||||
this.hash = fakeValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTTagCompound getNBTTagCompoundCopy()
|
||||
{
|
||||
return (NBTTagCompound) copy();
|
||||
return (NBTTagCompound) this.copy();
|
||||
}
|
||||
|
||||
public static AESharedNBT createFromCompound(Item itemID, int damageValue, NBTTagCompound c)
|
||||
@@ -101,7 +101,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
|
||||
public boolean matches(Item item, int meta, int orderlessHash)
|
||||
{
|
||||
return item == this.item && this.meta == meta && hash == orderlessHash;
|
||||
return item == this.item && this.meta == meta && this.hash == orderlessHash;
|
||||
}
|
||||
|
||||
public boolean comparePreciseWithRegistry(AESharedNBT tagCompound)
|
||||
@@ -109,9 +109,9 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
if ( this == tagCompound )
|
||||
return true;
|
||||
|
||||
if ( comp != null && tagCompound.comp != null )
|
||||
if ( this.comp != null && tagCompound.comp != null )
|
||||
{
|
||||
return comp.sameAsPrecise( tagCompound.comp );
|
||||
return this.comp.sameAsPrecise( tagCompound.comp );
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -124,12 +124,12 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
|
||||
if ( tagCompound == null )
|
||||
return false;
|
||||
|
||||
if ( comp == tagCompound.comp )
|
||||
if ( this.comp == tagCompound.comp )
|
||||
return true;
|
||||
|
||||
if ( comp != null )
|
||||
if ( this.comp != null )
|
||||
{
|
||||
return comp.sameAsFuzzy( tagCompound.comp );
|
||||
return this.comp.sameAsFuzzy( tagCompound.comp );
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -34,36 +34,36 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
||||
@Override
|
||||
public boolean isMeaningful()
|
||||
{
|
||||
return stackSize != 0 || getCountRequestable() > 0 || isCraftable();
|
||||
return this.stackSize != 0 || this.getCountRequestable() > 0 || this.isCraftable();
|
||||
}
|
||||
|
||||
@Override
|
||||
public StackType reset()
|
||||
{
|
||||
stackSize = 0;
|
||||
this.stackSize = 0;
|
||||
// priority = Integer.MIN_VALUE;
|
||||
setCountRequestable( 0 );
|
||||
setCraftable( false );
|
||||
this.setCountRequestable( 0 );
|
||||
this.setCraftable( false );
|
||||
return (StackType) this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getStackSize()
|
||||
{
|
||||
return stackSize;
|
||||
return this.stackSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StackType setStackSize(long ss)
|
||||
{
|
||||
stackSize = ss;
|
||||
this.stackSize = ss;
|
||||
return (StackType) this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getCountRequestable()
|
||||
{
|
||||
return countRequestable;
|
||||
return this.countRequestable;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -76,7 +76,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
||||
@Override
|
||||
public boolean isCraftable()
|
||||
{
|
||||
return isCraftable;
|
||||
return this.isCraftable;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,25 +89,25 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
||||
@Override
|
||||
public void decStackSize(long i)
|
||||
{
|
||||
stackSize -= i;
|
||||
this.stackSize -= i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incStackSize(long i)
|
||||
{
|
||||
stackSize += i;
|
||||
this.stackSize += i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void decCountRequestable(long i)
|
||||
{
|
||||
countRequestable -= i;
|
||||
this.countRequestable -= i;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void incCountRequestable(long i)
|
||||
{
|
||||
countRequestable += i;
|
||||
this.countRequestable += i;
|
||||
}
|
||||
|
||||
void putPacketValue(ByteBuf tag, long num)
|
||||
@@ -167,17 +167,17 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
|
||||
@Override
|
||||
public void writeToPacket(ByteBuf i) throws IOException
|
||||
{
|
||||
byte mask = (byte) (getType( 0 ) | (getType( stackSize ) << 2) | (getType( getCountRequestable() ) << 4) | ((byte) (isCraftable ? 1 : 0) << 6) | (hasTagCompound() ? 1
|
||||
byte mask = (byte) (this.getType( 0 ) | (this.getType( this.stackSize ) << 2) | (this.getType( this.getCountRequestable() ) << 4) | ((byte) (this.isCraftable ? 1 : 0) << 6) | (this.hasTagCompound() ? 1
|
||||
: 0) << 7);
|
||||
|
||||
i.writeByte( mask );
|
||||
writeIdentity( i );
|
||||
this.writeIdentity( i );
|
||||
|
||||
readNBT( i );
|
||||
this.readNBT( i );
|
||||
|
||||
// putPacketValue( i, priority );
|
||||
putPacketValue( i, stackSize );
|
||||
putPacketValue( i, getCountRequestable() );
|
||||
this.putPacketValue( i, this.stackSize );
|
||||
this.putPacketValue( i, this.getCountRequestable() );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
|
||||
public ItemList( Class<? extends IAEStack> cla )
|
||||
{
|
||||
clz = cla;
|
||||
this.clz = cla;
|
||||
}
|
||||
|
||||
private boolean checkStackType( StackType st )
|
||||
@@ -60,8 +60,8 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
if ( st == null )
|
||||
return true;
|
||||
|
||||
if ( !clz.isInstance( st ) )
|
||||
throw new RuntimeException( "WRONG TYPE - got " + st.getClass().getName() + " expected " + clz.getName() );
|
||||
if ( !this.clz.isInstance( st ) )
|
||||
throw new RuntimeException( "WRONG TYPE - got " + st.getClass().getName() + " expected " + this.clz.getName() );
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -69,10 +69,10 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
@Override
|
||||
synchronized public void add( StackType option )
|
||||
{
|
||||
if ( checkStackType( option ) )
|
||||
if ( this.checkStackType( option ) )
|
||||
return;
|
||||
|
||||
StackType st = records.get( option );
|
||||
StackType st = this.records.get( option );
|
||||
|
||||
if ( st != null )
|
||||
{
|
||||
@@ -83,17 +83,17 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
|
||||
StackType opt = ( StackType ) option.copy();
|
||||
// opt.setPriority( currentPriority );
|
||||
records.put( opt, opt );
|
||||
this.records.put( opt, opt );
|
||||
}
|
||||
|
||||
@Override
|
||||
synchronized public void addStorage( StackType option ) // adds a stack as
|
||||
// stored.
|
||||
{
|
||||
if ( checkStackType( option ) )
|
||||
if ( this.checkStackType( option ) )
|
||||
return;
|
||||
|
||||
StackType st = records.get( option );
|
||||
StackType st = this.records.get( option );
|
||||
|
||||
if ( st != null )
|
||||
{
|
||||
@@ -104,17 +104,17 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
|
||||
StackType opt = ( StackType ) option.copy();
|
||||
// opt.setPriority( currentPriority );
|
||||
records.put( opt, opt );
|
||||
this.records.put( opt, opt );
|
||||
}
|
||||
|
||||
@Override
|
||||
synchronized public void addCrafting( StackType option ) // adds a stack as
|
||||
// craftable.
|
||||
{
|
||||
if ( checkStackType( option ) )
|
||||
if ( this.checkStackType( option ) )
|
||||
return;
|
||||
|
||||
StackType st = records.get( option );
|
||||
StackType st = this.records.get( option );
|
||||
|
||||
if ( st != null )
|
||||
{
|
||||
@@ -128,7 +128,7 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
opt.setStackSize( 0 );
|
||||
opt.setCraftable( true );
|
||||
|
||||
records.put( opt, opt );
|
||||
this.records.put( opt, opt );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -136,10 +136,10 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
// as
|
||||
// requestable.
|
||||
{
|
||||
if ( checkStackType( option ) )
|
||||
if ( this.checkStackType( option ) )
|
||||
return;
|
||||
|
||||
StackType st = records.get( option );
|
||||
StackType st = this.records.get( option );
|
||||
|
||||
if ( st != null )
|
||||
{
|
||||
@@ -154,7 +154,7 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
opt.setCraftable( false );
|
||||
opt.setCountRequestable( opt.getCountRequestable() );
|
||||
|
||||
records.put( opt, opt );
|
||||
this.records.put( opt, opt );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -182,16 +182,16 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
@Override
|
||||
synchronized public Iterator<StackType> iterator()
|
||||
{
|
||||
return new MeaningfulIterator<StackType>( records.values().iterator() );
|
||||
return new MeaningfulIterator<StackType>( this.records.values().iterator() );
|
||||
}
|
||||
|
||||
@Override
|
||||
synchronized public StackType findPrecise( StackType i )
|
||||
{
|
||||
if ( checkStackType( i ) )
|
||||
if ( this.checkStackType( i ) )
|
||||
return null;
|
||||
|
||||
StackType is = records.get( i );
|
||||
StackType is = this.records.get( i );
|
||||
if ( is != null )
|
||||
{
|
||||
return is;
|
||||
@@ -203,26 +203,26 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
@Override
|
||||
synchronized public int size()
|
||||
{
|
||||
return records.values().size();
|
||||
return this.records.values().size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{
|
||||
return !iterator().hasNext();
|
||||
return !this.iterator().hasNext();
|
||||
}
|
||||
|
||||
public Collection<StackType> findFuzzyDamage( AEItemStack filter, FuzzyMode fuzzy, boolean ignoreMeta )
|
||||
{
|
||||
StackType low = ( StackType ) filter.getLow( fuzzy, ignoreMeta );
|
||||
StackType high = ( StackType ) filter.getHigh( fuzzy, ignoreMeta );
|
||||
return records.subMap( low, true, high, true ).descendingMap().values();
|
||||
return this.records.subMap( low, true, high, true ).descendingMap().values();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<StackType> findFuzzy( StackType filter, FuzzyMode fuzzy )
|
||||
{
|
||||
if ( checkStackType( filter ) )
|
||||
if ( this.checkStackType( filter ) )
|
||||
return new ArrayList<StackType>();
|
||||
|
||||
if ( filter instanceof IAEFluidStack )
|
||||
@@ -244,19 +244,19 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
if ( or.getAEEquivalents().size() == 1 )
|
||||
{
|
||||
IAEItemStack is = or.getAEEquivalents().get( 0 );
|
||||
return findFuzzyDamage( ( AEItemStack ) is, fuzzy, is.getItemDamage() == OreDictionary.WILDCARD_VALUE );
|
||||
return this.findFuzzyDamage( ( AEItemStack ) is, fuzzy, is.getItemDamage() == OreDictionary.WILDCARD_VALUE );
|
||||
}
|
||||
else
|
||||
{
|
||||
Collection<StackType> output = new LinkedList<StackType>();
|
||||
|
||||
for ( IAEItemStack is : or.getAEEquivalents() )
|
||||
output.addAll( findFuzzyDamage( ( AEItemStack ) is, fuzzy, is.getItemDamage() == OreDictionary.WILDCARD_VALUE ) );
|
||||
output.addAll( this.findFuzzyDamage( ( AEItemStack ) is, fuzzy, is.getItemDamage() == OreDictionary.WILDCARD_VALUE ) );
|
||||
|
||||
return output;
|
||||
}
|
||||
}
|
||||
|
||||
return findFuzzyDamage( ais, fuzzy, false );
|
||||
return this.findFuzzyDamage( ais, fuzzy, false );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,47 +32,47 @@ public class ItemModList implements IItemContainer<IAEItemStack>
|
||||
final IItemContainer<IAEItemStack> overrides = AEApi.instance().storage().createItemList();
|
||||
|
||||
public ItemModList(IItemContainer<IAEItemStack> backend) {
|
||||
backingStore = backend;
|
||||
this.backingStore = backend;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(IAEItemStack option)
|
||||
{
|
||||
IAEItemStack over = overrides.findPrecise( option );
|
||||
IAEItemStack over = this.overrides.findPrecise( option );
|
||||
if ( over == null )
|
||||
{
|
||||
over = backingStore.findPrecise( option );
|
||||
over = this.backingStore.findPrecise( option );
|
||||
if ( over == null )
|
||||
overrides.add( option );
|
||||
this.overrides.add( option );
|
||||
else
|
||||
{
|
||||
option.add( over );
|
||||
overrides.add( option );
|
||||
this.overrides.add( option );
|
||||
}
|
||||
}
|
||||
else
|
||||
overrides.add( option );
|
||||
this.overrides.add( option );
|
||||
}
|
||||
|
||||
@Override
|
||||
public IAEItemStack findPrecise(IAEItemStack i)
|
||||
{
|
||||
IAEItemStack over = overrides.findPrecise( i );
|
||||
IAEItemStack over = this.overrides.findPrecise( i );
|
||||
if ( over == null )
|
||||
return backingStore.findPrecise( i );
|
||||
return this.backingStore.findPrecise( i );
|
||||
return over;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<IAEItemStack> findFuzzy(IAEItemStack input, FuzzyMode fuzzy)
|
||||
{
|
||||
return overrides.findFuzzy( input, fuzzy );
|
||||
return this.overrides.findFuzzy( input, fuzzy );
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmpty()
|
||||
{
|
||||
return overrides.isEmpty() && backingStore.isEmpty();
|
||||
return this.overrides.isEmpty() && this.backingStore.isEmpty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ public class MeaningfulIterator<StackType extends IAEStack> implements Iterator<
|
||||
@Override
|
||||
public void remove()
|
||||
{
|
||||
parent.remove();
|
||||
this.parent.remove();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -36,14 +36,14 @@ public class OreHelper
|
||||
|
||||
ItemRef(ItemStack stack)
|
||||
{
|
||||
ref = stack.getItem();
|
||||
this.ref = stack.getItem();
|
||||
|
||||
if ( stack.getItem().isDamageable() )
|
||||
damage = 0; // IGNORED
|
||||
this.damage = 0; // IGNORED
|
||||
else
|
||||
damage = stack.getItemDamage(); // might be important...
|
||||
this.damage = stack.getItemDamage(); // might be important...
|
||||
|
||||
hash = ref.hashCode() ^ damage;
|
||||
this.hash = this.ref.hashCode() ^ this.damage;
|
||||
}
|
||||
|
||||
final Item ref;
|
||||
@@ -55,16 +55,16 @@ public class OreHelper
|
||||
{
|
||||
if ( obj == null )
|
||||
return false;
|
||||
if ( getClass() != obj.getClass() )
|
||||
if ( this.getClass() != obj.getClass() )
|
||||
return false;
|
||||
ItemRef other = (ItemRef) obj;
|
||||
return damage == other.damage && ref == other.ref;
|
||||
return this.damage == other.damage && this.ref == other.ref;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return hash;
|
||||
return this.hash;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -81,12 +81,12 @@ public class OreHelper
|
||||
public OreReference isOre(ItemStack ItemStack)
|
||||
{
|
||||
ItemRef ir = new ItemRef( ItemStack );
|
||||
OreResult or = references.get( ir );
|
||||
OreResult or = this.references.get( ir );
|
||||
|
||||
if ( or == null )
|
||||
{
|
||||
or = new OreResult();
|
||||
references.put( ir, or );
|
||||
this.references.put( ir, or );
|
||||
|
||||
OreReference ref = new OreReference();
|
||||
Collection<Integer> ores = ref.getOres();
|
||||
|
||||
@@ -36,27 +36,27 @@ public class OreReference
|
||||
|
||||
public Collection<ItemStack> getEquivalents()
|
||||
{
|
||||
return otherOptions;
|
||||
return this.otherOptions;
|
||||
}
|
||||
|
||||
public List<IAEItemStack> getAEEquivalents()
|
||||
{
|
||||
if ( aeOtherOptions == null )
|
||||
if ( this.aeOtherOptions == null )
|
||||
{
|
||||
aeOtherOptions = new ArrayList<IAEItemStack>( otherOptions.size() );
|
||||
this.aeOtherOptions = new ArrayList<IAEItemStack>( this.otherOptions.size() );
|
||||
|
||||
// SUMMON AE STACKS!
|
||||
for (ItemStack is : otherOptions)
|
||||
for (ItemStack is : this.otherOptions)
|
||||
if ( is.getItem() != null )
|
||||
aeOtherOptions.add( AEItemStack.create( is ) );
|
||||
this.aeOtherOptions.add( AEItemStack.create( is ) );
|
||||
}
|
||||
|
||||
return aeOtherOptions;
|
||||
return this.aeOtherOptions;
|
||||
}
|
||||
|
||||
public Collection<Integer> getOres()
|
||||
{
|
||||
return ores;
|
||||
return this.ores;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,9 +31,9 @@ public class SharedSearchObject
|
||||
public AESharedNBT shared;
|
||||
|
||||
public SharedSearchObject(Item itemID, int damageValue, NBTTagCompound tagCompound) {
|
||||
def = (damageValue << Platform.DEF_OFFSET) | Item.itemRegistry.getIDForObject( itemID );
|
||||
hash = Platform.NBTOrderlessHash( tagCompound );
|
||||
compound = tagCompound;
|
||||
this.def = (damageValue << Platform.DEF_OFFSET) | Item.itemRegistry.getIDForObject( itemID );
|
||||
this.hash = Platform.NBTOrderlessHash( tagCompound );
|
||||
this.compound = tagCompound;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -41,12 +41,12 @@ public class SharedSearchObject
|
||||
{
|
||||
if ( obj == null )
|
||||
return false;
|
||||
if ( getClass() != obj.getClass() )
|
||||
if ( this.getClass() != obj.getClass() )
|
||||
return false;
|
||||
SharedSearchObject other = (SharedSearchObject) obj;
|
||||
if ( def == other.def && hash == other.hash )
|
||||
if ( this.def == other.def && this.hash == other.hash )
|
||||
{
|
||||
return Platform.NBTEqualityTest( compound, other.compound );
|
||||
return Platform.NBTEqualityTest( this.compound, other.compound );
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -54,7 +54,7 @@ public class SharedSearchObject
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return def ^ hash;
|
||||
return this.def ^ this.hash;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user