← Data packs

Angles To Projectile Motion (The Lazy Way)

by Aopi · 2025-12-27 · Data packs

Angles To Projectile Motion (The Lazy Way) preview

This small, simple datapack hold the easiest way to detect where you are looking and then shoot an entity in that direction. Prior to previous methods that involve using pos values from an entity at 0, 0, or using teleporting and vectors, this method uses Snowballs to achieve the angle, motion and velocity of the projectile, all in one! Here are all of the steps: 1. Detects a snowball with the specific item component tag("minecraft:custom_data:{projectile:1}") 2. Stores the snowballs motion to storage 3. Removes the snowball 4. Summons whatever entity matches the item component "minecraft:item_name" ("minecraft:custom_name" will override the entity name, keeping it clean) 5.Applies the motion of the snowball to the specific entity To get a projectile item, run the command: /function a2pm:give {id:"the mob id that you want without minecraft"} For example: /function a2pm:give {id:"fireball"} or /function a2pm:give {id:"chicken"} If you want to change the item icon, run the command: /data merge entity @n[​type=item] {Item:{components:{item_model:"item id }}} For example: /data merge entity @n[​type=item] {Item:{components:{item_model:"tnt"}}} or /data merge entity @n[​type=item] {Item

MotionNoresourcepackTool