Fixed Bug: #0432 - Weird Inventory behavior in Quartz Cutting Knife

Removed logging from Migration Items.
Improved logging for http://openeye.openmods.info/crashes/42defba4fcc4c4571a45edaaba3af4c3
Improved logging for http://openeye.openmods.info/crashes/cbda180edb2fba39c4fe27a7f5266fec
This commit is contained in:
AlgorithmX2
2014-05-14 10:55:45 -05:00
parent f87e7a4ee8
commit 9ba1b133d7
5 changed files with 37 additions and 28 deletions
+28 -21
View File
@@ -80,36 +80,43 @@ public class NetworkEventBus
return;
readClasses.add( c );
for (Method m : c.getMethods())
try
{
MENetworkEventSubscribe s = m.getAnnotation( MENetworkEventSubscribe.class );
if ( s != null )
for (Method m : c.getMethods())
{
Class types[] = m.getParameterTypes();
if ( types.length == 1 )
MENetworkEventSubscribe s = m.getAnnotation( MENetworkEventSubscribe.class );
if ( s != null )
{
if ( MENetworkEvent.class.isAssignableFrom( types[0] ) )
Class types[] = m.getParameterTypes();
if ( types.length == 1 )
{
Hashtable<Class, MENetworkEventInfo> classEvents = events.get( types[0] );
if ( classEvents == null )
events.put( types[0], classEvents = new Hashtable() );
MENetworkEventInfo thisEvent = classEvents.get( listAs );
if ( thisEvent == null )
thisEvent = new MENetworkEventInfo();
thisEvent.Add( types[0], c, m );
classEvents.put( listAs, thisEvent );
if ( MENetworkEvent.class.isAssignableFrom( types[0] ) )
{
Hashtable<Class, MENetworkEventInfo> classEvents = events.get( types[0] );
if ( classEvents == null )
events.put( types[0], classEvents = new Hashtable() );
MENetworkEventInfo thisEvent = classEvents.get( listAs );
if ( thisEvent == null )
thisEvent = new MENetworkEventInfo();
thisEvent.Add( types[0], c, m );
classEvents.put( listAs, thisEvent );
}
else
throw new RuntimeException( "Invalid ME Network Event Subscriber, " + m.getName() + "s Parameter must extend MENetworkEvent." );
}
else
throw new RuntimeException( "Invalid ME Network Event Subscriber, " + m.getName() + "s Parameter must extend MENetworkEvent." );
throw new RuntimeException( "Invalid ME Network Event Subscriber, " + m.getName() + " must have exactly 1 parameter." );
}
else
throw new RuntimeException( "Invalid ME Network Event Subscriber, " + m.getName() + " must have exactly 1 parameter." );
}
}
catch(Throwable t )
{
throw new RuntimeException( "Error while adding "+c.getName()+" to event bus", t );
}
}