Refactoring

Type-safety

Minor performance improvements
This commit is contained in:
thatsIch
2014-11-28 04:36:46 +01:00
parent 9fae9d1ec0
commit 2243c5a188
87 changed files with 899 additions and 730 deletions
@@ -18,7 +18,12 @@
package appeng.me.cluster.implementations;
import java.util.*;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Map;
import java.util.Map.Entry;
import net.minecraft.inventory.InventoryCrafting;
@@ -27,6 +32,12 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.World;
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;
@@ -68,11 +79,6 @@ import appeng.tile.crafting.TileCraftingTile;
import appeng.util.Platform;
import appeng.util.item.AEItemStack;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import cpw.mods.fml.common.FMLCommonHandler;
public class CraftingCPUCluster implements IAECluster, ICraftingCPU
{
@@ -864,7 +870,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
int hash = System.identityHashCode( this );
int hmm = finalOutput == null ? 0 : finalOutput.hashCode();
return Long.toString( now, Character.MAX_RADIX ) + "-" + Integer.toString( hash, Character.MAX_RADIX ) + "-"
return Long.toString( now, Character.MAX_RADIX ) + '-' + Integer.toString( hash, Character.MAX_RADIX ) + '-'
+ Integer.toString( hmm, Character.MAX_RADIX );
}
@@ -1102,7 +1108,7 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
if ( te.hasCustomName() )
{
if ( myName.length() > 0 )
myName += " " + te.getCustomName();
myName += ' ' + te.getCustomName();
else
myName = te.getCustomName();
}