1.20.4 compatibility
This commit is contained in:
parent
c5132221ae
commit
27627e8404
38 changed files with 2790 additions and 31 deletions
|
@ -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";
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue