Finally use Java7 <>
This commit is contained in:
@@ -121,7 +121,7 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
||||
{
|
||||
if( this.getItemStack().getCount() > 0 )
|
||||
{
|
||||
final List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
final List<ItemStack> items = new ArrayList<>();
|
||||
items.add( this.is.copy() );
|
||||
this.host.removePart( this.side, false );
|
||||
Platform.spawnDrops( this.tile.getWorld(), this.tile.getPos(), items );
|
||||
|
||||
@@ -79,7 +79,7 @@ import appeng.util.Platform;
|
||||
public class CableBusContainer extends CableBusStorage implements AEMultiTile, ICableBusContainer
|
||||
{
|
||||
|
||||
private static final ThreadLocal<Boolean> IS_LOADING = new ThreadLocal<Boolean>();
|
||||
private static final ThreadLocal<Boolean> IS_LOADING = new ThreadLocal<>();
|
||||
private final EnumSet<LayerFlags> myLayerFlags = EnumSet.noneOf( LayerFlags.class );
|
||||
private YesNo hasRedstone = YesNo.UNDECIDED;
|
||||
private IPartHost tcb;
|
||||
@@ -412,7 +412,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
final IPart p = this.getPart( side );
|
||||
if( p != null )
|
||||
{
|
||||
final List<AxisAlignedBB> boxes = new LinkedList<AxisAlignedBB>();
|
||||
final List<AxisAlignedBB> boxes = new LinkedList<>();
|
||||
|
||||
final IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
|
||||
p.getBoxes( bch );
|
||||
@@ -435,7 +435,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
final IFacadePart p = fc.getFacade( side );
|
||||
if( p != null )
|
||||
{
|
||||
final List<AxisAlignedBB> boxes = new LinkedList<AxisAlignedBB>();
|
||||
final List<AxisAlignedBB> boxes = new LinkedList<>();
|
||||
|
||||
final IPartCollisionHelper bch = new BusCollisionHelper( boxes, side, null, true );
|
||||
p.getBoxes( bch, null );
|
||||
@@ -465,7 +465,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
{
|
||||
if( this.getCenter() == null )
|
||||
{
|
||||
final List<ItemStack> facades = new LinkedList<ItemStack>();
|
||||
final List<ItemStack> facades = new LinkedList<>();
|
||||
|
||||
final IFacadeContainer fc = this.getFacadeContainer();
|
||||
for( final AEPartLocation d : AEPartLocation.SIDE_LOCATIONS )
|
||||
@@ -734,7 +734,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
|
||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( final boolean ignoreConnections, final boolean includeFacades, final Entity e, final boolean visual )
|
||||
{
|
||||
final List<AxisAlignedBB> boxes = new LinkedList<AxisAlignedBB>();
|
||||
final List<AxisAlignedBB> boxes = new LinkedList<>();
|
||||
|
||||
final IFacadeContainer fc = this.getFacadeContainer();
|
||||
for( final AEPartLocation s : AEPartLocation.values() )
|
||||
|
||||
@@ -68,7 +68,7 @@ public class PartPlacement
|
||||
{
|
||||
|
||||
private static float eyeHeight = 0.0f;
|
||||
private final ThreadLocal<Object> placing = new ThreadLocal<Object>();
|
||||
private final ThreadLocal<Object> placing = new ThreadLocal<>();
|
||||
private boolean wasCanceled = false;
|
||||
|
||||
public static EnumActionResult place( final ItemStack held, final BlockPos pos, EnumFacing side, final EntityPlayer player, final EnumHand hand, final World world, PlaceType pass, final int depth )
|
||||
@@ -103,7 +103,7 @@ public class PartPlacement
|
||||
|
||||
if( mop != null )
|
||||
{
|
||||
final List<ItemStack> is = new LinkedList<ItemStack>();
|
||||
final List<ItemStack> is = new LinkedList<>();
|
||||
final SelectedPart sp = selectPart( player, host,
|
||||
mop.hitVec.addVector( -mop.getBlockPos().getX(), -mop.getBlockPos().getY(), -mop.getBlockPos().getZ() ) );
|
||||
|
||||
|
||||
@@ -396,11 +396,11 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
||||
{
|
||||
if( this.getProxy().isActive() && channel == StorageChannel.ITEMS )
|
||||
{
|
||||
final List<IMEInventoryHandler> Handler = new ArrayList<IMEInventoryHandler>( 1 );
|
||||
final List<IMEInventoryHandler> Handler = new ArrayList<>( 1 );
|
||||
Handler.add( this.myHandler );
|
||||
return Handler;
|
||||
}
|
||||
return new ArrayList<IMEInventoryHandler>();
|
||||
return new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -84,7 +84,7 @@ public class PartIdentityAnnihilationPlane extends PartAnnihilationPlane
|
||||
|
||||
if( state.getBlock().canSilkHarvest( w, pos, state, fakePlayer ) )
|
||||
{
|
||||
final List<ItemStack> out = new ArrayList<ItemStack>( 1 );
|
||||
final List<ItemStack> out = new ArrayList<>( 1 );
|
||||
final Item item = Item.getItemFromBlock( state.getBlock() );
|
||||
|
||||
if( item != Items.AIR )
|
||||
|
||||
@@ -107,7 +107,7 @@ public class PartToggleBus extends PartBasicState
|
||||
{
|
||||
if( this.getItemStack().getCount() > 0 )
|
||||
{
|
||||
final List<ItemStack> items = new ArrayList<ItemStack>();
|
||||
final List<ItemStack> items = new ArrayList<>();
|
||||
items.add( this.getItemStack().copy() );
|
||||
this.getHost().removePart( this.getSide(), false );
|
||||
Platform.spawnDrops( this.getTile().getWorld(), this.getTile().getPos(), items );
|
||||
|
||||
@@ -69,7 +69,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements /* IPip
|
||||
return MODELS.getModels();
|
||||
}
|
||||
|
||||
private final LinkedList<IInventory> which = new LinkedList<IInventory>();
|
||||
private final LinkedList<IInventory> which = new LinkedList<>();
|
||||
private int oldSize = 0;
|
||||
private boolean requested;
|
||||
private IInventory cachedInv;
|
||||
@@ -99,7 +99,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements /* IPip
|
||||
return this.cachedInv;
|
||||
}
|
||||
|
||||
final List<IInventory> outs = new LinkedList<IInventory>();
|
||||
final List<IInventory> outs = new LinkedList<>();
|
||||
final TunnelCollection<PartP2PItems> itemTunnels;
|
||||
|
||||
try
|
||||
|
||||
@@ -224,7 +224,7 @@ public class PartP2PTunnelME extends PartP2PTunnel<PartP2PTunnelME> implements I
|
||||
}
|
||||
}
|
||||
|
||||
final LinkedList<PartP2PTunnelME> newSides = new LinkedList<PartP2PTunnelME>();
|
||||
final LinkedList<PartP2PTunnelME> newSides = new LinkedList<>();
|
||||
try
|
||||
{
|
||||
for( final PartP2PTunnelME me : this.getOutputs() )
|
||||
|
||||
Reference in New Issue
Block a user