1. Was there need for these exception extensions?
From the documentation: “To ensure that the behaviour will work as you had planned it to work It’s recommended to create your own IllegalArgumentException class. To do this, extend from com.jme3.ai.agents.behaviours.IllegalBehaviour. Furthermore, It will help users to recognise better which is the origin of any problem.”
I wanted to ensure that everything works at it should, per example If you gives distanceToChangeFocus a negative value in the LeaderFollowing behaviour, this will produce strange things to happen and the user will not be able to see what’s wrong. However, If you include a run-time exception, that will tell the user that the parameters that has used for the behavior are illogical and he will fix it properly.
Furthermore, If the user creates a behavior with a null agent (example) instead of get a NullPointerException in the line 123912 he will receive a exception that he forgot to add the proper agent to the behavior that is more informative and appropriate.
2. If needed, what do you think about separate package for these exceptions? I don’t have experience with this kind of exception programming, so I am asking to explain to me, why did you use structure like this.
think that there is no need for that. IllegalBehaviour can only be instanced from extended classes: Nested extended exceptions that are only needed for a specific behavior. There is no need to use these exceptions in other classes.
3. Was the class AbstractSteeringBehaviour useful or not?
Ofcourse, per example SlowBehaviour can extend from AbstractSteeringBehaviour because that behaviour does not need to generate any steer force. (I have found this recently and still does not appear in the release version 3.0.1)
4. Is there possibility to merge AbstractSteeringBehaviour and AbstractStrengthSteeringBehaviour?
Of-course, you can do that. As is explained in the documentation: "CompoundSteeringBehaviour: Contains and merges several AbstractSteeringBehaviour instances". That means that can contain a AbstractSteeringBehaviour or any extended class.
I think it’s very easy to use but maybe it’s only because I’m the developer :facepalm: , Maybe someone can test it and give us more feedback.
Thank you for the feedback !