final variables and parameters

This commit is contained in:
thatsIch
2015-09-30 14:24:40 +02:00
parent 059523f543
commit 8b3a954f73
732 changed files with 9253 additions and 9256 deletions
@@ -51,7 +51,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
Fluid fluid;
private IAETagCompound tagCompound;
private AEFluidStack( AEFluidStack is )
private AEFluidStack( final AEFluidStack is )
{
this.fluid = is.fluid;
@@ -64,7 +64,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
this.myHash = is.myHash;
}
private AEFluidStack( @Nonnull FluidStack is )
private AEFluidStack( @Nonnull final FluidStack is )
{
this.fluid = is.getFluid();
@@ -80,14 +80,14 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
this.myHash = this.fluid.hashCode() ^ ( this.tagCompound == null ? 0 : System.identityHashCode( this.tagCompound ) );
}
public static IAEFluidStack loadFluidStackFromNBT( NBTTagCompound i )
public static IAEFluidStack loadFluidStackFromNBT( final NBTTagCompound i )
{
ItemStack itemstack = ItemStack.loadItemStackFromNBT( i );
final ItemStack itemstack = ItemStack.loadItemStackFromNBT( i );
if( itemstack == null )
{
return null;
}
AEFluidStack fluid = AEFluidStack.create( itemstack );
final AEFluidStack fluid = AEFluidStack.create( itemstack );
// fluid.priority = i.getInteger( "Priority" );
fluid.stackSize = i.getLong( "Cnt" );
fluid.setCountRequestable( i.getLong( "Req" ) );
@@ -95,7 +95,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
return fluid;
}
public static AEFluidStack create( Object a )
public static AEFluidStack create( final Object a )
{
if( a == null )
{
@@ -112,20 +112,20 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
return null;
}
public static IAEFluidStack loadFluidStackFromPacket( ByteBuf data ) throws IOException
public static IAEFluidStack loadFluidStackFromPacket( final ByteBuf data ) throws IOException
{
byte mask = data.readByte();
final byte mask = data.readByte();
// byte PriorityType = (byte) (mask & 0x03);
byte stackType = (byte) ( ( mask & 0x0C ) >> 2 );
byte countReqType = (byte) ( ( mask & 0x30 ) >> 4 );
boolean isCraftable = ( mask & 0x40 ) > 0;
boolean hasTagCompound = ( mask & 0x80 ) > 0;
final byte stackType = (byte) ( ( mask & 0x0C ) >> 2 );
final byte countReqType = (byte) ( ( mask & 0x30 ) >> 4 );
final boolean isCraftable = ( mask & 0x40 ) > 0;
final boolean hasTagCompound = ( mask & 0x80 ) > 0;
// don't send this...
NBTTagCompound d = new NBTTagCompound();
final NBTTagCompound d = new NBTTagCompound();
byte len2 = data.readByte();
byte[] name = new byte[len2];
final byte len2 = data.readByte();
final byte[] name = new byte[len2];
data.readBytes( name, 0, len2 );
d.setString( "FluidName", new String( name, "UTF-8" ) );
@@ -133,26 +133,26 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
if( hasTagCompound )
{
int len = data.readInt();
final int len = data.readInt();
byte[] bd = new byte[len];
final byte[] bd = new byte[len];
data.readBytes( bd );
DataInputStream di = new DataInputStream( new ByteArrayInputStream( bd ) );
final DataInputStream di = new DataInputStream( new ByteArrayInputStream( bd ) );
d.setTag( "tag", CompressedStreamTools.read( di ) );
}
// long priority = getPacketValue( PriorityType, data );
long stackSize = getPacketValue( stackType, data );
long countRequestable = getPacketValue( countReqType, data );
final long stackSize = getPacketValue( stackType, data );
final long countRequestable = getPacketValue( countReqType, data );
FluidStack fluidStack = FluidStack.loadFluidStackFromNBT( d );
final FluidStack fluidStack = FluidStack.loadFluidStackFromNBT( d );
if( fluidStack == null )
{
return null;
}
AEFluidStack fluid = AEFluidStack.create( fluidStack );
final AEFluidStack fluid = AEFluidStack.create( fluidStack );
// fluid.priority = (int) priority;
fluid.stackSize = stackSize;
fluid.setCountRequestable( countRequestable );
@@ -161,7 +161,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
@Override
public void add( IAEFluidStack option )
public void add( final IAEFluidStack option )
{
if( option == null )
{
@@ -177,7 +177,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
@Override
public void writeToNBT( NBTTagCompound i )
public void writeToNBT( final NBTTagCompound i )
{
/*
* Mojang Fucked this over ; GC Optimization - Ugly Yes, but it saves a lot in the memory department.
@@ -226,7 +226,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
@Override
public boolean fuzzyComparison( Object st, FuzzyMode mode )
public boolean fuzzyComparison( final Object st, final FuzzyMode mode )
{
if( st instanceof FluidStack )
{
@@ -250,7 +250,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
@Override
public IAEFluidStack empty()
{
IAEFluidStack dup = this.copy();
final IAEFluidStack dup = this.copy();
dup.reset();
return dup;
}
@@ -280,9 +280,9 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
@Override
public int compareTo( AEFluidStack b )
public int compareTo( final AEFluidStack b )
{
int diff = this.hashCode() - b.hashCode();
final int diff = this.hashCode() - b.hashCode();
return diff > 0 ? 1 : ( diff < 0 ? -1 : 0 );
}
@@ -293,7 +293,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
@Override
public boolean equals( Object ia )
public boolean equals( final Object ia )
{
if( ia instanceof AEFluidStack )
{
@@ -301,12 +301,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
}
else if( ia instanceof FluidStack )
{
FluidStack is = (FluidStack) ia;
final FluidStack is = (FluidStack) ia;
if( is.getFluidID() == this.fluid.getID() )
{
NBTTagCompound ta = (NBTTagCompound) this.tagCompound;
NBTTagCompound tb = is.tag;
final NBTTagCompound ta = (NBTTagCompound) this.tagCompound;
final NBTTagCompound tb = is.tag;
if( ta == tb )
{
return true;
@@ -346,7 +346,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
@Override
public FluidStack getFluidStack()
{
FluidStack is = new FluidStack( this.fluid, (int) Math.min( Integer.MAX_VALUE, this.stackSize ) );
final FluidStack is = new FluidStack( this.fluid, (int) Math.min( Integer.MAX_VALUE, this.stackSize ) );
if( this.tagCompound != null )
{
is.tag = this.tagCompound.getNBTTagCompoundCopy();
@@ -364,25 +364,25 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
@Override
void writeIdentity( ByteBuf i ) throws IOException
void writeIdentity( final ByteBuf i ) throws IOException
{
byte[] name = this.fluid.getName().getBytes( "UTF-8" );
final byte[] name = this.fluid.getName().getBytes( "UTF-8" );
i.writeByte( (byte) name.length );
i.writeBytes( name );
}
@Override
void readNBT( ByteBuf i ) throws IOException
void readNBT( final ByteBuf i ) throws IOException
{
if( this.hasTagCompound() )
{
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
DataOutputStream data = new DataOutputStream( bytes );
final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
final DataOutputStream data = new DataOutputStream( bytes );
CompressedStreamTools.write( (NBTTagCompound) this.tagCompound, data );
byte[] tagBytes = bytes.toByteArray();
int size = tagBytes.length;
final byte[] tagBytes = bytes.toByteArray();
final int size = tagBytes.length;
i.writeInt( size );
i.writeBytes( tagBytes );
@@ -51,7 +51,7 @@ public class AEItemDef
public UniqueIdentifier uniqueID;
public OreReference isOre;
public AEItemDef( Item it )
public AEItemDef( final Item it )
{
this.item = it;
this.itemID = Item.getIdFromItem( it );
@@ -59,7 +59,7 @@ public class AEItemDef
public AEItemDef copy()
{
AEItemDef t = new AEItemDef( this.item );
final AEItemDef t = new AEItemDef( this.item );
t.def = this.def;
t.damageValue = this.damageValue;
t.displayDamage = this.displayDamage;
@@ -70,7 +70,7 @@ public class AEItemDef
}
@Override
public boolean equals( Object obj )
public boolean equals( final Object obj )
{
if( obj == null )
{
@@ -80,14 +80,14 @@ public class AEItemDef
{
return false;
}
AEItemDef other = (AEItemDef) obj;
final AEItemDef other = (AEItemDef) obj;
return other.damageValue == this.damageValue && other.item == this.item && this.tagCompound == other.tagCompound;
}
public boolean isItem( ItemStack otherStack )
public boolean isItem( final ItemStack otherStack )
{
// hackery!
int dmg = this.getDamageValueHack( otherStack );
final int dmg = this.getDamageValueHack( otherStack );
if( this.item == otherStack.getItem() && dmg == this.damageValue )
{
@@ -106,7 +106,7 @@ public class AEItemDef
return false;
}
public int getDamageValueHack( ItemStack is )
public int getDamageValueHack( final ItemStack is )
{
return Items.blaze_rod.getDamage( is );
}
+78 -78
View File
@@ -51,7 +51,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
AEItemDef def;
private AEItemStack( AEItemStack is )
private AEItemStack( final AEItemStack is )
{
this.def = is.def;
this.stackSize = is.stackSize;
@@ -59,7 +59,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
this.setCountRequestable( is.getCountRequestable() );
}
private AEItemStack( ItemStack is )
private AEItemStack( final ItemStack is )
{
if( is == null )
{
@@ -96,7 +96,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
this.def.displayDamage = ( int ) ( is.getItem().getDurabilityForDisplay( is ) * Integer.MAX_VALUE );
this.def.maxDamage = is.getMaxDamage();
NBTTagCompound tagCompound = is.getTagCompound();
final NBTTagCompound tagCompound = is.getTagCompound();
if( tagCompound != null )
{
this.def.tagCompound = (AESharedNBT) AESharedNBT.getSharedTagCompound( tagCompound, is );
@@ -110,20 +110,20 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
this.def.isOre = OreHelper.INSTANCE.isOre( is );
}
public static IAEItemStack loadItemStackFromNBT( NBTTagCompound i )
public static IAEItemStack loadItemStackFromNBT( final NBTTagCompound i )
{
if( i == null )
{
return null;
}
ItemStack itemstack = ItemStack.loadItemStackFromNBT( i );
final ItemStack itemstack = ItemStack.loadItemStackFromNBT( i );
if( itemstack == null )
{
return null;
}
AEItemStack item = AEItemStack.create( itemstack );
final AEItemStack item = AEItemStack.create( itemstack );
// item.priority = i.getInteger( "Priority" );
item.stackSize = i.getLong( "Cnt" );
item.setCountRequestable( i.getLong( "Req" ) );
@@ -132,7 +132,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Nullable
public static AEItemStack create( ItemStack stack )
public static AEItemStack create( final ItemStack stack )
{
if( stack == null )
{
@@ -142,17 +142,17 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return new AEItemStack( stack );
}
public static IAEItemStack loadItemStackFromPacket( ByteBuf data ) throws IOException
public static IAEItemStack loadItemStackFromPacket( final ByteBuf data ) throws IOException
{
byte mask = data.readByte();
final byte mask = data.readByte();
// byte PriorityType = (byte) (mask & 0x03);
byte stackType = (byte) ( ( mask & 0x0C ) >> 2 );
byte countReqType = (byte) ( ( mask & 0x30 ) >> 4 );
boolean isCraftable = ( mask & 0x40 ) > 0;
boolean hasTagCompound = ( mask & 0x80 ) > 0;
final byte stackType = (byte) ( ( mask & 0x0C ) >> 2 );
final byte countReqType = (byte) ( ( mask & 0x30 ) >> 4 );
final boolean isCraftable = ( mask & 0x40 ) > 0;
final boolean hasTagCompound = ( mask & 0x80 ) > 0;
// don't send this...
NBTTagCompound d = new NBTTagCompound();
final NBTTagCompound d = new NBTTagCompound();
d.setShort( "id", data.readShort() );
d.setShort( "Damage", data.readShort() );
@@ -160,26 +160,26 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
if( hasTagCompound )
{
int len = data.readInt();
final int len = data.readInt();
byte[] bd = new byte[len];
final byte[] bd = new byte[len];
data.readBytes( bd );
ByteArrayInputStream di = new ByteArrayInputStream( bd );
final ByteArrayInputStream di = new ByteArrayInputStream( bd );
d.setTag( "tag", CompressedStreamTools.read( new DataInputStream( di ) ) );
}
// long priority = getPacketValue( PriorityType, data );
long stackSize = getPacketValue( stackType, data );
long countRequestable = getPacketValue( countReqType, data );
final long stackSize = getPacketValue( stackType, data );
final long countRequestable = getPacketValue( countReqType, data );
ItemStack itemstack = ItemStack.loadItemStackFromNBT( d );
final ItemStack itemstack = ItemStack.loadItemStackFromNBT( d );
if( itemstack == null )
{
return null;
}
AEItemStack item = AEItemStack.create( itemstack );
final AEItemStack item = AEItemStack.create( itemstack );
// item.priority = (int) priority;
item.stackSize = stackSize;
item.setCountRequestable( countRequestable );
@@ -188,7 +188,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
public void add( IAEItemStack option )
public void add( final IAEItemStack option )
{
if( option == null )
{
@@ -204,7 +204,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
public void writeToNBT( NBTTagCompound i )
public void writeToNBT( final NBTTagCompound i )
{
/*
* Mojang Fucked this over ; GC Optimization - Ugly Yes, but it saves a lot in the memory department.
@@ -258,11 +258,11 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
public boolean fuzzyComparison( Object st, FuzzyMode mode )
public boolean fuzzyComparison( final Object st, final FuzzyMode mode )
{
if( st instanceof IAEItemStack )
{
IAEItemStack o = (IAEItemStack) st;
final IAEItemStack o = (IAEItemStack) st;
if( this.sameOre( o ) )
{
@@ -273,8 +273,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
{
if( this.def.item.isDamageable() )
{
ItemStack a = this.getItemStack();
ItemStack b = o.getItemStack();
final ItemStack a = this.getItemStack();
final ItemStack b = o.getItemStack();
try
{
@@ -284,23 +284,23 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
else if( mode == FuzzyMode.PERCENT_99 )
{
Item ai = a.getItem();
Item bi = b.getItem();
final Item ai = a.getItem();
final Item bi = b.getItem();
return ( ai.getDurabilityForDisplay( a ) < 0.001f ) == ( bi.getDurabilityForDisplay( b ) < 0.001f );
}
else
{
Item ai = a.getItem();
Item bi = b.getItem();
final Item ai = a.getItem();
final Item bi = b.getItem();
float percentDamageOfA = 1.0f - (float) ai.getDurabilityForDisplay(a);
float percentDamageOfB = 1.0f - (float) bi.getDurabilityForDisplay(b);
final float percentDamageOfA = 1.0f - (float) ai.getDurabilityForDisplay(a);
final float percentDamageOfB = 1.0f - (float) bi.getDurabilityForDisplay(b);
return ( percentDamageOfA > mode.breakPoint ) == ( percentDamageOfB > mode.breakPoint );
}
}
catch( Throwable e )
catch( final Throwable e )
{
if( mode == FuzzyMode.IGNORE_ALL )
{
@@ -312,8 +312,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
else
{
float percentDamageOfA = (float) a.getItemDamage() / (float) a.getMaxDamage();
float percentDamageOfB = (float) b.getItemDamage() / (float) b.getMaxDamage();
final float percentDamageOfA = (float) a.getItemDamage() / (float) a.getMaxDamage();
final float percentDamageOfB = (float) b.getItemDamage() / (float) b.getMaxDamage();
return ( percentDamageOfA > mode.breakPoint ) == ( percentDamageOfB > mode.breakPoint );
}
@@ -326,7 +326,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
if( st instanceof ItemStack )
{
ItemStack o = (ItemStack) st;
final ItemStack o = (ItemStack) st;
OreHelper.INSTANCE.sameOre( this, o );
@@ -334,7 +334,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
{
if( this.def.item.isDamageable() )
{
ItemStack a = this.getItemStack();
final ItemStack a = this.getItemStack();
try
{
@@ -344,23 +344,23 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
else if( mode == FuzzyMode.PERCENT_99 )
{
Item ai = a.getItem();
Item bi = o.getItem();
final Item ai = a.getItem();
final Item bi = o.getItem();
return ( ai.getDurabilityForDisplay( a ) < 0.001f ) == ( bi.getDurabilityForDisplay( o ) < 0.001f );
}
else
{
Item ai = a.getItem();
Item bi = o.getItem();
final Item ai = a.getItem();
final Item bi = o.getItem();
float percentDamageOfA = 1.0f - (float) ai.getDurabilityForDisplay(a);
float percentDamageOfB = 1.0f - (float) bi.getDurabilityForDisplay(o);
final float percentDamageOfA = 1.0f - (float) ai.getDurabilityForDisplay(a);
final float percentDamageOfB = 1.0f - (float) bi.getDurabilityForDisplay(o);
return ( percentDamageOfA > mode.breakPoint ) == ( percentDamageOfB > mode.breakPoint );
}
}
catch( Throwable e )
catch( final Throwable e )
{
if( mode == FuzzyMode.IGNORE_ALL )
{
@@ -372,8 +372,8 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
else
{
float percentDamageOfA = (float) a.getItemDamage() / (float) a.getMaxDamage();
float percentDamageOfB = (float) o.getItemDamage() / (float) o.getMaxDamage();
final float percentDamageOfA = (float) a.getItemDamage() / (float) a.getMaxDamage();
final float percentDamageOfB = (float) o.getItemDamage() / (float) o.getMaxDamage();
return ( percentDamageOfA > mode.breakPoint ) == ( percentDamageOfB > mode.breakPoint );
}
@@ -396,7 +396,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
@Override
public IAEItemStack empty()
{
IAEItemStack dup = this.copy();
final IAEItemStack dup = this.copy();
dup.reset();
return dup;
}
@@ -428,7 +428,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
@Override
public ItemStack getItemStack()
{
ItemStack is = new ItemStack( this.def.item, (int) Math.min( Integer.MAX_VALUE, this.stackSize ), this.def.damageValue );
final 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() );
@@ -450,13 +450,13 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
public boolean sameOre( IAEItemStack is )
public boolean sameOre( final IAEItemStack is )
{
return OreHelper.INSTANCE.sameOre( this, is );
}
@Override
public boolean isSameType( IAEItemStack otherStack )
public boolean isSameType( final IAEItemStack otherStack )
{
if( otherStack == null )
{
@@ -467,7 +467,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
public boolean isSameType( ItemStack otherStack )
public boolean isSameType( final ItemStack otherStack )
{
if( otherStack == null )
{
@@ -484,7 +484,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
public boolean equals( Object ia )
public boolean equals( final Object ia )
{
if( ia instanceof AEItemStack )
{
@@ -492,12 +492,12 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
else if( ia instanceof ItemStack )
{
ItemStack is = (ItemStack) ia;
final ItemStack is = (ItemStack) ia;
if( is.getItem() == this.def.item && is.getItemDamage() == this.def.damageValue )
{
NBTTagCompound ta = this.def.tagCompound;
NBTTagCompound tb = is.getTagCompound();
final NBTTagCompound ta = this.def.tagCompound;
final NBTTagCompound tb = is.getTagCompound();
if( ta == tb )
{
return true;
@@ -531,21 +531,21 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
public int compareTo( AEItemStack b )
public int compareTo( final AEItemStack b )
{
int id = this.def.itemID - b.def.itemID;
final int id = this.def.itemID - b.def.itemID;
if( id != 0 )
{
return id;
}
int damageValue = this.def.damageValue - b.def.damageValue;
final int damageValue = this.def.damageValue - b.def.damageValue;
if( damageValue != 0 )
{
return damageValue;
}
int displayDamage = this.def.displayDamage - b.def.displayDamage;
final int displayDamage = this.def.displayDamage - b.def.displayDamage;
if( displayDamage != 0 )
{
return displayDamage;
@@ -554,9 +554,9 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return ( this.def.tagCompound == b.def.tagCompound ) ? 0 : this.compareNBT( b.def );
}
private int compareNBT( AEItemDef b )
private int compareNBT( final AEItemDef b )
{
int nbt = this.compare( ( this.def.tagCompound == null ? 0 : this.def.tagCompound.getHash() ), ( b.tagCompound == null ? 0 : b.tagCompound.getHash() ) );
final int nbt = this.compare( ( this.def.tagCompound == null ? 0 : this.def.tagCompound.getHash() ), ( b.tagCompound == null ? 0 : b.tagCompound.getHash() ) );
if( nbt == 0 )
{
return this.compare( System.identityHashCode( this.def.tagCompound ), System.identityHashCode( b.tagCompound ) );
@@ -564,7 +564,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return nbt;
}
private int compare( int l, int m )
private int compare( final int l, final int m )
{
return l < m ? -1 : ( l > m ? 1 : 0 );
}
@@ -602,7 +602,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return this.getModName( this.def.uniqueID = GameRegistry.findUniqueIdentifierFor( this.def.item ) );
}
private String getModName( UniqueIdentifier uniqueIdentifier )
private String getModName( final UniqueIdentifier uniqueIdentifier )
{
if( uniqueIdentifier == null )
{
@@ -612,10 +612,10 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return uniqueIdentifier.modId == null ? "** Null" : uniqueIdentifier.modId;
}
public IAEItemStack getLow( FuzzyMode fuzzy, boolean ignoreMeta )
public IAEItemStack getLow( final FuzzyMode fuzzy, final boolean ignoreMeta )
{
AEItemStack bottom = new AEItemStack( this );
AEItemDef newDef = bottom.def = bottom.def.copy();
final AEItemStack bottom = new AEItemStack( this );
final AEItemDef newDef = bottom.def = bottom.def.copy();
if( ignoreMeta )
{
@@ -643,7 +643,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
else
{
int breakpoint = fuzzy.calculateBreakPoint( this.def.maxDamage );
final int breakpoint = fuzzy.calculateBreakPoint( this.def.maxDamage );
newDef.displayDamage = breakpoint <= this.def.displayDamage ? breakpoint : 0;
}
@@ -655,10 +655,10 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
return bottom;
}
public IAEItemStack getHigh( FuzzyMode fuzzy, boolean ignoreMeta )
public IAEItemStack getHigh( final FuzzyMode fuzzy, final boolean ignoreMeta )
{
AEItemStack top = new AEItemStack( this );
AEItemDef newDef = top.def = top.def.copy();
final AEItemStack top = new AEItemStack( this );
final AEItemDef newDef = top.def = top.def.copy();
if( ignoreMeta )
{
@@ -686,7 +686,7 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
else
{
int breakpoint = fuzzy.calculateBreakPoint( this.def.maxDamage );
final int breakpoint = fuzzy.calculateBreakPoint( this.def.maxDamage );
newDef.displayDamage = this.def.displayDamage < breakpoint ? breakpoint - 1 : this.def.maxDamage + 1;
}
@@ -704,24 +704,24 @@ public final class AEItemStack extends AEStack<IAEItemStack> implements IAEItemS
}
@Override
void writeIdentity( ByteBuf i ) throws IOException
void writeIdentity( final ByteBuf i ) throws IOException
{
i.writeShort( Item.itemRegistry.getIDForObject( this.def.item ) );
i.writeShort( this.getItemDamage() );
}
@Override
void readNBT( ByteBuf i ) throws IOException
void readNBT( final ByteBuf i ) throws IOException
{
if( this.hasTagCompound() )
{
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
DataOutputStream data = new DataOutputStream( bytes );
final ByteArrayOutputStream bytes = new ByteArrayOutputStream();
final DataOutputStream data = new DataOutputStream( bytes );
CompressedStreamTools.write( (NBTTagCompound) this.getTagCompound(), data );
byte[] tagBytes = bytes.toByteArray();
int size = tagBytes.length;
final byte[] tagBytes = bytes.toByteArray();
final int size = tagBytes.length;
i.writeInt( size );
i.writeBytes( tagBytes );
+18 -18
View File
@@ -47,13 +47,13 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
private int hash;
private IItemComparison comp;
private AESharedNBT( Item itemID, int damageValue )
private AESharedNBT( final Item itemID, final int damageValue )
{
this.item = itemID;
this.meta = damageValue;
}
public AESharedNBT( int fakeValue )
public AESharedNBT( final int fakeValue )
{
this.item = null;
this.meta = 0;
@@ -71,14 +71,14 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
/*
* Returns an NBT Compound that is used for accelerating comparisons.
*/
public static synchronized NBTTagCompound getSharedTagCompound( NBTTagCompound tagCompound, ItemStack s )
public static synchronized NBTTagCompound getSharedTagCompound( final NBTTagCompound tagCompound, final ItemStack s )
{
if( tagCompound.hasNoTags() )
{
return null;
}
Item item = s.getItem();
final Item item = s.getItem();
int meta = -1;
if( s.getItem() != null && s.isItemStackDamageable() && s.getHasSubtypes() )
{
@@ -90,12 +90,12 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
return tagCompound;
}
SharedSearchObject sso = new SharedSearchObject( item, meta, tagCompound );
final SharedSearchObject sso = new SharedSearchObject( item, meta, tagCompound );
WeakReference<SharedSearchObject> c = SHARED_TAG_COMPOUND.get( sso );
final WeakReference<SharedSearchObject> c = SHARED_TAG_COMPOUND.get( sso );
if( c != null )
{
SharedSearchObject cg = c.get();
final SharedSearchObject cg = c.get();
if( cg != null )
{
return cg.shared; // I don't think I really need to check this
@@ -103,7 +103,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
// as its already certain to exist..
}
AESharedNBT clone = AESharedNBT.createFromCompound( item, meta, tagCompound );
final AESharedNBT clone = AESharedNBT.createFromCompound( item, meta, tagCompound );
sso.compound = (NBTTagCompound) sso.compound.copy(); // prevent
// modification
// of data based
@@ -119,25 +119,25 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
/*
* returns true if the compound is part of the shared compound system ( and can thus be compared directly ).
*/
public static boolean isShared( NBTTagCompound ta )
public static boolean isShared( final NBTTagCompound ta )
{
return ta instanceof AESharedNBT;
}
public static AESharedNBT createFromCompound( Item itemID, int damageValue, NBTTagCompound c )
public static AESharedNBT createFromCompound( final Item itemID, final int damageValue, final NBTTagCompound c )
{
AESharedNBT x = new AESharedNBT( itemID, damageValue );
final AESharedNBT x = new AESharedNBT( itemID, damageValue );
// c.getTags()
for( Object o : c.getKeySet() )
for( final Object o : c.getKeySet() )
{
String name = (String) o;
final String name = (String) o;
x.setTag( name, c.getTag( name ).copy() );
}
x.hash = Platform.NBTOrderlessHash( c );
ItemStack isc = new ItemStack( itemID, 1, damageValue );
final ItemStack isc = new ItemStack( itemID, 1, damageValue );
isc.setTagCompound( c );
x.comp = AEApi.instance().registries().specialComparison().getSpecialComparison( isc );
@@ -162,7 +162,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
}
@Override
public boolean equals( Object par1Obj )
public boolean equals( final Object par1Obj )
{
if( par1Obj instanceof AESharedNBT )
{
@@ -171,12 +171,12 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
return super.equals( par1Obj );
}
public boolean matches( Item item, int meta, int orderlessHash )
public boolean matches( final Item item, final int meta, final int orderlessHash )
{
return item == this.item && this.meta == meta && this.hash == orderlessHash;
}
public boolean comparePreciseWithRegistry( AESharedNBT tagCompound )
public boolean comparePreciseWithRegistry( final AESharedNBT tagCompound )
{
if( this == tagCompound )
{
@@ -191,7 +191,7 @@ public class AESharedNBT extends NBTTagCompound implements IAETagCompound
return false;
}
public boolean compareFuzzyWithRegistry( AESharedNBT tagCompound )
public boolean compareFuzzyWithRegistry( final AESharedNBT tagCompound )
{
if( this == tagCompound )
{
+12 -12
View File
@@ -33,7 +33,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
protected long stackSize;
protected long countRequestable;
static long getPacketValue( byte type, ByteBuf tag )
static long getPacketValue( final byte type, final ByteBuf tag )
{
if( type == 0 )
{
@@ -64,7 +64,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
}
@Override
public StackType setStackSize( long ss )
public StackType setStackSize( final long ss )
{
this.stackSize = ss;
return (StackType) this;
@@ -77,7 +77,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
}
@Override
public StackType setCountRequestable( long countRequestable )
public StackType setCountRequestable( final long countRequestable )
{
this.countRequestable = countRequestable;
return (StackType) this;
@@ -90,7 +90,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
}
@Override
public StackType setCraftable( boolean isCraftable )
public StackType setCraftable( final boolean isCraftable )
{
this.isCraftable = isCraftable;
return (StackType) this;
@@ -113,33 +113,33 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
}
@Override
public void incStackSize( long i )
public void incStackSize( final long i )
{
this.stackSize += i;
}
@Override
public void decStackSize( long i )
public void decStackSize( final long i )
{
this.stackSize -= i;
}
@Override
public void incCountRequestable( long i )
public void incCountRequestable( final long i )
{
this.countRequestable += i;
}
@Override
public void decCountRequestable( long i )
public void decCountRequestable( final long i )
{
this.countRequestable -= i;
}
@Override
public void writeToPacket( ByteBuf i ) throws IOException
public void writeToPacket( final ByteBuf i ) throws IOException
{
byte mask = (byte) ( this.getType( 0 ) | ( this.getType( this.stackSize ) << 2 ) | ( this.getType( this.countRequestable ) << 4 ) | ( (byte) ( this.isCraftable ? 1 : 0 ) << 6 ) | ( this.hasTagCompound() ? 1 : 0 ) << 7 );
final byte mask = (byte) ( this.getType( 0 ) | ( this.getType( this.stackSize ) << 2 ) | ( this.getType( this.countRequestable ) << 4 ) | ( (byte) ( this.isCraftable ? 1 : 0 ) << 6 ) | ( this.hasTagCompound() ? 1 : 0 ) << 7 );
i.writeByte( mask );
this.writeIdentity( i );
@@ -151,7 +151,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
this.putPacketValue( i, this.countRequestable );
}
byte getType( long num )
byte getType( final long num )
{
if( num <= 255 )
{
@@ -177,7 +177,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
abstract void readNBT( ByteBuf i ) throws IOException;
void putPacketValue( ByteBuf tag, long num )
void putPacketValue( final ByteBuf tag, final long num )
{
if( num <= 255 )
{
+10 -10
View File
@@ -36,7 +36,7 @@ public final class FluidList implements IItemList<IAEFluidStack>
private final Map<IAEFluidStack, IAEFluidStack> records = new HashMap<IAEFluidStack, IAEFluidStack>();
@Override
public void add( IAEFluidStack option )
public void add( final IAEFluidStack option )
{
if( option == null )
{
@@ -57,7 +57,7 @@ public final class FluidList implements IItemList<IAEFluidStack>
}
@Override
public IAEFluidStack findPrecise( IAEFluidStack fluidStack )
public IAEFluidStack findPrecise( final IAEFluidStack fluidStack )
{
if( fluidStack == null )
{
@@ -68,7 +68,7 @@ public final class FluidList implements IItemList<IAEFluidStack>
}
@Override
public Collection<IAEFluidStack> findFuzzy( IAEFluidStack filter, FuzzyMode fuzzy )
public Collection<IAEFluidStack> findFuzzy( final IAEFluidStack filter, final FuzzyMode fuzzy )
{
if( filter == null )
{
@@ -85,7 +85,7 @@ public final class FluidList implements IItemList<IAEFluidStack>
}
@Override
public void addStorage( IAEFluidStack option )
public void addStorage( final IAEFluidStack option )
{
if( option == null )
{
@@ -111,7 +111,7 @@ public final class FluidList implements IItemList<IAEFluidStack>
*/
@Override
public void addCrafting( IAEFluidStack option )
public void addCrafting( final IAEFluidStack option )
{
if( option == null )
{
@@ -134,7 +134,7 @@ public final class FluidList implements IItemList<IAEFluidStack>
}
@Override
public void addRequestable( IAEFluidStack option )
public void addRequestable( final IAEFluidStack option )
{
if( option == null )
{
@@ -160,7 +160,7 @@ public final class FluidList implements IItemList<IAEFluidStack>
@Override
public IAEFluidStack getFirstItem()
{
for( IAEFluidStack stackType : this )
for( final IAEFluidStack stackType : this )
{
return stackType;
}
@@ -183,18 +183,18 @@ public final class FluidList implements IItemList<IAEFluidStack>
@Override
public void resetStatus()
{
for( IAEFluidStack i : this )
for( final IAEFluidStack i : this )
{
i.reset();
}
}
private IAEFluidStack getFluidRecord( IAEFluidStack fluid )
private IAEFluidStack getFluidRecord( final IAEFluidStack fluid )
{
return this.records.get( fluid );
}
private IAEFluidStack putFluidRecord( IAEFluidStack fluid )
private IAEFluidStack putFluidRecord( final IAEFluidStack fluid )
{
return this.records.put( fluid, fluid );
}
+13 -13
View File
@@ -43,7 +43,7 @@ public final class ItemList implements IItemList<IAEItemStack>
private final Map<Item, NavigableMap<IAEItemStack, IAEItemStack>> records = new IdentityHashMap<Item, NavigableMap<IAEItemStack, IAEItemStack>>();
@Override
public void add( IAEItemStack option )
public void add( final IAEItemStack option )
{
if( option == null )
{
@@ -64,7 +64,7 @@ public final class ItemList implements IItemList<IAEItemStack>
}
@Override
public IAEItemStack findPrecise( IAEItemStack itemStack )
public IAEItemStack findPrecise( final IAEItemStack itemStack )
{
if( itemStack == null )
{
@@ -75,7 +75,7 @@ public final class ItemList implements IItemList<IAEItemStack>
}
@Override
public Collection<IAEItemStack> findFuzzy( IAEItemStack filter, FuzzyMode fuzzy )
public Collection<IAEItemStack> findFuzzy( final IAEItemStack filter, final FuzzyMode fuzzy )
{
if( filter == null )
{
@@ -98,7 +98,7 @@ public final class ItemList implements IItemList<IAEItemStack>
{
final Collection<IAEItemStack> output = new LinkedList<IAEItemStack>();
for( IAEItemStack is : or.getAEEquivalents() )
for( final IAEItemStack is : or.getAEEquivalents() )
{
output.addAll( this.findFuzzyDamage( (AEItemStack) is, fuzzy, is.getItemDamage() == OreDictionary.WILDCARD_VALUE ) );
}
@@ -117,7 +117,7 @@ public final class ItemList implements IItemList<IAEItemStack>
}
@Override
public void addStorage( IAEItemStack option )
public void addStorage( final IAEItemStack option )
{
if( option == null )
{
@@ -143,7 +143,7 @@ public final class ItemList implements IItemList<IAEItemStack>
*/
@Override
public void addCrafting( IAEItemStack option )
public void addCrafting( final IAEItemStack option )
{
if( option == null )
{
@@ -166,7 +166,7 @@ public final class ItemList implements IItemList<IAEItemStack>
}
@Override
public void addRequestable( IAEItemStack option )
public void addRequestable( final IAEItemStack option )
{
if( option == null )
{
@@ -192,7 +192,7 @@ public final class ItemList implements IItemList<IAEItemStack>
@Override
public IAEItemStack getFirstItem()
{
for( IAEItemStack stackType : this )
for( final IAEItemStack stackType : this )
{
return stackType;
}
@@ -205,7 +205,7 @@ public final class ItemList implements IItemList<IAEItemStack>
{
int size = 0;
for( Map<IAEItemStack, IAEItemStack> element : this.records.values() )
for( final Map<IAEItemStack, IAEItemStack> element : this.records.values() )
{
size += element.size();
}
@@ -222,13 +222,13 @@ public final class ItemList implements IItemList<IAEItemStack>
@Override
public void resetStatus()
{
for( IAEItemStack i : this )
for( final IAEItemStack i : this )
{
i.reset();
}
}
private NavigableMap<IAEItemStack, IAEItemStack> getItemRecord( Item item )
private NavigableMap<IAEItemStack, IAEItemStack> getItemRecord( final Item item )
{
NavigableMap<IAEItemStack, IAEItemStack> itemRecords = this.records.get( item );
@@ -241,12 +241,12 @@ public final class ItemList implements IItemList<IAEItemStack>
return itemRecords;
}
private IAEItemStack putItemRecord( IAEItemStack itemStack )
private IAEItemStack putItemRecord( final IAEItemStack itemStack )
{
return this.getItemRecord( itemStack.getItem() ).put( itemStack, itemStack );
}
private Collection<IAEItemStack> findFuzzyDamage( AEItemStack filter, FuzzyMode fuzzy, boolean ignoreMeta )
private Collection<IAEItemStack> findFuzzyDamage( final AEItemStack filter, final FuzzyMode fuzzy, final boolean ignoreMeta )
{
final IAEItemStack low = filter.getLow( fuzzy, ignoreMeta );
final IAEItemStack high = filter.getHigh( fuzzy, ignoreMeta );
@@ -33,13 +33,13 @@ public class ItemModList implements IItemContainer<IAEItemStack>
final IItemContainer<IAEItemStack> backingStore;
final IItemContainer<IAEItemStack> overrides = AEApi.instance().storage().createItemList();
public ItemModList( IItemContainer<IAEItemStack> backend )
public ItemModList( final IItemContainer<IAEItemStack> backend )
{
this.backingStore = backend;
}
@Override
public void add( IAEItemStack option )
public void add( final IAEItemStack option )
{
IAEItemStack over = this.overrides.findPrecise( option );
if( over == null )
@@ -62,9 +62,9 @@ public class ItemModList implements IItemContainer<IAEItemStack>
}
@Override
public IAEItemStack findPrecise( IAEItemStack i )
public IAEItemStack findPrecise( final IAEItemStack i )
{
IAEItemStack over = this.overrides.findPrecise( i );
final IAEItemStack over = this.overrides.findPrecise( i );
if( over == null )
{
return this.backingStore.findPrecise( i );
@@ -73,7 +73,7 @@ public class ItemModList implements IItemContainer<IAEItemStack>
}
@Override
public Collection<IAEItemStack> findFuzzy( IAEItemStack input, FuzzyMode fuzzy )
public Collection<IAEItemStack> findFuzzy( final IAEItemStack input, final FuzzyMode fuzzy )
{
return this.overrides.findFuzzy( input, fuzzy );
}
@@ -31,7 +31,7 @@ public class MeaningfulFluidIterator<T extends IAEStack> implements Iterator<T>
private final Iterator<T> parent;
private T next;
public MeaningfulFluidIterator( Iterator<T> iterator )
public MeaningfulFluidIterator( final Iterator<T> iterator )
{
this.parent = iterator;
}
@@ -33,7 +33,7 @@ public class MeaningfulItemIterator<T extends IAEItemStack> implements Iterator<
private Iterator<T> innerIterater = null;
private T next;
public MeaningfulItemIterator( Iterator<NavigableMap<T, T>> iterator )
public MeaningfulItemIterator( final Iterator<NavigableMap<T, T>> iterator )
{
this.parent = iterator;
+21 -21
View File
@@ -47,7 +47,7 @@ public class OreHelper
private final LoadingCache<String, List<ItemStack>> oreDictCache = CacheBuilder.newBuilder().build( new CacheLoader<String, List<ItemStack>>()
{
@Override
public List<ItemStack> load( String oreName )
public List<ItemStack> load( final String oreName )
{
return OreDictionary.getOres( oreName );
}
@@ -62,9 +62,9 @@ public class OreHelper
*
* @return true if an ore entry exists, false otherwise
*/
public OreReference isOre( ItemStack itemStack )
public OreReference isOre( final ItemStack itemStack )
{
ItemRef ir = new ItemRef( itemStack );
final ItemRef ir = new ItemRef( itemStack );
if( !this.references.containsKey( ir ) )
{
@@ -72,9 +72,9 @@ public class OreHelper
final Collection<Integer> ores = ref.getOres();
final Collection<String> set = ref.getEquivalents();
Set<String> toAdd = new HashSet<String>();
final Set<String> toAdd = new HashSet<String>();
for( String ore : OreDictionary.getOreNames() )
for( final String ore : OreDictionary.getOreNames() )
{
// skip ore if it is a match already or null.
if( ore == null || toAdd.contains( ore ) )
@@ -82,7 +82,7 @@ public class OreHelper
continue;
}
for( ItemStack oreItem : this.oreDictCache.getUnchecked( ore ) )
for( final ItemStack oreItem : this.oreDictCache.getUnchecked( ore ) )
{
if( OreDictionary.itemMatches( oreItem, itemStack, false ) )
{
@@ -92,7 +92,7 @@ public class OreHelper
}
}
for( String ore : toAdd )
for( final String ore : toAdd )
{
set.add( ore );
ores.add( OreDictionary.getOreID( ore ) );
@@ -111,15 +111,15 @@ public class OreHelper
return this.references.get( ir );
}
public boolean sameOre( AEItemStack aeItemStack, IAEItemStack is )
public boolean sameOre( final AEItemStack aeItemStack, final IAEItemStack is )
{
OreReference a = aeItemStack.def.isOre;
OreReference b = aeItemStack.def.isOre;
final OreReference a = aeItemStack.def.isOre;
final OreReference b = aeItemStack.def.isOre;
return this.sameOre( a, b );
}
public boolean sameOre( OreReference a, OreReference b )
public boolean sameOre( final OreReference a, final OreReference b )
{
if( a == null || b == null )
{
@@ -131,8 +131,8 @@ public class OreHelper
return true;
}
Collection<Integer> bOres = b.getOres();
for( Integer ore : a.getOres() )
final Collection<Integer> bOres = b.getOres();
for( final Integer ore : a.getOres() )
{
if( bOres.contains( ore ) )
{
@@ -143,17 +143,17 @@ public class OreHelper
return false;
}
public boolean sameOre( AEItemStack aeItemStack, ItemStack o )
public boolean sameOre( final AEItemStack aeItemStack, final ItemStack o )
{
OreReference a = aeItemStack.def.isOre;
final OreReference a = aeItemStack.def.isOre;
if( a == null )
{
return false;
}
for( String oreName : a.getEquivalents() )
for( final String oreName : a.getEquivalents() )
{
for( ItemStack oreItem : this.oreDictCache.getUnchecked( oreName ) )
for( final ItemStack oreItem : this.oreDictCache.getUnchecked( oreName ) )
{
if( OreDictionary.itemMatches( oreItem, o, false ) )
{
@@ -165,7 +165,7 @@ public class OreHelper
return false;
}
public List<ItemStack> getCachedOres( String oreName )
public List<ItemStack> getCachedOres( final String oreName )
{
return this.oreDictCache.getUnchecked( oreName );
}
@@ -177,7 +177,7 @@ public class OreHelper
private final int damage;
private final int hash;
ItemRef( ItemStack stack )
ItemRef( final ItemStack stack )
{
this.ref = stack.getItem();
@@ -200,7 +200,7 @@ public class OreHelper
}
@Override
public boolean equals( Object obj )
public boolean equals( final Object obj )
{
if( obj == null )
{
@@ -210,7 +210,7 @@ public class OreHelper
{
return false;
}
ItemRef other = (ItemRef) obj;
final ItemRef other = (ItemRef) obj;
return this.damage == other.damage && this.ref == other.ref;
}
@@ -49,9 +49,9 @@ public class OreReference
this.aeOtherOptions = new ArrayList<IAEItemStack>( this.otherOptions.size() );
// SUMMON AE STACKS!
for( String oreName : this.otherOptions )
for( final String oreName : this.otherOptions )
{
for( ItemStack is : OreHelper.INSTANCE.getCachedOres( oreName ) )
for( final ItemStack is : OreHelper.INSTANCE.getCachedOres( oreName ) )
{
if( is.getItem() != null )
{
@@ -32,7 +32,7 @@ public class SharedSearchObject
public AESharedNBT shared;
NBTTagCompound compound;
public SharedSearchObject( Item itemID, int damageValue, NBTTagCompound tagCompound )
public SharedSearchObject( final Item itemID, final int damageValue, final NBTTagCompound tagCompound )
{
this.def = ( damageValue << Platform.DEF_OFFSET ) | Item.itemRegistry.getIDForObject( itemID );
this.hash = Platform.NBTOrderlessHash( tagCompound );
@@ -46,7 +46,7 @@ public class SharedSearchObject
}
@Override
public boolean equals( Object obj )
public boolean equals( final Object obj )
{
if( obj == null )
{
@@ -56,7 +56,7 @@ public class SharedSearchObject
{
return false;
}
SharedSearchObject other = (SharedSearchObject) obj;
final SharedSearchObject other = (SharedSearchObject) obj;
if( this.def == other.def && this.hash == other.hash )
{
return Platform.NBTEqualityTest( this.compound, other.compound );