mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-19 14:59:19 +00:00
Fix error
This commit is contained in:
@@ -154,6 +154,7 @@ public class EntityTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void sendScale(Collection<Player> players, boolean firstSend) {
|
public void sendScale(Collection<Player> players, boolean firstSend) {
|
||||||
|
try {
|
||||||
if (players.isEmpty()) {
|
if (players.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -167,6 +168,9 @@ public class EntityTask {
|
|||||||
EntityUtils.sendCustomScale(player, model.getEntity().getEntityId(), average);
|
EntityUtils.sendCustomScale(player, model.getEntity().getEntityId(), average);
|
||||||
}
|
}
|
||||||
lastScale = average;
|
lastScale = average;
|
||||||
|
} catch (Throwable t) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendColor(Collection<Player> players, boolean firstSend) {
|
public void sendColor(Collection<Player> players, boolean firstSend) {
|
||||||
@@ -375,8 +379,12 @@ public class EntityTask {
|
|||||||
sendHitBoxToAll();
|
sendHitBoxToAll();
|
||||||
|
|
||||||
Runnable asyncTask = () -> {
|
Runnable asyncTask = () -> {
|
||||||
|
try {
|
||||||
checkViewers(model.getViewers());
|
checkViewers(model.getViewers());
|
||||||
runAsync();
|
runAsync();
|
||||||
|
} catch (Throwable t) {
|
||||||
|
|
||||||
|
}
|
||||||
};
|
};
|
||||||
scheduledFuture = GeyserModelEngine.getInstance().getScheduler().scheduleAtFixedRate(asyncTask, 0, 20, TimeUnit.MILLISECONDS);
|
scheduledFuture = GeyserModelEngine.getInstance().getScheduler().scheduleAtFixedRate(asyncTask, 0, 20, TimeUnit.MILLISECONDS);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user