Skip to content

Commit

Permalink
reload resources when block types change
Browse files Browse the repository at this point in the history
  • Loading branch information
octarine-noise committed Mar 16, 2015
1 parent dc30821 commit 19a75f5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/mods/betterfoliage/common/config/Config.java
Expand Up @@ -340,8 +340,13 @@ protected static void setOrder(Category category, String... properties) {
public void handleConfigChange(ConfigChangedEvent.OnConfigChangedEvent event) {
if (event.modID.equals(BetterFoliage.MOD_ID)) {
updateValues();
boolean blocksUpdated = rawConfig.getCategory(Category.blockTypes.toString()).hasChanged();
if (rawConfig.hasChanged()) rawConfig.save();
Minecraft.getMinecraft().renderGlobal.loadRenderers();

if (blocksUpdated)
Minecraft.getMinecraft().refreshResources();
else
Minecraft.getMinecraft().renderGlobal.loadRenderers();
}
}
}

0 comments on commit 19a75f5

Please sign in to comment.