Patches so that pumps and pipes can be moved by frames properly, other buildcraft tiles not tested
This commit is contained in:
parent
7fbe8623ac
commit
9755eadfb0
8 changed files with 23 additions and 7 deletions
|
@ -290,6 +290,7 @@ public class TileArchitect extends TileBuildCraft implements IInventory {
|
|||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -507,6 +507,7 @@ public class TileBuilder extends TileBuildCraft implements IBuilderInventory, IP
|
|||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -290,6 +290,7 @@ public class TileFiller extends TileBuildCraft implements ISpecialInventory, IPo
|
|||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -334,6 +334,7 @@ public class TileMarker extends TileBuildCraft implements IAreaProvider {
|
|||
|
||||
@Override
|
||||
public void invalidate() {
|
||||
super.invalidate();
|
||||
destroy();
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized
|
|||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (!init) {
|
||||
if (!init && !isInvalid()) {
|
||||
initialize();
|
||||
init = true;
|
||||
}
|
||||
|
@ -60,6 +60,13 @@ public abstract class TileBuildCraft extends TileEntity implements ISynchronized
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void invalidate()
|
||||
{
|
||||
init = false;
|
||||
super.invalidate();
|
||||
}
|
||||
|
||||
public void initialize() {
|
||||
Utils.handleBufferedDescription(this);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
TileEntity tile = blockAccess.getBlockTileEntity(i, j, k);
|
||||
|
||||
if (tile != null && !tile.isInvalid())
|
||||
return tile.pipe;
|
||||
if(!(tile instanceof TileGenericPipe) || tile.isInvalid())
|
||||
return null;
|
||||
|
||||
return null;
|
||||
return ((TileGenericPipe)tile).pipe;
|
||||
}
|
||||
|
||||
public static boolean isFullyDefined(Pipe pipe) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue