Disabled online emotes
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package org.saturnclient.saturnclient;
|
||||
|
||||
import org.saturnclient.saturnclient.config.Property;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
import org.saturnclient.saturnclient.config.ConfigManager;
|
||||
import org.saturnclient.ui2.resources.Textures;
|
||||
|
||||
@@ -13,6 +14,7 @@ public class SaturnClientConfig {
|
||||
public static Property<Boolean> realisticLogo = Property.bool(false);
|
||||
|
||||
public static Property<Boolean> saturnTitleScreen = Property.bool(true);
|
||||
public static Property<Integer> openEmoteWheel = Property.keybinding(GLFW.GLFW_KEY_B);
|
||||
|
||||
public static Identifier getLogo() {
|
||||
return realisticLogo.value ? Textures.REALISTIC_LOGO : Textures.LOGO;
|
||||
@@ -43,5 +45,6 @@ public class SaturnClientConfig {
|
||||
config = new ConfigManager("Saturn Client");
|
||||
config.property("Realistic logo", realisticLogo);
|
||||
config.property("Saturn client title screen", saturnTitleScreen);
|
||||
config.property("Open Emote Wheel", openEmoteWheel);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@ import net.minecraft.client.option.KeyBinding;
|
||||
import net.minecraft.client.util.InputUtil;
|
||||
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.saturnclient.auth.Auth;
|
||||
import org.saturnclient.saturnclient.SaturnClientConfig;
|
||||
// import org.saturnclient.saturnclient.auth.Auth;
|
||||
import org.saturnclient.ui2.screens.EmoteWheel;
|
||||
import org.saturnclient.ui2.screens.ShiftMenu;
|
||||
|
||||
@@ -25,10 +26,6 @@ public class KeyInputHandler {
|
||||
private static final int DEFAULT_MENU_KEY = GLFW.GLFW_KEY_RIGHT_SHIFT;
|
||||
private static KeyBinding mainMenuKeyBinding;
|
||||
|
||||
private static final String FREELOOK_KEY_ID = "key.saturnclient.emote";
|
||||
private static final int FREELOOK_KEY = GLFW.GLFW_KEY_B;
|
||||
private static KeyBinding freelookKeyBinding;
|
||||
|
||||
public static void register() {
|
||||
mainMenuKeyBinding = KeyBindingHelper.registerKeyBinding(new KeyBinding(
|
||||
MAIN_MENU_KEY_ID,
|
||||
@@ -36,19 +33,13 @@ public class KeyInputHandler {
|
||||
DEFAULT_MENU_KEY,
|
||||
KEY_CATEGORY));
|
||||
|
||||
freelookKeyBinding = KeyBindingHelper.registerKeyBinding(new KeyBinding(
|
||||
FREELOOK_KEY_ID,
|
||||
InputUtil.Type.KEYSYM,
|
||||
FREELOOK_KEY,
|
||||
KEY_CATEGORY));
|
||||
|
||||
// Register the event handler for the main menu key
|
||||
ClientTickEvents.END_CLIENT_TICK.register(client -> {
|
||||
if (mainMenuKeyBinding.wasPressed()) {
|
||||
client.setScreen(new ShiftMenu());
|
||||
}
|
||||
|
||||
if (freelookKeyBinding.wasPressed()) {
|
||||
if (SaturnClientConfig.openEmoteWheel.wasKeyPressed()) {
|
||||
client.setScreen(new EmoteWheel());
|
||||
}
|
||||
|
||||
@@ -56,7 +47,7 @@ public class KeyInputHandler {
|
||||
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
animationStack.removeLayer(1000);
|
||||
Auth.cancelEmote();
|
||||
// Auth.cancelEmote();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@ package org.saturnclient.ui2.screens;
|
||||
|
||||
import org.saturnclient.saturnclient.SaturnClient;
|
||||
import org.saturnclient.saturnclient.SaturnClientConfig;
|
||||
import org.saturnclient.saturnclient.auth.Auth;
|
||||
// import org.saturnclient.saturnclient.auth.Auth;
|
||||
import org.saturnclient.saturnclient.cosmetics.Emotes;
|
||||
import org.saturnclient.ui2.SaturnScreen;
|
||||
import org.saturnclient.ui2.Utils;
|
||||
@@ -64,10 +64,10 @@ public class EmoteWheel extends SaturnScreen {
|
||||
AnimationStack animationStack = PlayerAnimationAccess.getPlayerAnimLayer(SaturnClient.client.player);
|
||||
if (animationStack.isActive() && animationStack.getPriority() == 1000) {
|
||||
animationStack.removeLayer(1000);
|
||||
Auth.cancelEmote();
|
||||
// Auth.cancelEmote();
|
||||
}
|
||||
animationStack.addAnimLayer(1000, PlayerAnimationRegistry.getAnimation(Identifier.of("saturnclient", emote)).playAnimation());
|
||||
Auth.sendEmote(emote);
|
||||
// Auth.sendEmote(emote);
|
||||
close();
|
||||
}).dimensions(70, 70).centerOffset(width, height, -80 + (col * 80), -35 + (row * 80)).animation(new Fade(700)));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user