09-08-2014, 04:37 AM
(This post was last modified: 09-08-2014, 05:13 AM by LogicParrot.)
(09-08-2014, 04:09 AM)xoft Wrote: Ghasts in vanilla do not actively pursue the player, so they don't need real pathfinding. Blazes do not pursue the player either, they just fly up / down. Bats fly around randomly, also don't need a pathfinding for that. I guess we can do without the flying mobs for now.I will implement flight anyways, it's just a couple of lines less than the ground thing.
(09-08-2014, 04:09 AM)xoft Wrote: Consider a door for a moment. Is it a passable block or not? It depends on the surroundings; you cannot even do with a "closed" / "open" states because the door can be closed and yet be passable because it is lined up to a wall differently. Also it only leaves a ~0.8m wide corridor, so it is passable only for mobs narrower than 0.8m.
As another example, the ladder block cuts away a 1/16th of the block, so an entity that is 1 block wide can't pass in 1-block-wide corridor lined with ladders on the sides. Similarly with carpets and entity height, and halfslabs, more noticeably.
Fair enough. I will just replace is_solid with is_traversable(x,y,z,mob_width,mod_height,mob_length), which is a function which returns false if the mob can't possibly be standing at that particular spot. (Due to a solid block, a bounding box, etc).
Edit: This seems to be a bit more involved than that