We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b06788a commit c9b89eaCopy full SHA for c9b89ea
1 file changed
src/main/java/com/github/elebras1/flecs/ComponentRegistry.java
@@ -61,7 +61,13 @@ protected <T> long register(Class<T> componentClass) {
61
}
62
63
protected <T> long getComponentId(Class<T> componentClass) {
64
- return this.componentIds.get(componentClass);
+ long id = this.componentIds.get(componentClass);
65
+
66
+ if (id == -1) {
67
+ throw new IllegalArgumentException("Component not registered: " + componentClass.getName());
68
+ }
69
70
+ return id;
71
72
73
protected <T> Component<T> getComponent(Class<T> componentClass) {
0 commit comments