diff --git a/src/main/java/de/scribble/lp/tasmod/inputcontainer/InputContainer.java b/src/main/java/de/scribble/lp/tasmod/inputcontainer/InputContainer.java index 0c6a5d45..af989cbd 100644 --- a/src/main/java/de/scribble/lp/tasmod/inputcontainer/InputContainer.java +++ b/src/main/java/de/scribble/lp/tasmod/inputcontainer/InputContainer.java @@ -68,7 +68,7 @@ public class InputContainer { private BigArrayList inputs = new BigArrayList(directory + File.separator + "temp"); public DesyncMonitoring dMonitor = new DesyncMonitoring(); - + // ===================================================================================================== private String authors = "Insert author here"; @@ -123,6 +123,7 @@ public String setTASState(TASstate stateIn, boolean verbose) { return verbose ? TextFormatting.RED + "An error occured while reading the start location of the TAS. The file might be broken" : ""; } } + Minecraft.getMinecraft().gameSettings.chatLinks = false; // #119 index = 0; state = TASstate.PLAYBACK; return verbose ? TextFormatting.GREEN + "Starting playback" : ""; @@ -177,76 +178,6 @@ public TASstate getState() { return state; } - @Deprecated - public String setRecording(boolean enabled) { - return setRecording(enabled, true); - } - - /** - * Starts/Stops a recording - * - * @param enabled If true: starts a recording, else stops a running recording - * @return Chat message depending on the state - */ - @Deprecated - public String setRecording(boolean enabled, boolean verbose) { - if (state == TASstate.PLAYBACK) { - return verbose ? TextFormatting.RED + "A playback is already running" : ""; - } - if (enabled) { - state = TASstate.RECORDING; - } else { - state = TASstate.NONE; - } - - if (state == TASstate.RECORDING) { - if (Minecraft.getMinecraft().player != null) { - startLocation = getStartLocation(Minecraft.getMinecraft().player); // TODO #99 Make this a secondary command - } - return verbose ? TextFormatting.GREEN + "Starting the recording" : ""; - } else if (state == TASstate.NONE) { - return verbose ? TextFormatting.GREEN + "Stopping the recording" : ""; - } - return ""; - } - - @Deprecated - public String setPlayback(boolean enabled) { - return setPlayback(enabled, true); - } - - /** - * Starts/Stops a playback - * - * @param enabled If true: start a playback, else aborts a running playback - * @return Chat message depending on the state - */ - @Deprecated - public String setPlayback(boolean enabled, boolean verbose) { - if (state == TASstate.RECORDING) - return verbose ? TextFormatting.RED + "A recording is already running" : ""; - if (enabled) { - state = TASstate.PLAYBACK; - } else { - state = TASstate.NONE; - } - if (state == TASstate.PLAYBACK) { - if (Minecraft.getMinecraft().player != null && !startLocation.isEmpty()) { - try { - tpPlayer(startLocation); - } catch (NumberFormatException e) { - state = TASstate.NONE; - e.printStackTrace(); - return verbose ? TextFormatting.RED + "An error occured while reading the start location of the TAS. The file might be broken" : ""; - } - } - index = 0; - return verbose ? TextFormatting.GREEN + "Starting playback" : ""; - } else { - return verbose ? TextFormatting.GREEN + "Aborting playback" : ""; - } - } - // ===================================================================================================== // Methods to update the temporary variables of the container. // These act as an input and output, depending if a recording or a playback is diff --git a/src/main/java/de/scribble/lp/tasmod/virtual/VirtualMouse.java b/src/main/java/de/scribble/lp/tasmod/virtual/VirtualMouse.java index 2abaef03..f284c242 100644 --- a/src/main/java/de/scribble/lp/tasmod/virtual/VirtualMouse.java +++ b/src/main/java/de/scribble/lp/tasmod/virtual/VirtualMouse.java @@ -54,19 +54,19 @@ public VirtualMouse() { keyList.put(-100, new VirtualKey("LC", -100)); keyList.put(-99, new VirtualKey("RC", -99)); keyList.put(-98, new VirtualKey("MC", -98)); - keyList.put(-97, new VirtualKey("MBUTTON3", -97)); - keyList.put(-96, new VirtualKey("MBUTTON4", -96)); - keyList.put(-95, new VirtualKey("MBUTTON5", -95)); - keyList.put(-94, new VirtualKey("MBUTTON6", -94)); - keyList.put(-93, new VirtualKey("MBUTTON7", -93)); - keyList.put(-92, new VirtualKey("MBUTTON8", -92)); - keyList.put(-91, new VirtualKey("MBUTTON9", -91)); - keyList.put(-90, new VirtualKey("MBUTTON10", -90)); - keyList.put(-89, new VirtualKey("MBUTTON11", -89)); - keyList.put(-88, new VirtualKey("MBUTTON12", -88)); - keyList.put(-87, new VirtualKey("MBUTTON13", -87)); - keyList.put(-86, new VirtualKey("MBUTTON14", -86)); - keyList.put(-85, new VirtualKey("MBUTTON15", -85)); + keyList.put(-97, new VirtualKey("MBUTTON4", -97)); + keyList.put(-96, new VirtualKey("MBUTTON5", -96)); + keyList.put(-95, new VirtualKey("MBUTTON6", -95)); + keyList.put(-94, new VirtualKey("MBUTTON7", -94)); + keyList.put(-93, new VirtualKey("MBUTTON8", -93)); + keyList.put(-92, new VirtualKey("MBUTTON9", -92)); + keyList.put(-91, new VirtualKey("MBUTTON10", -91)); + keyList.put(-90, new VirtualKey("MBUTTON11", -90)); + keyList.put(-89, new VirtualKey("MBUTTON12", -89)); + keyList.put(-88, new VirtualKey("MBUTTON13", -88)); + keyList.put(-87, new VirtualKey("MBUTTON14", -87)); + keyList.put(-86, new VirtualKey("MBUTTON15", -86)); + keyList.put(-85, new VirtualKey("MBUTTON16", -85)); this.scrollwheel = 0;