mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-21 07:49:26 +00:00
1.21.8 support
This commit is contained in:
@@ -41,24 +41,16 @@ public class EntityTaskRunnable {
|
||||
|
||||
private final BooleanPacker booleanPacker = new BooleanPacker();
|
||||
|
||||
private ScheduledFuture scheduledFuture;
|
||||
private final ScheduledFuture scheduledFuture;
|
||||
|
||||
public EntityTaskRunnable(GeyserModelEngine plugin, ModelEntityData model) {
|
||||
this.plugin = plugin;
|
||||
|
||||
this.model = model;
|
||||
}
|
||||
|
||||
public void run() {
|
||||
plugin.getEntityTaskManager().sendHitBoxToAll(model);
|
||||
|
||||
Runnable asyncTask = () -> {
|
||||
try {
|
||||
runAsync();
|
||||
} catch (Throwable ignored) {}
|
||||
};
|
||||
|
||||
scheduledFuture = plugin.getSchedulerPool().scheduleAtFixedRate(asyncTask, 0, 20, TimeUnit.MILLISECONDS);
|
||||
scheduledFuture = plugin.getSchedulerPool().scheduleAtFixedRate(this::runAsync, 0, 20, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
public void runAsync() {
|
||||
|
||||
Reference in New Issue
Block a user