From 11b25151f7763f4626e54b90c1bb16183c8fa3f1 Mon Sep 17 00:00:00 2001 From: creeper123123321 Date: Wed, 13 Feb 2019 17:00:01 -0200 Subject: [PATCH] Remove uuid tracking --- .../protocol1_14to1_13_2/storage/EntityTracker.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/storage/EntityTracker.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/storage/EntityTracker.java index aadb38aeb..da3c0e057 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/storage/EntityTracker.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_14to1_13_2/storage/EntityTracker.java @@ -1,9 +1,6 @@ package us.myles.ViaVersion.protocols.protocol1_14to1_13_2.storage; import com.google.common.base.Optional; -import com.google.common.collect.BiMap; -import com.google.common.collect.HashBiMap; -import com.google.common.collect.Maps; import us.myles.ViaVersion.api.data.StoredObject; import us.myles.ViaVersion.api.data.UserConnection; import us.myles.ViaVersion.api.entities.Entity1_14Types; @@ -14,19 +11,16 @@ import java.util.concurrent.ConcurrentHashMap; public class EntityTracker extends StoredObject { private final Map clientEntityTypes = new ConcurrentHashMap<>(); - private final BiMap uuidToId = Maps.synchronizedBiMap(HashBiMap.create()); public EntityTracker(UserConnection user) { super(user); } public void removeEntity(int entityId) { - uuidToId.inverse().remove(entityId); clientEntityTypes.remove(entityId); } public void addEntity(int entityId, UUID uuid, Entity1_14Types.EntityType type) { - uuidToId.forcePut(uuid, entityId); clientEntityTypes.put(entityId, type); } @@ -37,8 +31,4 @@ public class EntityTracker extends StoredObject { public Optional get(int id) { return Optional.fromNullable(clientEntityTypes.get(id)); } - - public Optional getUUID(int id) { - return Optional.fromNullable(uuidToId.inverse().get(id)); - } }