moved p2p forge event to an upper class
add an extra update after the network has finished booting
This commit is contained in:
@@ -31,10 +31,6 @@ import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.networking.events.MENetworkBootingStatusChange;
|
||||
import appeng.api.networking.events.MENetworkChannelsChanged;
|
||||
import appeng.api.networking.events.MENetworkEventSubscribe;
|
||||
import appeng.api.networking.events.MENetworkPowerStatusChange;
|
||||
import appeng.api.parts.IPartModel;
|
||||
import appeng.items.parts.PartModels;
|
||||
import appeng.me.GridAccessException;
|
||||
@@ -60,12 +56,6 @@ public class PartP2PRedstone extends PartP2PTunnel<PartP2PRedstone>
|
||||
super( is );
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void changeStateA( final MENetworkBootingStatusChange bs )
|
||||
{
|
||||
this.setNetworkReady();
|
||||
}
|
||||
|
||||
private void setNetworkReady()
|
||||
{
|
||||
if( this.isOutput() )
|
||||
@@ -97,12 +87,20 @@ public class PartP2PRedstone extends PartP2PTunnel<PartP2PRedstone>
|
||||
}
|
||||
|
||||
this.recursive = true;
|
||||
if( this.isOutput() && this.getProxy().isActive() )
|
||||
if( this.isOutput() )
|
||||
{
|
||||
final int newPower = (Integer) o;
|
||||
if( this.power != newPower )
|
||||
if( this.getProxy().isActive() )
|
||||
{
|
||||
this.power = newPower;
|
||||
final int newPower = (Integer) o;
|
||||
if( this.power != newPower )
|
||||
{
|
||||
this.power = newPower;
|
||||
this.notifyNeighbors();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.power = 0;
|
||||
this.notifyNeighbors();
|
||||
}
|
||||
}
|
||||
@@ -122,18 +120,6 @@ public class PartP2PRedstone extends PartP2PTunnel<PartP2PRedstone>
|
||||
}
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void changeStateB( final MENetworkChannelsChanged bs )
|
||||
{
|
||||
this.setNetworkReady();
|
||||
}
|
||||
|
||||
@MENetworkEventSubscribe
|
||||
public void changeStateC( final MENetworkPowerStatusChange bs )
|
||||
{
|
||||
this.setNetworkReady();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT( final NBTTagCompound tag )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user