Darkhax-Minecraft / Dark-Utilities

Expansive content mod which adds a little bit of everything.
https://minecraft.curseforge.com/projects/dark-utilities
GNU Lesser General Public License v2.1
46 stars 30 forks source link

[Suggestion] Allow mobs to pathfind through compatible mob filters #289

Closed Happyfrozenfire closed 1 year ago

Happyfrozenfire commented 1 year ago

Minecraft 1.19.2, Fabric 0.14.12, DarkUtils 13.1.2 If mobs could go through mob filters without being pushed through, that'd be extremely convenient for a turtle sanctuary I'd like to make. Upon testing it with a zombie, hostile mob filter, and villager, however, it would appear mobs don't pathfind through mob filters.

Darkhax commented 1 year ago

Hello, and thanks for the suggestion. After looking into this issue for a while I don't believe it's realistic to add this feature. The main issue is that Minecraft's pathfinding logic is very hardcoded and does not provide much room for context or nuance. For example a block can not tell what type of mob is trying to pathfind through it. Another issue is that there is no distinction between floors and walls, meaning if I allow mobs to pathfind through the blocks they would no longer be able to pathfind over them which is important functionality in many designs currently using the filters. Additionally I don't think this feature makes sense within the context of the game as the zombie or turtle would just see a large wooden wall, they do not know they can pass through it and would not be able to see targets behind the filters. This is why they will happily try to walk over a filter and fall through it which is the current functionality.