Skip to content

Commit

Permalink
fix custom leaf texture metadata reading
Browse files Browse the repository at this point in the history
  • Loading branch information
octarine-noise committed May 26, 2015
1 parent 87d1710 commit 7233f21
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -65,16 +65,16 @@ public IResource getResource(ResourceLocation resourceLocation) throws IOExcepti
IResourceManager resourceManager = Minecraft.getMinecraft().getResourceManager();
ResourceLocation originalResource = ResourceUtils.unwrapResource(resourceLocation);

// use animation metadata as-is
if (resourceLocation.getResourcePath().toLowerCase().endsWith(".mcmeta")) return resourceManager.getResource(originalResource);

// check for provided texture
ResourceLocation customLocation = getCustomLocation(originalResource);
if (ResourceUtils.resourceExists(customLocation)) {
drawnCounter++;
return resourceManager.getResource(customLocation);
}

// use animation metadata as-is
if (resourceLocation.getResourcePath().toLowerCase().endsWith(".mcmeta")) return resourceManager.getResource(originalResource);

// generate our own
if (!ResourceUtils.resourceExists(originalResource)) {
BetterFoliage.log.info(String.format("Could not find resource: %s", originalResource.toString()));
Expand Down

0 comments on commit 7233f21

Please sign in to comment.