Started by
Orandza
on
Topic category: Help with Minecraft modding (Java Edition)
So I have an immovable entity whose only purpose is to shoot down phantoms. It works fine for the most part but I don't know how to make it target phantoms at a longer distance. I set it to watch closest phantom in radius of 100 blocks and shoot it down but it doesn't work. The range is way smaller than that in-game, probably like 10 blocks or something. Any help would be appreciated.
You can just make it shoot projectiles thru a procedure. So remove your "attack" ai task but keep the "watch entity" one. Then make a procedure like the one in this image:
https://imgur.com/A2doehT
You can put a "wait _ ticks on server side" procedure block after the "shoot projectile" block if you want a bit of a delay. (Remember 20 ticks is 1 second).
Hope this helps!
Hmm, it doesn't seem to work. Tried putting this as the procedure for entity update tick, and I also tried using it "on loaded entity update tick" like shown in the image but the entity just doesn't shoot anything. Thing is, I can't find those blocks you used next to the "do" part of the block. Not the shoot from entity block, not the arrow of type block or even the "no entity" block. Searching them up shows no results and I can't find them from any of the menus. All I could do is this, and it doesn't work: https://imgur.com/a/0X2eDXR
Those blocks are new to mcreator. You have to download 2022.2 version. https://mcreator.net/download
Oh. That's weird, whenever I checked for updates inside of MCreator, it would just say it's up-to-date. Well thanks, I'll try it out and report the results!
Okay, your method works, but the entities usually seem to shoot in a totally different direction from where the phantom is. However, it appears that there's a follow range option which wasn't there in the version I had previously and it seems to have solved my problem. The arrows show by the entity are a little inaccurate but it's the best I'll get for now I suppose. Anyways, thanks a bunch.
Your welcome. And maybe if you upped the speed on the projectile procedure block, it'll have a better chance of hitting it?
No, using the procedure doesn't make the entity miss by a little bit, it tends to just rapidly shoot at one spot, often in a completely different direction. The procedure was even set to 0 inaccuracy. I did make a custom projectile with better speed which works okay-ish with the regular attack options for the entity so I'll stick to that for now.
Hello, I saw that this was already solved but I had a simalar problem. I was making a mod with an sniper entity that was supposed to never miss a target and have very high range. I tried using this but the bullets would fly off in a strange direction. I just wanted to post this to help others who had a problem like mine. I ended up making so the sniper just damaged the entity that it was targeting instead of shooting a projectile.
https://imgur.com/a/O6mweVk
The NBT tag that I'm using is just for a delay.
Hello Ozandza! Could you share the mob and its procedure? it just that I was trying to do something very similar to your phantom hunter, a summonable mob that stays in the place and attack players, but can´t come to make it work, not even copying the procedure. Its just a simple mod im doing for a server with friends, so I will apreciate very much if you could help me with that.