Contents
Class WeakComponentReference<ECS_TYPE, T extends Component<ECS_TYPE>>
java.lang.Object
com.hypixel.hytale.component.WeakComponentReference<ECS_TYPE,T>
- Type Parameters:
ECS_TYPE- The type of ECS this component is part of.T- The type of the component
A weak reference to a component. Similar to
WeakReference however it understands how to get the component from the store.
The WeakComponentReference will be invalidated when the component is removed.
-
Method Details
-
get
Returns the components data either from the weak reference or fetches the data from the component store.- Returns:
- the components data
-
getStore
-
getType
- Returns:
- the component type of the referenced component.
-
getEntityReference
-
equals
-
hashCode
-
toString
-