/**
* Attempts to download a resource from the web and load it into the game. If the resource
* can not be downloaded successfully. Wraps
* {@link #downloadResource(String, ResourceLocation, ResourceLocation, IImageBuffer)} but
* returns the output ResourceLocation.
*
* @param url The URL to download the resource from. This should be the raw/source url.
* @param outputResource The ResourceLocation to use for the newly downloaded resource.
* @param defaultResource The default texture to use, on the chance that it fails to
* download a texture. This must be a valid texture, or else you will get a missing
* texture.
* @param buffer A special buffer to use when downloading the image. It is okay to pass
* null for this if you don't want anything fancy.
* @return The output resource location.
*/
public static ResourceLocation downloadResourceLocation (String url, ResourceLocation outputResource, ResourceLocation defaultResource, IImageBuffer buffer) {
downloadResource(url, outputResource, defaultResource, buffer);
return outputResource;
}
RenderUtils.java 文件源码
java
阅读 30
收藏 0
点赞 0
评论 0
项目:Bookshelf
作者:
评论列表
文章目录