Conflicts:
	items/tools/powered/ToolMassCannon.java
This commit is contained in:
AlgorithmX2 2014-06-16 00:51:51 -05:00
commit 1632d2d72e
13 changed files with 72 additions and 44 deletions

View file

@ -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

View file

@ -111,13 +111,12 @@ public class AppEng
AELog.info( "Starting ( PreInit )" );
CreativeTab.init();
if ( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) )
CreativeTabFacade.init();
if ( Platform.isClient() )
{
CreativeTab.init();
if ( AEConfig.instance.isFeatureEnabled( AEFeature.Facades ) )
CreativeTabFacade.init();
CommonHelper.proxy.init();
}
Registration.instance.PreInit( event );

View file

@ -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;
}
}

View file

@ -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 )
{

View file

@ -3,10 +3,11 @@ package appeng.me.cluster;
public interface IAEMultiBlock
{
void disconnect();
void disconnect(boolean b);
IAECluster getCluster();
boolean isValid();
}

View file

@ -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

View file

@ -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 );
}
for (TileQuantumBridge r : Ring)
{
r.updateStatus( null, (byte) -1, updateStatus );
}
center = null;

View file

@ -60,7 +60,7 @@ public class SpatialPylonCalculator extends MBCalculator
@Override
public void disconnect()
{
tqb.disconnect();
tqb.disconnect(true);
}
@Override

View file

@ -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

View file

@ -130,12 +130,20 @@ 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;
gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
if ( affectWorld )
gridProxy.setValidSides( EnumSet.noneOf( ForgeDirection.class ) );
}
@Override
@ -158,22 +166,39 @@ 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 ( xdex != flags )
if ( affectWorld )
{
xdex = flags;
markForUpdate();
if ( xdex != flags )
{
xdex = flags;
markForUpdate();
}
if ( isCorner() || isCenter() )
{
gridProxy.setValidSides( getConnections() );
}
else
gridProxy.setValidSides( EnumSet.allOf( ForgeDirection.class ) );
}
if ( isCorner() || isCenter() )
{
gridProxy.setValidSides( getConnections() );
}
else
gridProxy.setValidSides( EnumSet.allOf( ForgeDirection.class ) );
}
public long getQEDest()

View file

@ -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 )
{

View file

@ -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 );
}

View file

@ -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)
{