Started by
JustHaven
on
Topic category: Help with Minecraft modding (Java Edition)
When trying to make a gun mod I noticed that, in survival, the projectile sometimes kills the player that shot it which is undesirable. How I have it wired up is the projectile itself does no damage but instead asks a procedure if it hit a player to do an instant damage effect so I can have a custom death message. Hopefully, with this script, I can simultaneously do a check where if the target entity = entity that used the weapon it won't do damage, else it will. Any way to achieve this?
Run an if then else statement that checks if the target entity = source entity.
Basically, when dealing with projectiles source entity=whatever fired it, the immediate source entity=the projectile itself, and the target entity is what is being hit. Hope this helps!