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
+1 -1
View File
@@ -154,7 +154,7 @@ public class GridStorage implements IGridStorage
public void remove()
{
WorldSettings.getInstance().destroyGridStorage( this.getID() );
WorldSettings.getInstance().destroyGridStorage( this.myID );
}
}
@@ -26,9 +26,6 @@ import java.util.LinkedList;
import java.util.Map;
import java.util.Map.Entry;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import net.minecraft.inventory.InventoryCrafting;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -38,6 +35,9 @@ import net.minecraft.world.WorldServer;
import cpw.mods.fml.common.FMLCommonHandler;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import appeng.api.AEApi;
import appeng.api.config.Actionable;
import appeng.api.config.FuzzyMode;
@@ -800,7 +800,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
if ( !(job instanceof CraftingJob) )
return null;
if ( this.isBusy() || !this.isActive() || this.getAvailableStorage() < job.getByteTotal() )
if ( this.isBusy() || !this.isActive() || this.availableStorage < job.getByteTotal() )
return null;
IStorageGrid sg = g.getCache( IStorageGrid.class );
@@ -84,7 +84,7 @@ public class QuantumCluster implements ILocatable, IAECluster
QuantumCluster qc = (QuantumCluster) AEApi.instance().registries().locatable().getLocatableBy( qe );
if ( qc != null )
{
World theWorld = qc.getCenter().getWorldObj();
World theWorld = qc.center.getWorldObj();
if ( !qc.isDestroyed )
{
Chunk c = theWorld.getChunkFromBlockCoords( qc.center.xCoord, qc.center.zCoord );
@@ -225,7 +225,7 @@ public class QuantumCluster implements ILocatable, IAECluster
this.registered = false;
}
if ( this.getLocatableSerial() != 0 )
if ( this.thisSide != 0 )
{
this.updateStatus( true );
MinecraftForge.EVENT_BUS.post( new LocatableEventAnnounce( this, LocatableEvent.Unregister ) );
@@ -260,7 +260,7 @@ public class QuantumCluster implements ILocatable, IAECluster
public boolean hasQES()
{
return this.getLocatableSerial() != 0;
return this.thisSide != 0;
}
private IGridNode getNode()
@@ -96,8 +96,8 @@ public class MEInventoryHandler<T extends IAEStack<T>> implements IMEInventoryHa
{
this.myAccess = myAccess;
this.cachedAccessRestriction = this.myAccess.restrictPermissions( this.internal.getAccess() );
this.hasReadAccess = this.getAccess().hasPermission( AccessRestriction.READ );
this.hasWriteAccess = this.getAccess().hasPermission( AccessRestriction.WRITE );
this.hasReadAccess = this.cachedAccessRestriction.hasPermission( AccessRestriction.READ );
this.hasWriteAccess = this.cachedAccessRestriction.hasPermission( AccessRestriction.WRITE );
}
public IPartitionList<T> getPartitionList()