2015-11-02 20:55:19 +01:00
|
|
|
/*
|
2016-05-16 22:52:27 +02:00
|
|
|
* This file ("ThreadSpecialFetcher.java") is part of the Actually Additions mod for Minecraft.
|
2015-11-02 20:55:19 +01:00
|
|
|
* It is created and owned by Ellpeck and distributed
|
|
|
|
* under the Actually Additions License to be found at
|
2016-05-16 22:52:27 +02:00
|
|
|
* http://ellpeck.de/actaddlicense
|
2015-11-02 20:55:19 +01:00
|
|
|
* View the source code at https://github.com/Ellpeck/ActuallyAdditions
|
|
|
|
*
|
2016-05-16 22:54:42 +02:00
|
|
|
* © 2015-2016 Ellpeck
|
2015-11-02 20:55:19 +01:00
|
|
|
*/
|
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
package de.ellpeck.actuallyadditions.mod.misc.special;
|
2015-11-02 20:55:19 +01:00
|
|
|
|
2016-01-05 04:47:35 +01:00
|
|
|
import de.ellpeck.actuallyadditions.mod.util.ModUtil;
|
2015-11-02 20:55:19 +01:00
|
|
|
|
|
|
|
import java.io.InputStreamReader;
|
|
|
|
import java.net.URL;
|
|
|
|
import java.util.Properties;
|
|
|
|
|
|
|
|
public class ThreadSpecialFetcher extends Thread{
|
|
|
|
|
|
|
|
public ThreadSpecialFetcher(){
|
2016-05-03 08:45:01 +02:00
|
|
|
this.setName(ModUtil.NAME+" Special Fetcher");
|
2015-11-02 20:55:19 +01:00
|
|
|
this.setDaemon(true);
|
|
|
|
this.start();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void run(){
|
2015-11-02 21:38:49 +01:00
|
|
|
ModUtil.LOGGER.info("Fetching Special People Stuff...");
|
2015-11-02 20:55:19 +01:00
|
|
|
try{
|
|
|
|
URL url = new URL("https://raw.githubusercontent.com/Ellpeck/ActuallyAdditions/master/specialPeopleStuff.properties");
|
2015-11-02 21:38:49 +01:00
|
|
|
Properties specialProperties = new Properties();
|
2015-11-02 20:55:19 +01:00
|
|
|
specialProperties.load(new InputStreamReader(url.openStream()));
|
2015-11-02 21:38:49 +01:00
|
|
|
SpecialRenderInit.parse(specialProperties);
|
2015-11-02 20:55:19 +01:00
|
|
|
|
|
|
|
ModUtil.LOGGER.info("Fetching Special People Stuff done!");
|
|
|
|
}
|
|
|
|
catch(Exception e){
|
2015-11-02 21:38:49 +01:00
|
|
|
ModUtil.LOGGER.error("Fetching Special People Stuff failed! (You can ignore this error technically.)", e);
|
2015-11-02 20:55:19 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|