Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@
"menu.client.search": "Search...",
"menu.client.tab.hud": "HUD",
"menu.client.tab.mods": "Mods",
"menu.client.tab.animations": "1.7",
"menu.client.tab.settings": "Settings",
"menu.client.edit": "Edit",
"menu.client.expand": ">",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public final class MenuCatalog {
public enum Tab {
HUD,
MODS,
ANIMATIONS,
SETTINGS
}

Expand Down Expand Up @@ -162,13 +161,11 @@ public static List<Module> build() {
}

/**
* The 1.7 tab lists the feature groups directly. The parent category and
* Misc grab bag are gone, so only the remaining configurable groups appear.
* 1.7 animations are one Mods entry. The category's enabled option is the
* master switch; feature groups stay sections inside that module.
*/
private static void absorbAnimations(List<Module> modules, OptionCategory category) {
for (OptionCategory child : category.getSubCategories()) {
modules.add(moduleFrom(child.getName(), Tab.ANIMATIONS, firstEnabled(child.getOptions()), nodesFrom(child, false)));
}
modules.add(moduleFrom(category.getName(), Tab.MODS, firstEnabled(category.getOptions()), nodesFrom(category, false)));
}

private static void absorb(List<Module> modules, OptionCategory category, Tab tab) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public class HudEditScreen extends Screen {
private int listScroll;
private int mouseX, mouseY;
private int caretTicks;
private static final int TAB_COLS = 4;
private static final int TAB_COLS = 3;

private HudEntry current;
private DrawPosition offset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ final class ModsMenuIcons {
put("bedwars", Items.BED);
put("titles", Items.SIGN);

put("dolphinclient-oldanimations", Items.CLOCK);
put("blockingItemUsing", Items.IRON_SWORD);
put("sneaking", Items.IRON_BOOTS);
put("items", Items.DIAMOND);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ public class OldAnimationsConfig {
public final BooleanOption fastGrassItem = new BooleanOption("fastGrassItem", true);
public final BooleanOption framedItemRotationOffset = new BooleanOption("framedItemRotationOffset", true);

/** Off leaves vanilla 1.8.9 behavior. On applies each feature's own setting. */
private final BooleanOption enabled = new BooleanOption("enabled", true);

private final BooleanSupplier[] suppliers = new BooleanSupplier[]{
skullModel::get,
fastGrass::get,
Expand All @@ -201,7 +204,8 @@ public class OldAnimationsConfig {
// zombieVillagerHelmetOffset::get,
inventoryPressurePlateDimensions::get,
mipmapAllBlocks::get,
trapDoorItemPosition::get
trapDoorItemPosition::get,
enabled::get
};
private final boolean[] previousStates = {
skullModel.get(),
Expand All @@ -220,18 +224,20 @@ public class OldAnimationsConfig {
// zombieVillagerHelmetOffset.get(),
inventoryPressurePlateDimensions.get(),
mipmapAllBlocks.get(),
trapDoorItemPosition.get()
trapDoorItemPosition.get(),
enabled.get()
};

/**
* The 1.7 features no longer have a master switch: every one of them is
* individually configurable, which makes a global toggle redundant.
* Master switch for every 1.7 feature. Off leaves vanilla 1.8.9 behavior;
* on, each feature still follows its own setting.
*/
public static boolean isEnabled() {
return true;
return instance.enabled.get();
}

public void initConfig() {
category.add(enabled);
category.add(blockingItemUsing);
blockingItemUsing.add(
blockHitting,
Expand Down Expand Up @@ -444,6 +450,7 @@ private void reloadResources() {
} else if (i == 1 || i == 4 || i == 7 || i == 9) {
reloadWorld = true;
} else {
// Every other supplier, including the master switch at the end, rebakes resources.
needsReload = true;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dolphinclient-oldanimations": "Old Animations",
"dolphinclient-oldanimations": "1.7 Animations",
"blockingItemUsing": "Blocking/Item Using",
"sneaking": "Sneaking",
"items": "Items",
Expand Down
Loading