mirror of
https://github.com/xSquishyLiam/mc-GeyserModelEngine-plugin.git
synced 2025-12-19 14:59:19 +00:00
removed a debugger i had
This commit is contained in:
@@ -6,9 +6,10 @@ import re.imc.geysermodelengine.managers.model.entity.EntityData;
|
||||
import re.imc.geysermodelengine.managers.model.model.Model;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
public class UpdateTaskRunnable implements Consumer<ScheduledTask> {
|
||||
public class UpdateTaskRunnable implements Runnable {
|
||||
|
||||
private final GeyserModelEngine plugin;
|
||||
|
||||
@@ -17,10 +18,16 @@ public class UpdateTaskRunnable implements Consumer<ScheduledTask> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void accept(ScheduledTask scheduledTask) {
|
||||
public void run() {
|
||||
ConcurrentHashMap<Integer, Map<Model, EntityData>> entitiesCache = plugin.getModelManager().getEntitiesCache();
|
||||
if (entitiesCache.isEmpty()) return;
|
||||
|
||||
try {
|
||||
for (Map<Model, EntityData> models : plugin.getModelManager().getEntitiesCache().values()) {
|
||||
models.values().forEach(entityData -> plugin.getEntityTaskManager().getPropertyHandler().updateEntityProperties(entityData, entityData.getViewers(), false));
|
||||
for (Map<Model, EntityData> models : entitiesCache.values()) {
|
||||
models.values().forEach(entityData -> {
|
||||
if (entityData.getViewers().isEmpty()) return;
|
||||
plugin.getEntityTaskManager().getPropertyHandler().updateEntityProperties(entityData, entityData.getViewers(), false);
|
||||
});
|
||||
}
|
||||
} catch (Throwable err) {
|
||||
throw new RuntimeException(err);
|
||||
|
||||
Reference in New Issue
Block a user