use of icyllis.modernui.impl.setting.ResourcePackEntry in project ModernUI by BloCamLimb.
the class SettingResourcePack method applyResourcePacks.
private void applyResourcePacks() {
List<ResourcePackInfo> list = Lists.newArrayList();
GameSettings gameSettings = minecraft.gameSettings;
for (ResourcePackEntry c2 : selectedGroup.getEntries()) {
list.add(c2.getResourcePack());
}
Collections.reverse(list);
// FIXME
// minecraft.getResourcePackList().setEnabledPacks(list);
gameSettings.resourcePacks.clear();
gameSettings.incompatibleResourcePacks.clear();
for (ResourcePackInfo c3 : list) {
if (!c3.isOrderLocked()) {
gameSettings.resourcePacks.add(c3.getName());
if (!c3.getCompatibility().isCompatible()) {
gameSettings.incompatibleResourcePacks.add(c3.getName());
}
}
}
gameSettings.saveOptions();
minecraft.reloadResources();
applyButton.setStatus(WidgetStatus.INACTIVE, false);
}
Aggregations