Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void spawnParticles(LivingEntity entity) {
- Random offset = new Random();
- Vector3d box = entity.getBoundingBox().getCenter();
- Vector3d vec = entity.getLookAngle();
- double x = vec.x;
- double y = vec.y; //set that to zero?
- double z = vec.z;
- double strength = (double)this.getStrength() * 1.5D;
- Vector3d look = new Vector3d(x, y, z);
- //look.y = 0; just gives me an error when trying to use it. Tried writing it multiple other ways, but nothing seems to work
- look.normalize();
- look.scale(strength);
- for (int i = 0; i < 40; ++i) {
- entity.level.addParticle(this.getSlamParticle(), box.x, box.y, box.z, look.x * offset.nextDouble(), 0, look.z * offset.nextDouble());
- ProjectDawn.LOGGER.info(look.x + " " + look.y + " " + look.z);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment