Fixed typos in MatterCannon
This commit is contained in:
parent
8f5f3f1ed7
commit
a745e00115
3 changed files with 25 additions and 25 deletions
|
@ -224,7 +224,7 @@ public class WorldSettings extends Configuration
|
||||||
instance = null;
|
instance = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Integer> storageCellDims = new ArrayList();
|
List<Integer> storageCellDims = new ArrayList<Integer>();
|
||||||
HashMap<Integer, UUID> idToUUID;
|
HashMap<Integer, UUID> idToUUID;
|
||||||
|
|
||||||
public void addStorageCellDim(int newDim)
|
public void addStorageCellDim(int newDim)
|
||||||
|
|
|
@ -196,12 +196,12 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
float f1 = 0.3F;
|
float f1 = 0.3F;
|
||||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
|
AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
|
||||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
|
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 )
|
if ( nd < closest )
|
||||||
{
|
{
|
||||||
|
@ -215,8 +215,8 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
|
|
||||||
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, false );
|
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, false );
|
||||||
|
|
||||||
Vec3 Srec = Vec3.createVectorHelper( d0, d1, d2 );
|
Vec3 vec = Vec3.createVectorHelper( d0, d1, d2 );
|
||||||
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( Srec ) > closest )
|
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( vec ) > closest )
|
||||||
{
|
{
|
||||||
pos = new MovingObjectPosition( entity );
|
pos = new MovingObjectPosition( entity );
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CommonHelper.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w, new PacketMatterCannon( d0, d1, d2, (float) direction.xCoord,
|
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)
|
catch (Exception err)
|
||||||
|
@ -321,12 +321,12 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
float f1 = 0.3F;
|
float f1 = 0.3F;
|
||||||
AxisAlignedBB axisalignedbb1 = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
|
AxisAlignedBB boundingBox = entity1.boundingBox.expand( (double) f1, (double) f1, (double) f1 );
|
||||||
MovingObjectPosition movingobjectposition1 = axisalignedbb1.calculateIntercept( vec3, vec31 );
|
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 )
|
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 );
|
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 );
|
pos = new MovingObjectPosition( entity );
|
||||||
}
|
}
|
||||||
|
@ -352,7 +352,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
CommonHelper.proxy.sendToAllNearExcept( null, d0, d1, d2, 128, w, new PacketMatterCannon( d0, d1, d2, (float) direction.xCoord,
|
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)
|
catch (Exception err)
|
||||||
|
@ -480,7 +480,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int BytePerType(ItemStack iscellItem)
|
public int BytePerType(ItemStack cell)
|
||||||
{
|
{
|
||||||
return 8;
|
return 8;
|
||||||
}
|
}
|
||||||
|
|
|
@ -175,24 +175,24 @@ public class AdaptorIInventory extends InventoryAdaptor
|
||||||
ItemStack is = i.getStackInSlot( x );
|
ItemStack is = i.getStackInSlot( x );
|
||||||
if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemPrecise( is, filter )) )
|
if ( is != null && canRemoveStackFromSlot( x, is ) && (filter == null || Platform.isSameItemPrecise( is, filter )) )
|
||||||
{
|
{
|
||||||
int boundAount = amount;
|
int boundAmount = amount;
|
||||||
if ( boundAount > is.stackSize )
|
if ( boundAmount > is.stackSize )
|
||||||
boundAount = is.stackSize;
|
boundAmount = is.stackSize;
|
||||||
if ( destination != null && !destination.canInsert( is ) )
|
if ( destination != null && !destination.canInsert( is ) )
|
||||||
boundAount = 0;
|
boundAmount = 0;
|
||||||
|
|
||||||
if ( boundAount > 0 )
|
if ( boundAmount > 0 )
|
||||||
{
|
{
|
||||||
if ( rv == null )
|
if ( rv == null )
|
||||||
{
|
{
|
||||||
rv = is.copy();
|
rv = is.copy();
|
||||||
rv.stackSize = boundAount;
|
rv.stackSize = boundAmount;
|
||||||
amount -= boundAount;
|
amount -= boundAmount;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
rv.stackSize += boundAount;
|
rv.stackSize += boundAmount;
|
||||||
amount -= boundAount;
|
amount -= boundAmount;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue