Running over NPCs with workcarts or trains

Is it possible to prevent players from running over NPCs with workcarts or trains?
I have tried everything but it didn't work.

hi, this is a bit buggy. use this version.

https://github.com/nivex09/TruePVE

use this entity group:

    {
      "name": "trains",
      "members": "TrainEngine, TrainCar, TrainCarUnloadable, TrainCarUnloadableLoot",
      "exclusions": ""
    }

and add this rule

trains cannot hurt npcs

add more to the trains entity group by using the /tpve_prod command while looking at any entity. i've tested the above and it works fine for me

Thank you, nivex!

I'll try it 😉