Replace call to simple getter from within class with inlined version

This commit is contained in:
thatsIch
2015-03-26 10:23:59 +01:00
parent e41d6a0289
commit 4b4693498d
22 changed files with 56 additions and 47 deletions
@@ -253,7 +253,7 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
ByteArrayOutputStream bytes = new ByteArrayOutputStream();
DataOutputStream data = new DataOutputStream( bytes );
CompressedStreamTools.write( (NBTTagCompound) this.getTagCompound(), data );
CompressedStreamTools.write( (NBTTagCompound) this.tagCompound, data );
byte[] tagBytes = bytes.toByteArray();
int size = tagBytes.length;
@@ -328,12 +328,12 @@ public final class AEFluidStack extends AEStack<IAEFluidStack> implements IAEFlu
{
if ( st instanceof FluidStack )
{
return ((FluidStack) st).getFluid() == this.getFluid();
return ((FluidStack) st).getFluid() == this.fluid;
}
if ( st instanceof IAEFluidStack )
{
return ((IAEFluidStack) st).getFluid() == this.getFluid();
return ((IAEFluidStack) st).getFluid() == this.fluid;
}
return false;
+3 -3
View File
@@ -34,7 +34,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
@Override
public boolean isMeaningful()
{
return this.stackSize != 0 || this.getCountRequestable() > 0 || this.isCraftable();
return this.stackSize != 0 || this.countRequestable > 0 || this.isCraftable;
}
@Override
@@ -167,7 +167,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
@Override
public void writeToPacket(ByteBuf i) throws IOException
{
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
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 );
@@ -177,7 +177,7 @@ public abstract class AEStack<StackType extends IAEStack> implements IAEStack<St
// putPacketValue( i, priority );
this.putPacketValue( i, this.stackSize );
this.putPacketValue( i, this.getCountRequestable() );
this.putPacketValue( i, this.countRequestable );
}
}