Started by
Puglord123
on
Topic category: Help with Minecraft modding (Java Edition)
I'm currently working on a Portal mod, and i'm trying to make a sentry turret that just sits in place, doesn't look around and just shoots you. The problem i have is that whenever a turret sees you it turns around to shoot you, is there any way to make it not look at you at all?
Yes, but you'll need to code in custom projectile behavior, since the built in ranged attack system automatically forces mobs to look at their target for aiming purposes. There are code blocks to manage projectiles firing; essentially, you would disable the mob's AI, and instead make an update tick procedure that causes projectiles to fire from the entity if there's a player in a certain radius whose position is in line with its look angle vectors.