Skip to content

Commit 9cf8f10

Browse files
Replace the 1.7 tab with one 1.7 Animations mod
The feature groups stay sections inside that mod. Its tile toggle is the master switch: off leaves vanilla 1.8.9, and on keeps each setting as it is. Co-authored-by: seungd <seungd@uci.edu>
1 parent 71e4547 commit 9cf8f10

6 files changed

Lines changed: 18 additions & 14 deletions

File tree

‎common/src/main/resources/assets/dolphinclient/lang/en_us.json‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,6 @@
266266
"menu.client.search": "Search...",
267267
"menu.client.tab.hud": "HUD",
268268
"menu.client.tab.mods": "Mods",
269-
"menu.client.tab.animations": "1.7",
270269
"menu.client.tab.settings": "Settings",
271270
"menu.client.edit": "Edit",
272271
"menu.client.expand": ">",

‎versions/1.8.9/src/main/java/io/github/dolphinclient/config/ui/MenuCatalog.java‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public final class MenuCatalog {
4848
public enum Tab {
4949
HUD,
5050
MODS,
51-
ANIMATIONS,
5251
SETTINGS
5352
}
5453

@@ -162,13 +161,11 @@ public static List<Module> build() {
162161
}
163162

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

174171
private static void absorb(List<Module> modules, OptionCategory category, Tab tab) {

‎versions/1.8.9/src/main/java/io/github/dolphinclient/modules/hud/HudEditScreen.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class HudEditScreen extends Screen {
9292
private int listScroll;
9393
private int mouseX, mouseY;
9494
private int caretTicks;
95-
private static final int TAB_COLS = 4;
95+
private static final int TAB_COLS = 3;
9696

9797
private HudEntry current;
9898
private DrawPosition offset;

‎versions/1.8.9/src/main/java/io/github/dolphinclient/modules/hud/ModsMenuIcons.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ final class ModsMenuIcons {
106106
put("bedwars", Items.BED);
107107
put("titles", Items.SIGN);
108108

109+
put("dolphinclient-oldanimations", Items.CLOCK);
109110
put("blockingItemUsing", Items.IRON_SWORD);
110111
put("sneaking", Items.IRON_BOOTS);
111112
put("items", Items.DIAMOND);

‎versions/1.8.9/src/main/java/io/github/dolphinclient/oldanimations/config/OldAnimationsConfig.java‎

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ public class OldAnimationsConfig {
184184
public final BooleanOption fastGrassItem = new BooleanOption("fastGrassItem", true);
185185
public final BooleanOption framedItemRotationOffset = new BooleanOption("framedItemRotationOffset", true);
186186

187+
/** Off leaves vanilla 1.8.9 behavior. On applies each feature's own setting. */
188+
private final BooleanOption enabled = new BooleanOption("enabled", true);
189+
187190
private final BooleanSupplier[] suppliers = new BooleanSupplier[]{
188191
skullModel::get,
189192
fastGrass::get,
@@ -201,7 +204,8 @@ public class OldAnimationsConfig {
201204
// zombieVillagerHelmetOffset::get,
202205
inventoryPressurePlateDimensions::get,
203206
mipmapAllBlocks::get,
204-
trapDoorItemPosition::get
207+
trapDoorItemPosition::get,
208+
enabled::get
205209
};
206210
private final boolean[] previousStates = {
207211
skullModel.get(),
@@ -220,18 +224,20 @@ public class OldAnimationsConfig {
220224
// zombieVillagerHelmetOffset.get(),
221225
inventoryPressurePlateDimensions.get(),
222226
mipmapAllBlocks.get(),
223-
trapDoorItemPosition.get()
227+
trapDoorItemPosition.get(),
228+
enabled.get()
224229
};
225230

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

234239
public void initConfig() {
240+
category.add(enabled);
235241
category.add(blockingItemUsing);
236242
blockingItemUsing.add(
237243
blockHitting,
@@ -444,6 +450,7 @@ private void reloadResources() {
444450
} else if (i == 1 || i == 4 || i == 7 || i == 9) {
445451
reloadWorld = true;
446452
} else {
453+
// Every other supplier, including the master switch at the end, rebakes resources.
447454
needsReload = true;
448455
}
449456
}

‎versions/1.8.9/src/main/resources/assets/dolphinclient-oldanimations/lang/en_us.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"dolphinclient-oldanimations": "Old Animations",
2+
"dolphinclient-oldanimations": "1.7 Animations",
33
"blockingItemUsing": "Blocking/Item Using",
44
"sneaking": "Sneaking",
55
"items": "Items",

0 commit comments

Comments
 (0)