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