generated from tilera/1710mod
chore: update capes code
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
16fea97234
commit
5f9630e891
|
@ -1,7 +1,12 @@
|
||||||
package dev.tilera.capes;
|
package dev.tilera.capes;
|
||||||
|
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.net.URL;
|
||||||
|
|
||||||
import com.jadarstudios.developercapes.DevCapes;
|
import com.jadarstudios.developercapes.DevCapes;
|
||||||
|
|
||||||
|
import org.apache.commons.io.IOUtils;
|
||||||
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
public class Capes {
|
public class Capes {
|
||||||
|
@ -12,8 +17,12 @@ public class Capes {
|
||||||
if (!capesInitialized) {
|
if (!capesInitialized) {
|
||||||
capesInitialized = true;
|
capesInitialized = true;
|
||||||
try {
|
try {
|
||||||
|
URL index = new URL("https://capes.tilera.xyz/devcapes/index");
|
||||||
|
InputStream stream = DevCapes.getInstance().getStreamForURL(index);
|
||||||
|
String capeConfig = IOUtils.toString(stream);
|
||||||
|
stream.close();
|
||||||
DevCapes.getInstance().registerConfig(
|
DevCapes.getInstance().registerConfig(
|
||||||
"https://capes.tilera.xyz/devcapes.json"
|
capeConfig
|
||||||
);
|
);
|
||||||
MinecraftForge.EVENT_BUS.register(new RenderEventHandler());
|
MinecraftForge.EVENT_BUS.register(new RenderEventHandler());
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
|
Loading…
Reference in a new issue