You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forge adds IForgeBlockgetBlockPathType method to allow mods to have their block change their pathfinding type based on conditions when a mob attempts to pathfind through it. One extremely useful use case is a block that lets certain entities pathfind through but not others.
The issue is in the static WalkNodeEvaluator$getBlockPathTypeRaw method where Forge patched in the Forge method, null is passed in for the mob. Rendering the mob parameter completely useless.
To fix this will require a breaking change that could be potentially affects quite a number of mods calling getBlockPathTypeRaw. It is a tricky spot. But as of right now, there's no way for a mod to be able to block the pathfinding of certain mobs through their block and allow other mobs which seems to be one of the main points of this Forge method and probably should be restored before the Recommended Build is created. Or overload methods could be made instead and deprecate vanilla methods (suggested by someone)
———
My use case was a curtain non-solid block that would prevent certain tagged mobs (not all) from walking or flying through it while allowing players and none-tagged mobs to pass through/pathfind through. Of course just blocking movement by EntityInside Block method, the mob will still try to pathfind through the block. So I was trying to find a way to make the walkNodeEvaluator not try to pathfind through my block if it is the specific tagged mob I don't want passing through. The static stuff stopped me and the Forge hook wasn't working.
Though my main case was stopping bees and other flying insects which I am able to handle and got working. Blocking walk pathfinding would have be a nice thing to have if users tagged walking mobs to not pass through my block.
The text was updated successfully, but these errors were encountered:
Revival of MinecraftForge/MinecraftForge#9283
———
Forge adds IForgeBlockgetBlockPathType method to allow mods to have their block change their pathfinding type based on conditions when a mob attempts to pathfind through it. One extremely useful use case is a block that lets certain entities pathfind through but not others.
The issue is in the static WalkNodeEvaluator$getBlockPathTypeRaw method where Forge patched in the Forge method, null is passed in for the mob. Rendering the mob parameter completely useless.
To fix this will require a breaking change that could be potentially affects quite a number of mods calling getBlockPathTypeRaw. It is a tricky spot. But as of right now, there's no way for a mod to be able to block the pathfinding of certain mobs through their block and allow other mobs which seems to be one of the main points of this Forge method and probably should be restored before the Recommended Build is created. Or overload methods could be made instead and deprecate vanilla methods (suggested by someone)
———
My use case was a curtain non-solid block that would prevent certain tagged mobs (not all) from walking or flying through it while allowing players and none-tagged mobs to pass through/pathfind through. Of course just blocking movement by EntityInside Block method, the mob will still try to pathfind through the block. So I was trying to find a way to make the walkNodeEvaluator not try to pathfind through my block if it is the specific tagged mob I don't want passing through. The static stuff stopped me and the Forge hook wasn't working.
Though my main case was stopping bees and other flying insects which I am able to handle and got working. Blocking walk pathfinding would have be a nice thing to have if users tagged walking mobs to not pass through my block.
The text was updated successfully, but these errors were encountered: