Fixes #2599: Missing instanceof EntityPlayerMP test.

This commit is contained in:
yueh 2016-11-09 15:46:10 +01:00
parent 89609a83ea
commit c592f54a77
2 changed files with 16 additions and 9 deletions

View file

@ -97,7 +97,10 @@ public class SyncData
} }
else if( val instanceof Long || val.getClass() == long.class ) else if( val instanceof Long || val.getClass() == long.class )
{ {
NetworkHandler.instance.sendTo( new PacketProgressBar( this.channel, (Long) val ), (EntityPlayerMP) o ); if( o instanceof EntityPlayerMP )
{
NetworkHandler.instance.sendTo( new PacketProgressBar( this.channel, (Long) val ), (EntityPlayerMP) o );
}
} }
else if( val instanceof Boolean || val.getClass() == boolean.class ) else if( val instanceof Boolean || val.getClass() == boolean.class )
{ {

View file

@ -186,15 +186,18 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
if( sideLocal != sideRemote ) if( sideLocal != sideRemote )
{ {
this.clientCM.putSetting( set, sideLocal ); this.clientCM.putSetting( set, sideLocal );
for( final Object crafter : this.listeners ) for( final IContainerListener crafter : this.listeners )
{ {
try if( crafter instanceof EntityPlayerMP )
{ {
NetworkHandler.instance.sendTo( new PacketValueConfig( set.name(), sideLocal.name() ), (EntityPlayerMP) crafter ); try
} {
catch( final IOException e ) NetworkHandler.instance.sendTo( new PacketValueConfig( set.name(), sideLocal.name() ), (EntityPlayerMP) crafter );
{ }
AELog.debug( e ); catch( final IOException e )
{
AELog.debug( e );
}
} }
} }
} }
@ -258,6 +261,7 @@ public class ContainerMEMonitorable extends AEBaseContainer implements IConfigMa
super.detectAndSendChanges(); super.detectAndSendChanges();
} }
} }
protected void updatePowerStatus() protected void updatePowerStatus()