Merge pull request #82 from Chicken-Bones/master

BuildCraft Frame patches
This commit is contained in:
SirSengir 2012-07-09 06:53:47 -07:00
commit 95b6579e6d
8 changed files with 23 additions and 7 deletions

View file

@ -290,6 +290,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory {
@Override
public void invalidate() {
super.invalidate();
destroy();
}

View file

@ -507,6 +507,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
@Override
public void invalidate() {
super.invalidate();
destroy();
}

View file

@ -290,6 +290,7 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
@Override
public void invalidate() {
super.invalidate();
destroy();
}

View file

@ -334,6 +334,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
@Override
public void invalidate() {
super.invalidate();
destroy();
}

View file

@ -48,7 +48,7 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized
@Override
public void updateEntity() {
if (!init) {
if (!init && !isInvalid()) {
initialize();
init = true;
}
@ -59,6 +59,13 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized
receptor.getPowerProvider().update(receptor);
}
}
@Override
public void invalidate()
{
init = false;
super.invalidate();
}
public void initialize() {
Utils.handleBufferedDescription(this);

View file

@ -344,6 +344,7 @@ public class TilePump extends TileMachine implements IMachine, IPowerReceptor {
@Override
public void invalidate() {
super.invalidate();
destroy();
}
@ -352,6 +353,9 @@ public class TilePump extends TileMachine implements IMachine, IPowerReceptor {
if (tube != null) {
APIProxy.removeEntity(tube);
tube = null;
tubeY = Double.NaN;
aimY = 0;
blocksToPump.clear();
}
}

View file

@ -518,12 +518,12 @@ public class BlockGenericPipe extends BlockContainer implements IBlockPipe, ITex
public static Pipe getPipe(IBlockAccess blockAccess, int i, int j, int k) {
TileGenericPipe tile = (TileGenericPipe) blockAccess.getBlockTileEntity(i, j, k);
if (tile != null && !tile.isInvalid())
return tile.pipe;
TileEntity tile = blockAccess.getBlockTileEntity(i, j, k);
return null;
if(!(tile instanceof TileGenericPipe) || tile.isInvalid())
return null;
return ((TileGenericPipe)tile).pipe;
}
public static boolean isFullyDefined(Pipe pipe) {

View file

@ -103,7 +103,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ILiqu
@Override
public void invalidate() {
initialized = false;
super.invalidate();
// if (BlockGenericPipe.isValid(pipe))
@ -112,6 +112,7 @@ public class TileGenericPipe extends TileEntity implements IPowerReceptor, ILiqu
@Override
public void validate() {
super.validate();
bindPipe();
}