09-08-2014, 10:55 PM
I don't think the optimization is needed at all. Mobs' AI will instead limit the calls to pathfinding to once a second for mobs in the player's vicinity and once every few seconds for further mobs. And even when the player moves, the AI will not have to recalculate the path at once, it can postpone until a few moments later; until then the mob can move towards the old position, with the assumption that the player will be somewhere nearby.
The bounding boxes are defined as "entity width" and "entity height" in the source code, each mob constructor should be setting these when calling the parent class constructor.
There is no support for storing arbitrary data for blocks (mostly for memory reasons), but you can of course allocate a buffer of the appropriate size and store the data locally, where needed.
The bounding boxes are defined as "entity width" and "entity height" in the source code, each mob constructor should be setting these when calling the parent class constructor.
There is no support for storing arbitrary data for blocks (mostly for memory reasons), but you can of course allocate a buffer of the appropriate size and store the data locally, where needed.