/** * Slower retrieval of components from this entity. Minimize usage of this, * but is fine to use e.g. when creating new entities and setting data in * components. Use mappers instead. * * @param <T> * the expected return component type. * @param type * the expected return component type. * @return component that matches, or null if none is found. */ public <T extends Component> T getComponent(Class<T> type) { return componentManager.getComponent(this, type); }