Fix error

This commit is contained in:
zimzaza4
2025-03-09 02:10:03 +08:00
parent d7fdbc3f77
commit 104aa9e346

View File

@@ -154,6 +154,7 @@ public class EntityTask {
}
public void sendScale(Collection<Player> players, boolean firstSend) {
try {
if (players.isEmpty()) {
return;
}
@@ -167,6 +168,9 @@ public class EntityTask {
EntityUtils.sendCustomScale(player, model.getEntity().getEntityId(), average);
}
lastScale = average;
} catch (Throwable t) {
// ignore
}
}
public void sendColor(Collection<Player> players, boolean firstSend) {
@@ -375,8 +379,12 @@ public class EntityTask {
sendHitBoxToAll();
Runnable asyncTask = () -> {
try {
checkViewers(model.getViewers());
runAsync();
} catch (Throwable t) {
}
};
scheduledFuture = GeyserModelEngine.getInstance().getScheduler().scheduleAtFixedRate(asyncTask, 0, 20, TimeUnit.MILLISECONDS);