You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Moved the logic to stop people from deleting/overwriting savestate 0 from the SavestateHandler to the savestate command
-Modifying the savestate/loadstate packet, so you can save and load at a custom index with that packet
sender.sendMessage(newTextComponentString("/savestate save - Make a savestate at the next index"));
43
-
sender.sendMessage(newTextComponentString("/savestate save <index> - Make a savestate at the specified index"));
44
-
sender.sendMessage(newTextComponentString("/savestate load - Load the savestate at the current index"));
45
-
sender.sendMessage(newTextComponentString("/savestate load <index> - Load the savestate at the specified index"));
46
-
sender.sendMessage(newTextComponentString("/savestate delete <index> - Delete the savestate at the specified index"));
47
-
sender.sendMessage(newTextComponentString("/savestate delete <from> <to> - Delete the savestates from the first to the second index"));
48
-
sender.sendMessage(newTextComponentString(""));
49
-
sender.sendMessage(newTextComponentString("Instead of <index> you can use ~ to specify an index relative to the current one e.g. ~-1 will load " + (currentIndex - 1)));
sender.sendMessage(newTextComponentString(String.format("The current savestate index is %s%s", ChatFormatting.AQUA, TASmod.savestateHandler.getCurrentIndex())));
81
+
sender.sendMessage(newTextComponentString(String.format("Available indexes are %s%s", ChatFormatting.AQUA, TASmod.savestateHandler.getIndexesAsString())));
82
+
} elseif ("help".equals(args[0])) {
83
+
if (args.length == 1) {
84
+
sendHelp(sender);
85
+
} elseif (args.length == 2) {
86
+
inti = 1;
87
+
try {
88
+
i = Integer.parseInt(args[1]);
89
+
} catch (NumberFormatExceptione) {
90
+
thrownewCommandException("Page number was not a number %s", newObject[] { args[1] });
91
+
}
92
+
sendHelp(sender, i);
93
+
} else {
94
+
thrownewCommandException("Too many arguments", newObject[] {});
thrownewCommandException("This help page doesn't exist (yet?)", newObject[] {});
109
+
}
110
+
if(i==1) {
111
+
sender.sendMessage(newTextComponentString(ChatFormatting.GOLD+"-------------------Savestate Help 1--------------------\n"+ChatFormatting.RESET
112
+
+ "Makes a backup of the minecraft world you are currently playing.\n\n"
113
+
+ "The mod will keep track of the number of savestates you made in the 'current index' number which is currently "+ChatFormatting.AQUA+currentIndex+ChatFormatting.RESET
114
+
+ String.format(". If you make a new savestate via %s/savestate save%s or by pressing %sJ%s by default, ", ChatFormatting.AQUA, ChatFormatting.RESET, ChatFormatting.AQUA, ChatFormatting.RESET)
115
+
+ "the current index will increase by one. "
116
+
+ String.format("If you load a savestate with %s/savestate load%s or %sK%s by default, it will load the savestate at the current index.\n", ChatFormatting.AQUA, ChatFormatting.RESET, ChatFormatting.AQUA, ChatFormatting.RESET)));
117
+
}elseif(i==2) {
118
+
sender.sendMessage(newTextComponentString(String.format("%1$s-------------------Savestate Help 2--------------------\n"
119
+
+ "You can load or save savestates in different indexes by specifying the index: %3$s/savestate %4$s<save|load> %5$s<index>%2$s\n"
120
+
+ "This will change the %5$scurrent index%2$s to the index you specified.\n\n"
121
+
+ "So, if you have the savestates %3$s1, 2, 3%2$s and your %5$scurrent index%2$s is %3$s3%2$s, %3$s/savestate %4$sload %5$s2%2$s will load the second savestate and will set the %5$scurrent index%2$s to %3$s2%2$s.\n"
122
+
+ "But if you savestate again you will OVERWRITE the third savestate, so keep that in mind!!\n\n"
123
+
+ "The savestate at index 0 will be the savestate when you started the TAS recording and can't be deleted or overwritten with this command"
0 commit comments