Started by
Amanikton
on
Topic category: Help with Minecraft modding (Java Edition)
How to create a projectile entity? Or just an entity that does not have AI, it can pass and / or break into blocks, and most importantly, harms creature
Topic category: Help with Minecraft modding (Java Edition)
How to create a projectile entity? Or just an entity that does not have AI, it can pass and / or break into blocks, and most importantly, harms creature
If this is shot from an item, use a ranged item. It will automatically create all the projectile stuff for you.
Otherwise, create a normal entity, and give it no AI.
Add a procedure that spawns it and launches it and one that detects when it collides.
And how do I establish the direction of the entity towards the block, that is, if I want to make an arrow, for example, how do I establish that when it collides with a block this entity is generated in the direction of that block?
I had the same issue what i did is i created a separate folder and every time i wanted a custom projectile i created a "Ranged Item" in that folder and named the "Ranged Item" as (Projectile Name) and then i used the projectile from said "Ranged Item" in to other things since they become an opition when using the "Arrow projectile" piece and as an aditional positive the "Ranged Item" Item can be used as a way to test the projectile.