Should I even clean this up...

This commit is contained in:
TheLividaProject
2025-05-27 01:26:15 +01:00
parent 0bbd346566
commit 1ac7beec4c
3 changed files with 16 additions and 97 deletions

View File

@@ -123,17 +123,15 @@ public final class GeyserModelEngine extends JavaPlugin {
enablePartVisibilityModels.addAll(getConfig().getStringList("enable-part-visibility-models"));
instance = this;
if (updateTask != null) {
updateTask.cancel(true);
}
if (updateTask != null) updateTask.cancel(true);
updateTask = scheduler.scheduleWithFixedDelay(() -> {
try {
for (Map<ActiveModel, ModelEntity> models : ModelEntity.ENTITIES.values()) {
models.values().forEach(model -> model.getTask().updateEntityProperties(model.getViewers(), false));
}
} catch (Throwable t) {
t.printStackTrace();
} catch (Throwable err) {
throw new RuntimeException(err);
}
}, 10, entityPositionUpdatePeriod, TimeUnit.MILLISECONDS);
}