use of com.chattriggers.ctjs.utils.ImagesPack in project ct.js by ChatTriggers.
the class CTJS method injectResourcePack.
private void injectResourcePack(String path) {
try {
File pictures = new File(path, "ChatTriggers/images/");
Field field = FMLClientHandler.class.getDeclaredField("resourcePackList");
field.setAccessible(true);
List<IResourcePack> packs = (List<IResourcePack>) field.get(FMLClientHandler.instance());
imagesPack = new ImagesPack(pictures);
packs.add(imagesPack);
pictures.mkdirs();
assetsDir = pictures;
} catch (Exception exception) {
exception.printStackTrace();
}
}
Aggregations