Merge pull request #175 from thatsIch/TypeSafety

Type safety
This commit is contained in:
Chris
2014-09-28 19:51:31 -07:00
111 changed files with 237 additions and 239 deletions
@@ -281,7 +281,7 @@ public class ClientHelper extends ServerHelper
{
if ( Platform.isClient() )
{
List<EntityPlayer> o = new ArrayList();
List<EntityPlayer> o = new ArrayList<EntityPlayer>();
o.add( Minecraft.getMinecraft().thePlayer );
return o;
}
@@ -177,7 +177,7 @@ public abstract class AEBaseGui extends GuiContainer
Slot bl_clicked;
// drag y
Set<Slot> drag_click = new HashSet();
Set<Slot> drag_click = new HashSet<Slot>();
@Override
protected void handleMouseClick(Slot slot, int slotIdx, int ctrlDown, int key)
@@ -46,7 +46,7 @@ public class GuiCraftConfirm extends AEBaseGui
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> missing = AEApi.instance().storage().createItemList();
List<IAEItemStack> visual = new ArrayList();
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
GuiBridge OriginalGui;
@@ -382,7 +382,7 @@ public class GuiCraftConfirm extends AEBaseGui
int viewEnd = viewStart + 3 * rows;
String dspToolTip = "";
List<String> lineList = new LinkedList();
List<String> lineList = new LinkedList<String>();
int toolPosX = 0;
int toolPosY = 0;
@@ -39,14 +39,14 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
IItemList<IAEItemStack> active = AEApi.instance().storage().createItemList();
IItemList<IAEItemStack> pending = AEApi.instance().storage().createItemList();
List<IAEItemStack> visual = new ArrayList();
List<IAEItemStack> visual = new ArrayList<IAEItemStack>();
public void clearItems()
{
storage = AEApi.instance().storage().createItemList();
active = AEApi.instance().storage().createItemList();
pending = AEApi.instance().storage().createItemList();
visual = new ArrayList();
visual = new ArrayList<IAEItemStack>();
}
protected GuiCraftingCPU(ContainerCraftingCPU container) {
@@ -269,7 +269,7 @@ public class GuiCraftingCPU extends AEBaseGui implements ISortSource
int viewEnd = viewStart + 3 * 6;
String dspToolTip = "";
List<String> lineList = new LinkedList();
List<String> lineList = new LinkedList<String>();
int toolPosX = 0;
int toolPosY = 0;
@@ -25,11 +25,11 @@ import com.google.common.collect.HashMultimap;
public class GuiInterfaceTerminal extends AEBaseGui
{
HashMap<Long, ClientDCInternalInv> byId = new HashMap();
HashMap<Long, ClientDCInternalInv> byId = new HashMap<Long, ClientDCInternalInv>();
HashMultimap<String, ClientDCInternalInv> byName = HashMultimap.create();
ArrayList<String> names = new ArrayList();
ArrayList<String> names = new ArrayList<String>();
ArrayList<Object> lines = new ArrayList();
ArrayList<Object> lines = new ArrayList<Object>();
private int getTotalRows()
{
@@ -43,7 +43,7 @@ public class GuiInterfaceTerminal extends AEBaseGui
ySize = 222;
}
LinkedList<SlotDisconnected> dcSlots = new LinkedList();
LinkedList<SlotDisconnected> dcSlots = new LinkedList<SlotDisconnected>();
@Override
public void initGui()
@@ -178,12 +178,12 @@ public class GuiInterfaceTerminal extends AEBaseGui
Collections.sort( names );
lines = new ArrayList( getTotalRows() );
lines = new ArrayList<Object>( getTotalRows() );
for (String n : names)
{
lines.add( n );
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList();
ArrayList<ClientDCInternalInv> clientInventories = new ArrayList<ClientDCInternalInv>();
clientInventories.addAll( byName.get( n ) );
Collections.sort( clientInventories );
@@ -101,7 +101,7 @@ public class GuiImgButton extends GuiButton implements ITooltip
if ( Appearances == null )
{
Appearances = new HashMap();
Appearances = new HashMap<EnumPair, BtnAppearance>();
registerApp( 16 * 7 + 0, Settings.CONDENSER_OUTPUT, CondenserOutput.TRASH, ButtonToolTips.CondenserOutput, ButtonToolTips.Trash );
registerApp( 16 * 7 + 1, Settings.CONDENSER_OUTPUT, CondenserOutput.MATTER_BALLS, ButtonToolTips.CondenserOutput, ButtonToolTips.MatterBalls );
registerApp( 16 * 7 + 2, Settings.CONDENSER_OUTPUT, CondenserOutput.SINGULARITY, ButtonToolTips.CondenserOutput, ButtonToolTips.Singularity );
@@ -29,7 +29,7 @@ public class BusRenderer implements IItemRenderer
public static final BusRenderer instance = new BusRenderer();
public RenderBlocksWorkaround renderer = new RenderBlocksWorkaround();
public static final HashMap<Integer, IPart> renderPart = new HashMap();
public static final HashMap<Integer, IPart> renderPart = new HashMap<Integer, IPart>();
public IPart getRenderer(ItemStack is, IPartItem c)
{
@@ -106,7 +106,7 @@ public class CableRenderHelper
/**
* snag list of boxes...
*/
List<AxisAlignedBB> boxes = new ArrayList();
List<AxisAlignedBB> boxes = new ArrayList<AxisAlignedBB>();
for (ForgeDirection s : ForgeDirection.values())
{
IPart part = cableBusContainer.getPart( s );
@@ -23,7 +23,7 @@ public class WorldRender implements ISimpleBlockRenderingHandler
public static final WorldRender instance = new WorldRender();
boolean hasError = false;
public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap();
public HashMap<AEBaseBlock, BaseBlockRender> blockRenders = new HashMap<AEBaseBlock, BaseBlockRender>();
void setRender(AEBaseBlock in, BaseBlockRender r)
{