Fixed a bug where RF and IC2 tunnels could vaporize them selves.
Fixed Bug: #0514 - An unknown error occurs frequently
This commit is contained in:
@@ -103,7 +103,13 @@ public class PartP2PIC2Power extends PartP2PTunnel<PartP2PIC2Power> implements i
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChange()
|
||||
public void onTunnelNetworkChange()
|
||||
{
|
||||
getHost().notifyNeighbors();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onTunnelConfigChange()
|
||||
{
|
||||
getHost().partChanged();
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
|
||||
cachedInv = null;
|
||||
PartP2PItems input = getInput();
|
||||
if ( input != null && output )
|
||||
input.onChange();
|
||||
input.onTunnelNetworkChange();
|
||||
}
|
||||
|
||||
IInventory getDest()
|
||||
@@ -161,8 +161,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
|
||||
oldSize = getDest().getSizeInventory();
|
||||
if ( olderSize != oldSize )
|
||||
{
|
||||
getHost().partChanged();
|
||||
tile.getWorldObj().notifyBlocksOfNeighborChange( tile.xCoord, tile.yCoord, tile.zCoord, Platform.air );
|
||||
getHost().notifyNeighbors();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,8 +176,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
|
||||
oldSize = getDest().getSizeInventory();
|
||||
if ( olderSize != oldSize )
|
||||
{
|
||||
getHost().partChanged();
|
||||
tile.getWorldObj().notifyBlocksOfNeighborChange( tile.xCoord, tile.yCoord, tile.zCoord, Platform.air );
|
||||
getHost().notifyNeighbors();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,7 +198,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChange()
|
||||
public void onTunnelNetworkChange()
|
||||
{
|
||||
if ( !output )
|
||||
{
|
||||
@@ -217,7 +215,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements IPipeCo
|
||||
{
|
||||
PartP2PItems input = getInput();
|
||||
if ( input != null )
|
||||
input.onChange();
|
||||
input.getHost().notifyNeighbors();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -116,12 +116,12 @@ public class PartP2PLiquids extends PartP2PTunnel<PartP2PLiquids> implements IFl
|
||||
{
|
||||
PartP2PLiquids in = getInput();
|
||||
if ( in != null )
|
||||
in.onChange();
|
||||
in.onTunnelNetworkChange();
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void onChange()
|
||||
public void onTunnelNetworkChange()
|
||||
{
|
||||
cachedTank = null;
|
||||
}
|
||||
|
||||
@@ -67,9 +67,9 @@ public class PartP2PRFPower extends PartP2PTunnel<PartP2PRFPower> implements cof
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChange()
|
||||
public void onTunnelNetworkChange()
|
||||
{
|
||||
getHost().partChanged();
|
||||
getHost().notifyNeighbors();
|
||||
}
|
||||
|
||||
public float getPowerDrainPerTick()
|
||||
|
||||
@@ -49,7 +49,7 @@ public class PartP2PRedstone extends PartP2PTunnel<PartP2PRedstone>
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChange()
|
||||
public void onTunnelNetworkChange()
|
||||
{
|
||||
setNetworkReady();
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
// :P
|
||||
}
|
||||
|
||||
newTunnel.onChange();
|
||||
newTunnel.onTunnelNetworkChange();
|
||||
}
|
||||
|
||||
mc.notifyUser( player, MemoryCardMessages.SETTINGS_LOADED );
|
||||
@@ -165,7 +165,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
{
|
||||
PartP2PTunnel newTunnel = (PartP2PTunnel) newBus;
|
||||
newTunnel.output = oldOutput;
|
||||
newTunnel.onChange();
|
||||
newTunnel.onTunnelNetworkChange();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -216,7 +216,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
}
|
||||
}
|
||||
|
||||
onChange();
|
||||
onTunnelConfigChange();
|
||||
|
||||
ItemStack p2pItem = getItemStack( PartItemStack.Wrench );
|
||||
String type = p2pItem.getUnlocalizedName();
|
||||
@@ -231,6 +231,10 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
return false;
|
||||
}
|
||||
|
||||
public void onTunnelConfigChange()
|
||||
{
|
||||
}
|
||||
|
||||
public ItemStack getItemStack(PartItemStack type)
|
||||
{
|
||||
if ( type == PartItemStack.World || type == PartItemStack.Network || type == PartItemStack.Wrench || type == PartItemStack.Pick )
|
||||
@@ -271,7 +275,7 @@ public class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicState
|
||||
return new TunnelCollection( new ArrayList(), getClass() );
|
||||
}
|
||||
|
||||
public void onChange()
|
||||
public void onTunnelNetworkChange()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -92,9 +92,9 @@ public class PartP2PTunnelME extends PartP2PTunnel<PartP2PTunnelME> implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onChange()
|
||||
public void onTunnelNetworkChange()
|
||||
{
|
||||
super.onChange();
|
||||
super.onTunnelNetworkChange();
|
||||
if ( !output )
|
||||
{
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user