Fixed typos in MatterCannon

This commit is contained in:
thatsIch 2014-09-28 19:46:10 +02:00
parent 8f5f3f1ed7
commit a745e00115
3 changed files with 25 additions and 25 deletions

View file

@ -224,7 +224,7 @@ public class WorldSettings extends Configuration
instance = null;
}
List<Integer> storageCellDims = new ArrayList();
List<Integer> storageCellDims = new ArrayList<Integer>();
HashMap<Integer, UUID> idToUUID;
public void addStorageCellDim(int newDim)

View file

@ -196,12 +196,12 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue;
float f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
if ( movingobjectposition1 != null )
if ( movingObjectPosition != null )
{
double nd = vec3.squareDistanceTo( movingobjectposition1.hitVec );
double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
if ( nd < closest )
{
@ -215,8 +215,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 +228,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 +321,12 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
continue;
float f1 = 0.3F;
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
MovingObjectPosition movingObjectPosition = boundingBox.calculateIntercept( vec3, vec31 );
if ( movingobjectposition1 != null )
if ( movingObjectPosition != null )
{
double nd = vec3.squareDistanceTo( movingobjectposition1.hitVec );
double nd = vec3.squareDistanceTo( movingObjectPosition.hitVec );
if ( nd < closest )
{
@ -338,9 +338,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 +352,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 +480,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
}
@Override
public int BytePerType(ItemStack iscellItem)
public int BytePerType(ItemStack cell)
{
return 8;
}

View file

@ -175,24 +175,24 @@ public class AdaptorIInventory extends InventoryAdaptor
ItemStack is = i.getStackInSlot( x );
if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemPrecise( is, filter )) )
{
int boundAount = amount;
if ( boundAount > is.stackSize )
boundAount = is.stackSize;
int boundAmount = amount;
if ( boundAmount > is.stackSize )
boundAmount = is.stackSize;
if ( destination != null && !destination.canInsert( is ) )
boundAount = 0;
boundAmount = 0;
if ( boundAount > 0 )
if ( boundAmount > 0 )
{
if ( rv == null )
{
rv = is.copy();
rv.stackSize = boundAount;
amount -= boundAount;
rv.stackSize = boundAmount;
amount -= boundAmount;
}
else
{
rv.stackSize += boundAount;
amount -= boundAount;
rv.stackSize += boundAmount;
amount -= boundAmount;
}
}
}