Search in sources :

Example 1 with PlayerModelPart

use of net.minecraft.entity.player.PlayerModelPart in project ModernUI by BloCamLimb.

the class SettingGeneral method addSkinCategory.

private void addSkinCategory(List<SettingCategoryGroup> groups) {
    List<SettingEntry> list = new ArrayList<>();
    GameSettings gameSettings = minecraft.gameSettings;
    list.add(SettingsManager.MAIN_HAND.apply(window));
    for (PlayerModelPart part : PlayerModelPart.values()) {
        BooleanSettingEntry entry = new BooleanSettingEntry(window, part.getName().getString(), gameSettings.getModelParts().contains(part), b -> gameSettings.setModelPartEnabled(part, b));
        list.add(entry);
    }
    SettingCategoryGroup categoryGroup = new SettingCategoryGroup(window, I18n.format("gui.modernui.settings.category.skin"), list);
    groups.add(categoryGroup);
}
Also used : ArrayList(java.util.ArrayList) GameSettings(net.minecraft.client.GameSettings) PlayerModelPart(net.minecraft.entity.player.PlayerModelPart)

Aggregations

ArrayList (java.util.ArrayList)1 GameSettings (net.minecraft.client.GameSettings)1 PlayerModelPart (net.minecraft.entity.player.PlayerModelPart)1