User Tools

Site Tools


tutorial:projectiles

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
tutorial:projectiles [2022/02/09 20:42] – setVelocity haykamtutorial:projectiles [2022/02/10 14:56] – [Creating a Projectile Item] tianjun
Line 205: Line 205:
  snowballEntity.setItem(itemStack);  snowballEntity.setItem(itemStack);
  snowballEntity.setVelocity(user, user.pitch, user.yaw, 0.0F, 1.5F, 0F);  snowballEntity.setVelocity(user, user.pitch, user.yaw, 0.0F, 1.5F, 0F);
 +                        /*
 +                        snowballEntity.setProperties(user, user.getPitch(), user.getYaw(), 0.0F, 1.5F, 1.0F);
 +                        In 1.17,we will use setProperties instead of setVelocity.                                                        
 +                        */
  world.spawnEntity(snowballEntity); // spawns entity  world.spawnEntity(snowballEntity); // spawns entity
  }  }
tutorial/projectiles.txt · Last modified: 2024/03/08 01:56 by netuserget