1.20.4 compatibility

This commit is contained in:
MeexReay 2024-04-22 18:17:31 +03:00
parent c5132221ae
commit 27627e8404
38 changed files with 2790 additions and 31 deletions

View file

@ -0,0 +1,29 @@
package themixray.repeating.mod.event;
public class RecordDelayEvent extends RecordEvent {
public long delay;
public static RecordDelayEvent fromArgs(String[] a) {
return new RecordDelayEvent(Long.parseLong(a[0]));
}
public RecordDelayEvent(long delay) {
this.delay = delay;
}
public void replay() {
try {
Thread.sleep(delay / 20 * 1000);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
public String serialize() {
return "d=" + delay;
}
public String getType() {
return "delay";
}
}