Open Xenmai opened 6 years ago
So do some tasks not have types?
If I remember my prior testing correctly, Sponge.getRegistry.getAllOf(AITaskType.class)
returns all of them, but if you try to Sponge.getRegistry.getType(AITaskType.class, string)
one of them, it only works with the ones listed in the API. Not sure if that makes sense. I can test again later today just to make sure.
GetbyId and getAll use the same dataset. See https://github.com/SpongePowered/SpongeCommon/blob/bleeding/src/main/java/org/spongepowered/common/registry/type/entity/AITaskTypeModule.java
You are right, my bad. Two task types are missing from the catalog though: LookIdleAITask and RangeAgentAITask.
Hi there, I'm using spongevanilla-1.12.2-7.1.0-BETA-48.jar and I've encountered some problems when using AI Tasks. The main issues are related to Goal methods throwing exceptions.
Goal#getTasksByType(AITaskType type)
andGoal#removeTasks(AITaskType type)
are the specific methods in this case. Here is a gist of the exception thrown by the former when givenAITaskTypes.WANDER
as an argument: https://gist.github.com/Xenmai/e84d41388f7e8bcbdb5ea33bbf7db33e I can test the other method again and paste its exception as well if needed, just let me know.Note: I've also seen the API is lacking some AI Task Types in its catalog. There are actually more types of working AI Tasks than it's shown here: https://jd.spongepowered.org/7.1.0-SNAPSHOT/org/spongepowered/api/entity/ai/task/AITaskTypes.html Should I create an API issue for that?
Thanks a lot for your time.