Started by
LilPerkins
on
Topic category: Help with Minecraft modding (Java Edition)
I am creating a mod with a baseball bat in it, and I would like the baseball bat to be able to hit back the custom projectiles I make. I would like to replace EntityArrow with something that includes custom projectiles. My current code is in the screenshot. The rest of the code is off-screen but isn't necessary either. Any suggestions?
Edited by LilPerkins on Fri, 08/07/2020 - 19:21
I'm not sure how much you can adjust projectile entities once their in motion, I haven't looked into it, but at the very least if you made the projectile a living entity, you could probably just multiply each of the three (x y z) velocities by -1 when it is hit and the baseball bat is in the player's hand, reversing it's direction and speed exactly.
P.S. I can't see the image.
first right click the image an open it in a new tab, btw it wont work with that, I'm pretty sure it not possible with the blocks to redirect the projectile, although you could make it so if the player entity gets hit by it, it will despawn the projectile and, make the player shoot the same projectile, but I have no idea what blocks that would take