No more snow in spatial cells.

Fixed 2 network connection bugs when QNB's re-connect/worlds unload.
Matrix Frame can no longer be removed or even hovered over, even in creative.
Spatial Pylons Can now be seen on the Network Tool Gui.
This commit is contained in:
AlgorithmX2 2014-03-06 22:30:59 -06:00
parent aac12dd1fd
commit a464686393
7 changed files with 59 additions and 10 deletions

View file

@ -1,18 +1,23 @@
package appeng.block.solids;
package appeng.block.spatial;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.Item;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.World;
import appeng.block.AEBaseBlock;
import appeng.client.render.BaseBlockRender;
import appeng.client.render.blocks.RenderNull;
import appeng.core.features.AEFeature;
import appeng.helpers.ICustomCollision;
public class BlockMatrixFrame extends AEBaseBlock
public class BlockMatrixFrame extends AEBaseBlock implements ICustomCollision
{
public BlockMatrixFrame() {
@ -42,4 +47,17 @@ public class BlockMatrixFrame extends AEBaseBlock
}
@Override
public Iterable<AxisAlignedBB> getSelectedBoundingBoxsFromPool(World w, int x, int y, int z, Entity e, boolean isVisual)
{
return Arrays.asList( new AxisAlignedBB[] {} );// AxisAlignedBB.getBoundingBox( 0.25, 0, 0.25, 0.75, 0.5, 0.75 )
// } );
}
@Override
public void addCollidingBlockToList(World w, int x, int y, int z, AxisAlignedBB bb, List out, Entity e)
{
out.add( AxisAlignedBB.getAABBPool().getAABB( 0.0, 0.0, 0.0, 1.0, 1.0, 1.0 ) );
}
}

View file

@ -51,7 +51,6 @@ import appeng.block.networking.BlockWireless;
import appeng.block.qnb.BlockQuantumLinkChamber;
import appeng.block.qnb.BlockQuantumRing;
import appeng.block.solids.BlockFluix;
import appeng.block.solids.BlockMatrixFrame;
import appeng.block.solids.BlockQuartz;
import appeng.block.solids.BlockQuartzChiseled;
import appeng.block.solids.BlockQuartzGlass;
@ -60,6 +59,7 @@ import appeng.block.solids.BlockQuartzPillar;
import appeng.block.solids.BlockSkyStone;
import appeng.block.solids.OreQuartz;
import appeng.block.solids.OreQuartzCharged;
import appeng.block.spatial.BlockMatrixFrame;
import appeng.block.spatial.BlockSpatialIOPort;
import appeng.block.spatial.BlockSpatialPylon;
import appeng.block.storage.BlockChest;

View file

@ -3,7 +3,9 @@ package appeng.me.cluster.implementations;
import java.util.Iterator;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraftforge.common.DimensionManager;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.event.world.WorldEvent;
@ -61,13 +63,17 @@ public class QuantumCluster implements ILocatable, IAECluster
QuantumCluster qc = (QuantumCluster) AEApi.instance().registries().locateable().findLocateableBySerial( qe );
if ( qc != null && qc.center instanceof TileQuantumBridge )
{
World theWorld = qc.getCenter().getWorldObj();
if ( !qc.isDestroyed )
{
Chunk c = qc.center.getWorldObj().getChunkFromBlockCoords( qc.center.xCoord, qc.center.zCoord );
Chunk c = theWorld.getChunkFromBlockCoords( qc.center.xCoord, qc.center.zCoord );
if ( c.isChunkLoaded )
{
TileEntity te = qc.center.getWorldObj().getTileEntity( qc.center.xCoord, qc.center.yCoord, qc.center.zCoord );
return te != qc.center;
int id = theWorld.provider.dimensionId;
World cur = DimensionManager.getWorld( id );
TileEntity te = theWorld.getTileEntity( qc.center.xCoord, qc.center.yCoord, qc.center.zCoord );
return te != qc.center || theWorld != cur;
}
}
}
@ -142,6 +148,24 @@ public class QuantumCluster implements ILocatable, IAECluster
try
{
if ( sideA.connection != null )
{
if ( sideA.connection.connection != null )
{
sideA.connection.connection.destroy();
sideA.connection = new ConnectionWrapper( null );
}
}
if ( sideB.connection != null )
{
if ( sideB.connection.connection != null )
{
sideB.connection.connection.destroy();
sideB.connection = new ConnectionWrapper( null );
}
}
sideA.connection = sideB.connection = new ConnectionWrapper( AEApi.instance().createGridConnection( sideA.getNode(), sideB.getNode() ) );
}
catch (FailedConnection e)

View file

@ -2,6 +2,7 @@ package appeng.me.helpers;
import java.util.Iterator;
import net.minecraft.item.ItemStack;
import appeng.api.networking.IGridMultiblock;
import appeng.api.networking.IGridNode;
import appeng.me.cluster.IAECluster;
@ -17,8 +18,8 @@ public class AENetworkProxyMultiblock extends AENetworkProxy implements IGridMul
return ((IAEMultiBlock) getMachine()).getCluster();
}
public AENetworkProxyMultiblock(IGridProxyable te, String nbtName, boolean inWorld) {
super( te, nbtName, null, inWorld );
public AENetworkProxyMultiblock(IGridProxyable te, String nbtName, ItemStack itemStack, boolean inWorld) {
super( te, nbtName, itemStack, inWorld );
}
@Override

View file

@ -15,7 +15,7 @@ import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import appeng.api.AEApi;
import appeng.api.util.WorldCoord;
import appeng.block.solids.BlockMatrixFrame;
import appeng.block.spatial.BlockMatrixFrame;
import appeng.core.AELog;
import appeng.util.Platform;
import cpw.mods.fml.relauncher.ReflectionHelper;

View file

@ -48,6 +48,12 @@ public class StorageWorldProvider extends WorldProvider
return false;
}
@Override
public boolean canSnowAt(int x, int y, int z, boolean checkLight)
{
return false;
}
@Override
public boolean canDoLightning(Chunk chunk)
{

View file

@ -44,7 +44,7 @@ public class TileSpatialPylon extends AENetworkTile implements IAEMultiBlock
@Override
protected AENetworkProxy createProxy()
{
return new AENetworkProxyMultiblock( this, "proxy", true );
return new AENetworkProxyMultiblock( this, "proxy", getItemFromTile( this ), true );
}
@Override