Back Port "Fix an issue where interfaces would not cause storage buses to re-check their status."
This commit is contained in:
@@ -108,11 +108,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TileEntity te = iHost.getTileEntity();
|
notifyNeightbors();
|
||||||
if ( hadConfig != hasConfig && te != null && te.getWorldObj() != null )
|
|
||||||
{
|
|
||||||
te.getWorldObj().notifyBlocksOfNeighborChange( te.xCoord, te.yCoord, te.zCoord, Platform.air );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void writeToNBT(NBTTagCompound data)
|
public void writeToNBT(NBTTagCompound data)
|
||||||
@@ -329,8 +325,7 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
fluids.setInternal( new NullInventory() );
|
fluids.setInternal( new NullInventory() );
|
||||||
}
|
}
|
||||||
|
|
||||||
TileEntity te = iHost.getTileEntity();
|
notifyNeightbors();
|
||||||
te.getWorldObj().notifyBlocksOfNeighborChange( te.xCoord, te.yCoord, te.zCoord, Platform.air );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public AECableType getCableConnectionType(ForgeDirection dir)
|
public AECableType getCableConnectionType(ForgeDirection dir)
|
||||||
@@ -518,4 +513,13 @@ public class DualityInterface implements IGridTickable, ISegmentedInventory, ISt
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
public void notifyNeightbors()
|
||||||
|
{
|
||||||
|
TileEntity te = iHost.getTileEntity();
|
||||||
|
if ( te != null && te.getWorldObj() != null )
|
||||||
|
{
|
||||||
|
te.getWorldObj().notifyBlocksOfNeighborChange( te.xCoord, te.yCoord, te.zCoord, Platform.air );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
|
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||||
|
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||||
|
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
import appeng.api.networking.ticking.IGridTickable;
|
import appeng.api.networking.ticking.IGridTickable;
|
||||||
import appeng.api.networking.ticking.TickRateModulation;
|
import appeng.api.networking.ticking.TickRateModulation;
|
||||||
@@ -48,6 +51,18 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISeg
|
|||||||
super( PartInterface.class, is );
|
super( PartInterface.class, is );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@MENetworkEventSubscribe
|
||||||
|
public void stateChange(MENetworkChannelsChanged c)
|
||||||
|
{
|
||||||
|
duality.notifyNeightbors();
|
||||||
|
}
|
||||||
|
|
||||||
|
@MENetworkEventSubscribe
|
||||||
|
public void stateChange(MENetworkPowerStatusChange c)
|
||||||
|
{
|
||||||
|
duality.notifyNeightbors();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void gridChanged()
|
public void gridChanged()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import net.minecraftforge.common.util.ForgeDirection;
|
|||||||
import appeng.api.implementations.tiles.ISegmentedInventory;
|
import appeng.api.implementations.tiles.ISegmentedInventory;
|
||||||
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
import appeng.api.implementations.tiles.ITileStorageMonitorable;
|
||||||
import appeng.api.networking.IGridNode;
|
import appeng.api.networking.IGridNode;
|
||||||
|
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||||
|
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||||
|
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||||
import appeng.api.networking.security.BaseActionSource;
|
import appeng.api.networking.security.BaseActionSource;
|
||||||
import appeng.api.networking.ticking.IGridTickable;
|
import appeng.api.networking.ticking.IGridTickable;
|
||||||
import appeng.api.networking.ticking.TickRateModulation;
|
import appeng.api.networking.ticking.TickRateModulation;
|
||||||
@@ -38,6 +41,18 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, IS
|
|||||||
ForgeDirection pointAt = ForgeDirection.UNKNOWN;
|
ForgeDirection pointAt = ForgeDirection.UNKNOWN;
|
||||||
DualityInterface duality = new DualityInterface( gridProxy, this );
|
DualityInterface duality = new DualityInterface( gridProxy, this );
|
||||||
|
|
||||||
|
@MENetworkEventSubscribe
|
||||||
|
public void stateChange(MENetworkChannelsChanged c)
|
||||||
|
{
|
||||||
|
duality.notifyNeightbors();
|
||||||
|
}
|
||||||
|
|
||||||
|
@MENetworkEventSubscribe
|
||||||
|
public void stateChange(MENetworkPowerStatusChange c)
|
||||||
|
{
|
||||||
|
duality.notifyNeightbors();
|
||||||
|
}
|
||||||
|
|
||||||
public void setSide(ForgeDirection axis)
|
public void setSide(ForgeDirection axis)
|
||||||
{
|
{
|
||||||
if ( Platform.isClient() )
|
if ( Platform.isClient() )
|
||||||
|
|||||||
Reference in New Issue
Block a user