Merge branch 'master' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into rv1
Conflicts: items/tools/powered/ToolMassCannon.java
This commit is contained in:
commit
1632d2d72e
13 changed files with 72 additions and 44 deletions
|
@ -334,7 +334,7 @@ public class BlockCableBus extends AEBaseBlock
|
|||
@Override
|
||||
public boolean onActivated(World w, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ)
|
||||
{
|
||||
return cb( w, x, y, z ).activate( player, w.getWorldVec3Pool().getVecFromPool( hitX, hitY, hitZ ) );
|
||||
return cb( w, x, y, z ).activate( player, Vec3.createVectorHelper( hitX, hitY, hitZ ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -111,13 +111,12 @@ public class AppEng
|
|||
|
||||
AELog.info( "Starting ( PreInit )" );
|
||||
|
||||
if ( Platform.isClient() )
|
||||
{
|
||||
CreativeTab.init();
|
||||
if ( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) )
|
||||
CreativeTabFacade.init();
|
||||
|
||||
if ( Platform.isClient() )
|
||||
CommonHelper.proxy.init();
|
||||
}
|
||||
|
||||
Registration.instance.PreInit( event );
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
|||
|
||||
final MaterialType component;
|
||||
final int totalBytes;
|
||||
final int perType;
|
||||
final double idleDrain;
|
||||
|
||||
public ItemBasicStorageCell(MaterialType whichCell, int Kilobytes) {
|
||||
|
@ -47,18 +48,23 @@ public class ItemBasicStorageCell extends AEBaseItem implements IStorageCell, II
|
|||
{
|
||||
case Cell1kPart:
|
||||
idleDrain = 0.5;
|
||||
perType = 8;
|
||||
break;
|
||||
case Cell4kPart:
|
||||
idleDrain = 1.0;
|
||||
perType = 32;
|
||||
break;
|
||||
case Cell16kPart:
|
||||
idleDrain = 1.5;
|
||||
perType = 128;
|
||||
break;
|
||||
case Cell64kPart:
|
||||
idleDrain = 2.0;
|
||||
perType = 512;
|
||||
break;
|
||||
default:
|
||||
idleDrain = 0.0;
|
||||
perType = 8;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
|||
double d0 = p.prevPosX + (p.posX - p.prevPosX) * (double) f;
|
||||
double d1 = p.prevPosY + (p.posY - p.prevPosY) * (double) f + 1.62D - (double) p.yOffset;
|
||||
double d2 = p.prevPosZ + (p.posZ - p.prevPosZ) * (double) f;
|
||||
Vec3 vec3 = w.getWorldVec3Pool().getVecFromPool( d0, d1, d2 );
|
||||
Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 );
|
||||
float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI );
|
||||
float f4 = MathHelper.sin( -f2 * 0.017453292F - (float) Math.PI );
|
||||
float f5 = -MathHelper.cos( -f1 * 0.017453292F );
|
||||
|
@ -214,7 +214,7 @@ public class ToolMassCannon extends AEBasePoweredItem implements IStorageCell
|
|||
}
|
||||
}
|
||||
|
||||
Vec3 Srec = w.getWorldVec3Pool().getVecFromPool( d0, d1, d2 );
|
||||
Vec3 Srec = Vec3.createVectorHelper( d0, d1, d2 );
|
||||
MovingObjectPosition pos = w.rayTraceBlocks( vec3, vec31, true );
|
||||
if ( entity != null && pos != null && pos.hitVec.squareDistanceTo( Srec ) > Closeest )
|
||||
{
|
||||
|
|
|
@ -3,10 +3,11 @@ package appeng.me.cluster;
|
|||
public interface IAEMultiBlock
|
||||
{
|
||||
|
||||
void disconnect();
|
||||
void disconnect(boolean b);
|
||||
|
||||
IAECluster getCluster();
|
||||
|
||||
boolean isValid();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ public class QuantumCalculator extends MBCalculator
|
|||
c.Ring[ringNum++] = te;
|
||||
}
|
||||
|
||||
te.updateStatus( c, flags );
|
||||
te.updateStatus( c, flags, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -89,7 +89,7 @@ public class QuantumCalculator extends MBCalculator
|
|||
@Override
|
||||
public void disconnect()
|
||||
{
|
||||
tqb.disconnect();
|
||||
tqb.disconnect(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,7 +29,7 @@ public class QuantumCluster implements ILocatable, IAECluster
|
|||
public WorldCoord min;
|
||||
public WorldCoord max;
|
||||
public boolean isDestroyed = false;
|
||||
private boolean updateStatus = true;
|
||||
public boolean updateStatus = true;
|
||||
|
||||
boolean registered = false;
|
||||
private long thisSide;
|
||||
|
@ -211,14 +211,11 @@ public class QuantumCluster implements ILocatable, IAECluster
|
|||
MinecraftForge.EVENT_BUS.post( new LocatableEventAnnounce( this, LocatableEvent.Unregister ) );
|
||||
}
|
||||
|
||||
if ( updateStatus )
|
||||
{
|
||||
center.updateStatus( null, (byte) -1 );
|
||||
center.updateStatus( null, (byte) -1, updateStatus );
|
||||
|
||||
for (TileQuantumBridge r : Ring)
|
||||
{
|
||||
r.updateStatus( null, (byte) -1 );
|
||||
}
|
||||
r.updateStatus( null, (byte) -1, updateStatus );
|
||||
}
|
||||
|
||||
center = null;
|
||||
|
|
|
@ -60,7 +60,7 @@ public class SpatialPylonCalculator extends MBCalculator
|
|||
@Override
|
||||
public void disconnect()
|
||||
{
|
||||
tqb.disconnect();
|
||||
tqb.disconnect(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -77,7 +77,7 @@ public class StorageWorldProvider extends WorldProvider
|
|||
@Override
|
||||
public Vec3 getSkyColor(Entity cameraEntity, float partialTicks)
|
||||
{
|
||||
return this.worldObj.getWorldVec3Pool().getVecFromPool( 0.0, 0.0, 0.0 );
|
||||
return Vec3.createVectorHelper( 0.0, 0.0, 0.0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -102,7 +102,7 @@ public class StorageWorldProvider extends WorldProvider
|
|||
@Override
|
||||
public Vec3 getFogColor(float par1, float par2)
|
||||
{
|
||||
return this.worldObj.getWorldVec3Pool().getVecFromPool( 0.0, 0.0, 0.0 );
|
||||
return Vec3.createVectorHelper( 0.0, 0.0, 0.0 );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -130,11 +130,19 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public void disconnect()
|
||||
public void disconnect(boolean affectWorld)
|
||||
{
|
||||
if ( clust != null )
|
||||
{
|
||||
if ( ! affectWorld )
|
||||
clust.updateStatus = false;
|
||||
|
||||
clust.destroy();
|
||||
}
|
||||
|
||||
clust = null;
|
||||
|
||||
if ( affectWorld )
|
||||
gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
|
||||
}
|
||||
|
||||
|
@ -158,10 +166,26 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
|||
gridProxy.setVisualRepresentation( ring );
|
||||
}
|
||||
|
||||
public void updateStatus(QuantumCluster c, byte flags)
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
disconnect(false);
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload()
|
||||
{
|
||||
disconnect(false);
|
||||
super.onChunkUnload();
|
||||
}
|
||||
|
||||
public void updateStatus(QuantumCluster c, byte flags, boolean affectWorld)
|
||||
{
|
||||
clust = c;
|
||||
|
||||
if ( affectWorld )
|
||||
{
|
||||
if ( xdex != flags )
|
||||
{
|
||||
xdex = flags;
|
||||
|
@ -175,6 +199,7 @@ public class TileQuantumBridge extends AENetworkInvTile implements IAEMultiBlock
|
|||
else
|
||||
gridProxy.setValidSides( EnumSet.allOf( ForgeDirection.class ) );
|
||||
}
|
||||
}
|
||||
|
||||
public long getQEDest()
|
||||
{
|
||||
|
|
|
@ -127,15 +127,15 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
|||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
disconnect(false);
|
||||
super.invalidate();
|
||||
disconnect();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChunkUnload()
|
||||
{
|
||||
disconnect(false);
|
||||
super.onChunkUnload();
|
||||
disconnect();
|
||||
}
|
||||
|
||||
public void onNeighborBlockChange()
|
||||
|
@ -207,7 +207,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
|
|||
}
|
||||
|
||||
@Override
|
||||
public void disconnect()
|
||||
public void disconnect(boolean b)
|
||||
{
|
||||
if ( clust != null )
|
||||
{
|
||||
|
|
|
@ -1195,7 +1195,7 @@ public class Platform
|
|||
+ (double) (player.worldObj.isRemote ? player.getEyeHeight() - player.getDefaultEyeHeight() : player.getEyeHeight()); // isRemote
|
||||
|
||||
double d2 = player.prevPosZ + (player.posZ - player.prevPosZ) * (double) f;
|
||||
Vec3 vec3 = player.worldObj.getWorldVec3Pool().getVecFromPool( d0, d1, d2 );
|
||||
Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 );
|
||||
float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI );
|
||||
float f4 = MathHelper.sin( -f2 * 0.017453292F - (float) Math.PI );
|
||||
float f5 = -MathHelper.cos( -f1 * 0.017453292F );
|
||||
|
@ -1222,7 +1222,7 @@ public class Platform
|
|||
double d0 = p.prevPosX + (p.posX - p.prevPosX) * (double) f;
|
||||
double d1 = p.prevPosY + (p.posY - p.prevPosY) * (double) f + 1.62D - (double) p.yOffset;
|
||||
double d2 = p.prevPosZ + (p.posZ - p.prevPosZ) * (double) f;
|
||||
Vec3 vec3 = w.getWorldVec3Pool().getVecFromPool( d0, d1, d2 );
|
||||
Vec3 vec3 = Vec3.createVectorHelper( d0, d1, d2 );
|
||||
float f3 = MathHelper.cos( -f2 * 0.017453292F - (float) Math.PI );
|
||||
float f4 = MathHelper.sin( -f2 * 0.017453292F - (float) Math.PI );
|
||||
float f5 = -MathHelper.cos( -f1 * 0.017453292F );
|
||||
|
@ -1281,7 +1281,7 @@ public class Platform
|
|||
|
||||
if ( hitBlocks )
|
||||
{
|
||||
Srec = w.getWorldVec3Pool().getVecFromPool( d0, d1, d2 );
|
||||
Srec = Vec3.createVectorHelper( d0, d1, d2 );
|
||||
pos = w.rayTraceBlocks( vec3, vec31, true );
|
||||
}
|
||||
|
||||
|
|
|
@ -129,12 +129,12 @@ public class OreHelper
|
|||
|
||||
public boolean sameOre(OreRefrence a, OreRefrence b)
|
||||
{
|
||||
if ( a == b )
|
||||
return true;
|
||||
|
||||
if ( a == null || b == null )
|
||||
return false;
|
||||
|
||||
if ( a == b )
|
||||
return true;
|
||||
|
||||
Collection<Integer> bOres = b.getOres();
|
||||
for (Integer ore : a.ores)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue