diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index c2701a4..0cd6305 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,7 +4,9 @@
-
+
+
+
@@ -66,30 +68,30 @@
- {
+ "keyToString": {
+ "Gradle.Build EntityLib.executor": "Run",
+ "Gradle.EntityLib:test-plugin [runServer].executor": "Run",
+ "RunOnceActivity.OpenProjectViewOnStart": "true",
+ "RunOnceActivity.ShowReadmeOnStart": "true",
+ "WebServerToolWindowFactoryState": "false",
+ "git-widget-placeholder": "master",
+ "ignore.virus.scanning.warn.message": "true",
+ "jdk.selected.JAVA_MODULE": "corretto-17",
+ "kotlin-language-version-configured": "true",
+ "last_opened_file_path": "D:/Github/EntityLib",
+ "node.js.detected.package.eslint": "true",
+ "node.js.detected.package.tslint": "true",
+ "node.js.selected.package.eslint": "(autodetect)",
+ "node.js.selected.package.tslint": "(autodetect)",
+ "nodejs_package_manager_path": "npm",
+ "project.structure.last.edited": "Modules",
+ "project.structure.proportion": "0.0",
+ "project.structure.side.proportion": "0.0",
+ "settings.editor.selected.configurable": "preferences.pluginManager",
+ "vue.rearranger.settings.migration": "true"
}
-}]]>
+}
@@ -210,6 +212,7 @@
+
diff --git a/src/main/java/me/tofaa/entitylib/entity/WrapperEntity.java b/src/main/java/me/tofaa/entitylib/entity/WrapperEntity.java
index b5f19e2..fe36565 100644
--- a/src/main/java/me/tofaa/entitylib/entity/WrapperEntity.java
+++ b/src/main/java/me/tofaa/entitylib/entity/WrapperEntity.java
@@ -12,19 +12,21 @@ import me.tofaa.entitylib.meta.EntityMeta;
import me.tofaa.entitylib.meta.types.ObjectData;
import org.jetbrains.annotations.NotNull;
import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.CopyOnWriteArraySet;
public class WrapperEntity implements Tickable {
private final EntityType entityType;
private final int entityId;
private final Optional uuid;
private final EntityMeta meta;
- private final Set viewers = new HashSet<>();
+ private final Set viewers = ConcurrentHashMap.newKeySet();
private Location location;
private boolean onGround;
private boolean spawned;
protected Vector3d velocity = Vector3d.zero();
private int riding = -1;
- private Set passengers = new HashSet<>();
+ private Set passengers = ConcurrentHashMap.newKeySet();
public WrapperEntity(int entityId, @NotNull UUID uuid, EntityType entityType, EntityMeta meta) {
this.uuid = Optional.of(uuid);