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 [2021/09/20 06:27] – Entity#remove() -> kill() and small java 16 changes upcraftlptutorial:projectiles [2022/02/09 20:42] – setVelocity haykam
Line 204: Line 204:
  PackedSnowballEntity snowballEntity = new PackedSnowballEntity(world, user);  PackedSnowballEntity snowballEntity = new PackedSnowballEntity(world, user);
  snowballEntity.setItem(itemStack);  snowballEntity.setItem(itemStack);
- snowballEntity.setProperties(user, user.pitch, user.yaw, 0.0F, 1.5F, 0F);+ snowballEntity.setVelocity(user, user.pitch, user.yaw, 0.0F, 1.5F, 0F);
  world.spawnEntity(snowballEntity); // spawns entity  world.spawnEntity(snowballEntity); // spawns entity
  }  }
tutorial/projectiles.txt · Last modified: 2024/03/08 01:56 by netuserget