Merge remote-tracking branch 'upstream/rv2' into rv2

Conflicts:
	src/main/java/appeng/items/tools/powered/ToolMassCannon.java
This commit is contained in:
Andrew
2014-09-29 00:26:15 -07:00
113 changed files with 410 additions and 238 deletions
@@ -49,7 +49,7 @@ import com.google.common.collect.ImmutableSet;
public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent, IUpgradeModule
{
HashMap<Integer, MaterialType> dmgToMaterial = new HashMap();
HashMap<Integer, MaterialType> dmgToMaterial = new HashMap<Integer, MaterialType>();
public static ItemMultiMaterial instance;
@@ -109,7 +109,7 @@ public class ItemMultiMaterial extends AEBaseItem implements IStorageComponent,
Upgrades u = getType( is );
if ( u != null )
{
List<String> textList = new LinkedList();
List<String> textList = new LinkedList<String>();
for (Entry<ItemStack, Integer> j : u.getSupported().entrySet())
{
String name = null;
@@ -110,7 +110,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
{
if ( subTypes == null )
{
subTypes = new ArrayList();
subTypes = new ArrayList<ItemStack>();
for (Object blk : Block.blockRegistry)
{
Block b = (Block) blk;
@@ -118,7 +118,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
{
Item item = Item.getItemFromBlock( b );
List<ItemStack> tmpList = new ArrayList();
List<ItemStack> tmpList = new ArrayList<ItemStack>();
b.getSubBlocks( item, b.getCreativeTabToDisplayOn(), tmpList );
for (ItemStack l : tmpList)
{
@@ -43,7 +43,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
IIcon ico;
}
HashMap<Integer, PartTypeIst> dmgToPart = new HashMap();
HashMap<Integer, PartTypeIst> dmgToPart = new HashMap<Integer, PartTypeIst>();
public static ItemMultiPart instance;
@@ -209,7 +209,7 @@ public class ItemMultiPart extends AEBaseItem implements IPartItem, IItemGroup
@Override
public void getSubItems(Item number, CreativeTabs tab, List cList)
{
List<Entry<Integer, PartTypeIst>> types = new ArrayList( dmgToPart.entrySet() );
List<Entry<Integer, PartTypeIst>> types = new ArrayList<Entry<Integer, PartTypeIst>>( dmgToPart.entrySet() );
Collections.sort( types, new Comparator<Entry<Integer, PartTypeIst>>() {
@Override
@@ -58,7 +58,7 @@ import appeng.util.item.AEItemStack;
public class ToolColorApplicator extends AEBasePoweredItem implements IStorageCell, IItemGroup, IBlockTool, IMouseWheelItem
{
final static HashMap<Integer, AEColor> oreToColor = new HashMap();
final static HashMap<Integer, AEColor> oreToColor = new HashMap<Integer, AEColor>();
static
{
@@ -146,7 +146,7 @@ public class ToolEntropyManipulator extends AEBasePoweredItem implements IBlockT
coolDown.put( new Combo( Blocks.flowing_lava, OreDictionary.WILDCARD_VALUE ), new InWorldToolOperationResult( new ItemStack( Blocks.obsidian ) ) );
coolDown.put( new Combo( Blocks.grass, OreDictionary.WILDCARD_VALUE ), new InWorldToolOperationResult( new ItemStack( Blocks.dirt ) ) );
List<ItemStack> snowBalls = new ArrayList();
List<ItemStack> snowBalls = new ArrayList<ItemStack>();
snowBalls.add( new ItemStack( Items.snowball ) );
coolDown.put( new Combo( Blocks.flowing_water, OreDictionary.WILDCARD_VALUE ), new InWorldToolOperationResult( null, snowBalls ) );
coolDown.put( new Combo( Blocks.water, OreDictionary.WILDCARD_VALUE ), new InWorldToolOperationResult( new ItemStack( Blocks.ice ) ) );
@@ -196,12 +196,13 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue;
float f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( f1, f1, f1 );
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
if ( movingobjectposition1 != null )
AxisAlignedBB boundingBox = entity1.boundingBox.expand( f1, f1, f1 );
MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
if ( movingObjectPosition != null )
{
double nd = vec3.squareDistanceTo( movingobjectposition1.hitVec );
double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
if ( nd < closest )
{
@@ -215,8 +216,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, false );
Vec3 Srec = Vec3.createVectorHelper( d0, d1, d2 );
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( Srec ) > closest )
Vec3 vec = Vec3.createVectorHelper( d0, d1, d2 );
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest )
{
pos = new MovingObjectPosition( entity );
}
@@ -228,7 +229,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
try
{
CommonHelper.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w, new PacketMatterCannon( d0, d1, d2, (float) direction.xCoord,
(float) direction.yCoord, (float) direction.zCoord, (byte) (pos == null ? 32 : pos.hitVec.squareDistanceTo( Srec ) + 1) ) );
(float) direction.yCoord, (float) direction.zCoord, (byte) (pos == null ? 32 : pos.hitVec.squareDistanceTo( vec ) + 1) ) );
}
catch (Exception err)
@@ -321,12 +322,13 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue;
float f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( f1, f1, f1 );
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
if ( movingobjectposition1 != null )
AxisAlignedBB boundingBox = entity1.boundingBox.expand( f1, f1, f1 );
MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
if ( movingObjectPosition != null )
{
double nd = vec3.squareDistanceTo( movingobjectposition1.hitVec );
double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
if ( nd < closest )
{
@@ -338,9 +340,9 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
}
}
Vec3 Srec = Vec3.createVectorHelper( d0, d1, d2 );
Vec3 vec = Vec3.createVectorHelper( d0, d1, d2 );
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, true );
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( Srec ) > closest )
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest )
{
pos = new MovingObjectPosition( entity );
}
@@ -352,7 +354,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
try
{
CommonHelper.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w, new PacketMatterCannon( d0, d1, d2, (float) direction.xCoord,
(float) direction.yCoord, (float) direction.zCoord, (byte) (pos == null ? 32 : pos.hitVec.squareDistanceTo( Srec ) + 1) ) );
(float) direction.yCoord, (float) direction.zCoord, (byte) (pos == null ? 32 : pos.hitVec.squareDistanceTo( vec ) + 1) ) );
}
catch (Exception err)
@@ -480,7 +482,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
}
@Override
public int BytePerType(ItemStack iscellItem)
public int BytePerType(ItemStack cell)
{
return 8;
}