Contents
Class EntityTrackerSystems.EntityViewer
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.tracker.EntityTrackerSystems.EntityViewer
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
- Enclosing class:
EntityTrackerSystems
public static class EntityTrackerSystems.EntityViewer
extends Object
implements Component<EntityStore>
An entity viewer is a core part of the entity tracker and is what allows things to 'see' other entities.
The most common form of entity viewer is a player.
-
Field Summary
FieldsModifier and TypeFieldDescriptionintMetrics for how many entities got excluded because they aren't visible to the viewer (eg.intMetrics for how many entities got excluded because of LOD.A consumer to take the packets generated by the entity tracker.it.unimi.dsi.fastutil.objects.Reference2IntMap<Ref<EntityStore>> The entities that have been sent to this viewer mapped to their network id.The entity updates for a sub-set of visible entities.intThe radius that this entity viewer can see in blocks.The entities that this entity viewer can currently see.Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()voidqueueRemove(Ref<EntityStore> ref, ComponentUpdateType type) Queues the removal of a component on an entity this viewer can see.voidqueueUpdate(Ref<EntityStore> ref, ComponentUpdate update) Queues a component update of a component on an entity for this viewer to see.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Field Details
-
viewRadiusBlocks
public int viewRadiusBlocksThe radius that this entity viewer can see in blocks. -
packetReceiver
A consumer to take the packets generated by the entity tracker. -
visible
The entities that this entity viewer can currently see. -
updates
The entity updates for a sub-set of visible entities. -
sent
The entities that have been sent to this viewer mapped to their network id. -
lodExcludedCount
public int lodExcludedCountMetrics for how many entities got excluded because of LOD.
-
-
Constructor Details
-
EntityViewer
-
EntityViewer
-
-
Method Details
-
getComponentType
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-
queueRemove
Queues the removal of a component on an entity this viewer can see.- Parameters:
ref- the visible entitytype- the component to remove
-
queueUpdate
Queues a component update of a component on an entity for this viewer to see.- Parameters:
ref- the visible entityupdate- the component to update
-