Merge branch 'rv1' of https://bitbucket.org/AlgorithmX2/appliedenergistics2 into rv1
This commit is contained in:
commit
2dc1b4ec05
2 changed files with 14 additions and 6 deletions
|
@ -39,7 +39,7 @@ public class ColoredItemDefinition implements AEColoredItemDefinition
|
|||
{
|
||||
ItemStackSrc is = colors[color.ordinal()];
|
||||
|
||||
if ( comparableItem == null )
|
||||
if ( comparableItem == null || is == null )
|
||||
return false;
|
||||
|
||||
return comparableItem.getItem() == is.item && comparableItem.getItemDamage() == is.damage;
|
||||
|
|
|
@ -26,7 +26,8 @@ public class VersionChecker implements Runnable
|
|||
private long delay = 0;
|
||||
private boolean VersionChecker = true;
|
||||
|
||||
public VersionChecker() {
|
||||
public VersionChecker()
|
||||
{
|
||||
long now = (new Date()).getTime();
|
||||
delay = (1000 * 3600 * 5) - (now - AEConfig.instance.latestTimeStamp);
|
||||
if ( delay < 1 )
|
||||
|
@ -38,19 +39,21 @@ public class VersionChecker implements Runnable
|
|||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep( delay );
|
||||
sleep( delay );
|
||||
}
|
||||
catch (InterruptedException e)
|
||||
{
|
||||
// :(
|
||||
}
|
||||
|
||||
while (true)
|
||||
{
|
||||
Thread.yield();
|
||||
|
||||
try
|
||||
{
|
||||
String MCVersion = cpw.mods.fml.common.Loader.instance().getMCVersionString().replace( "Minecraft ", "" );
|
||||
URL url = new URL( "http://ae2.ae-mod.info/builds/latest.json?VersionMC=" + MCVersion + "&Channel=" + AEConfig.CHANNEL + "&CurrentVersion="
|
||||
URL url = new URL( "http://feeds.ae-mod.info/latest.json?VersionMC=" + MCVersion + "&Channel=" + AEConfig.CHANNEL + "&CurrentVersion="
|
||||
+ AEConfig.VERSION );
|
||||
|
||||
URLConnection yc = url.openConnection();
|
||||
|
@ -105,13 +108,13 @@ public class VersionChecker implements Runnable
|
|||
}
|
||||
}
|
||||
|
||||
Thread.sleep( 1000 * 3600 * 4 );
|
||||
sleep( 1000 * 3600 * 4 );
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
try
|
||||
{
|
||||
Thread.sleep( 1000 * 3600 * 4 );
|
||||
sleep( 1000 * 3600 * 4 );
|
||||
}
|
||||
catch (InterruptedException e1)
|
||||
{
|
||||
|
@ -120,4 +123,9 @@ public class VersionChecker implements Runnable
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sleep(long i) throws InterruptedException
|
||||
{
|
||||
Thread.sleep( i );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue