1.20.4 compatibility
This commit is contained in:
parent
c5132221ae
commit
27627e8404
38 changed files with 2790 additions and 31 deletions
28
remappedSrc/themixray/repeating/mod/event/RecordEvent.java
Normal file
28
remappedSrc/themixray/repeating/mod/event/RecordEvent.java
Normal file
|
@ -0,0 +1,28 @@
|
|||
package themixray.repeating.mod.event;
|
||||
|
||||
public abstract class RecordEvent {
|
||||
public abstract void replay();
|
||||
public abstract String serialize();
|
||||
public abstract String getType();
|
||||
|
||||
public static RecordEvent deserialize(String t) {
|
||||
try {
|
||||
String type = String.valueOf(t.charAt(0));
|
||||
String[] args = t.substring(2).split("&");
|
||||
if (type.equals("d")) {
|
||||
return RecordDelayEvent.fromArgs(args);
|
||||
} else if (type.equals("m")) {
|
||||
return RecordMoveEvent.fromArgs(args);
|
||||
} else if (type.equals("p")) {
|
||||
return RecordInputEvent.fromArgs(args);
|
||||
} else if (type.equals("b")) {
|
||||
return RecordBlockBreakEvent.fromArgs(args);
|
||||
} else if (type.equals("i")) {
|
||||
return RecordBlockInteractEvent.fromArgs(args);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue