Skip to content

Commit b643df2

Browse files
committed
update config lib, add Snap Perspective option
1 parent f6dde0d commit b643df2

File tree

4 files changed

+14
-6
lines changed

4 files changed

+14
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,8 @@
6868
- add option to hide Beacon Beams
6969
- port to 1.19.3
7070

71+
### 2.2.7
72+
73+
- fix KeyBindOptions not being saved
74+
- since this is a critical fix, this will also be released for 1.19.2
75+
- add 'Snap-Perspective' mode to Freelook

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ org.gradle.jvmargs=-Xmx1G
77
loader_version = 0.14.9
88

99
# Mod Properties
10-
mod_version = 2.2.6+1.8.9
10+
mod_version = 2.2.7+1.8.9
1111
maven_group = io.github.axolotlclient
1212
archives_base_name = AxolotlClient
1313

1414
# Dependencies
1515
fabric_version = 1.8.0+1.8.9
1616

1717
# AxolotlClientConfig
18-
config_version = 1.0.13
18+
config_version = 1.0.14

src/main/java/io/github/axolotlclient/modules/freelook/Freelook.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ public class Freelook extends AbstractModule {
4646

4747
private final OptionCategory category = new OptionCategory("axolotlclient.freelook");
4848
public final BooleanOption enabled = new BooleanOption("axolotlclient.enabled", false);
49+
private final EnumOption mode = new EnumOption("axolotlclient.mode", new String[]{"axolotlclient.snap_perspective", "axolotlclient.freelook"}, "axolotlclient.freelook");
4950
private final EnumOption perspective = new EnumOption("axolotlclient.perspective", Perspective.values(),
5051
Perspective.THIRD_PERSON_BACK.toString());
5152
private final BooleanOption invert = new BooleanOption("axolotlclient.invert", false);
@@ -61,7 +62,7 @@ public static Freelook getInstance() {
6162
@Override
6263
public void init() {
6364
KeyBindingHelper.registerKeyBinding(KEY);
64-
category.add(enabled, perspective, invert, toggle);
65+
category.add(enabled, mode, perspective, invert, toggle);
6566
AxolotlClient.CONFIG.addCategory(category);
6667
}
6768

@@ -113,7 +114,7 @@ private void stop() {
113114
}
114115

115116
public boolean consumeRotation(float dx, float dy) {
116-
if (!active || !enabled.get())
117+
if (!active || !enabled.get() || !mode.get().equals("freelook"))
117118
return false;
118119

119120
if (!invert.get())
@@ -133,14 +134,14 @@ public boolean consumeRotation(float dx, float dy) {
133134
}
134135

135136
public float yaw(float defaultValue) {
136-
if (!active || !enabled.get())
137+
if (!active || !enabled.get() || !mode.get().equals("freelook"))
137138
return defaultValue;
138139

139140
return yaw;
140141
}
141142

142143
public float pitch(float defaultValue) {
143-
if (!active || !enabled.get())
144+
if (!active || !enabled.get() || !mode.get().equals("freelook"))
144145
return defaultValue;
145146

146147
return pitch;

src/main/resources/assets/axolotlclient/lang/en_us.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@
288288
"showName": "Show Server Name",
289289
"off": "Disabled",
290290
"freelook": "Freelook",
291+
"mode": "Mode",
292+
"snap_perspective": "Snap Perspective",
291293
"perspective": "Perspective",
292294
"FIRST_PERSON": "First Person",
293295
"THIRD_PERSON_BACK": "Third Person (Back)",

0 commit comments

Comments
 (0)