Advertisement
Guest User

Untitled

a guest
Aug 25th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.67 KB | None | 0 0
  1. private void startItemAnimation(Location location, String crates) {
  2.         Location loc = getLocationAroundCircle(location, 0.47f, 2.5f);
  3.         // example armor stand
  4.         ArmorStand loot = loc.getWorld().spawn(loc.add(0, 2, 0), ArmorStand.class);
  5.         loot.setGravity(false);
  6.         loot.setVisible(false);
  7.         loot.setItemInHand(getRandomCrateItem(crates));
  8.         loot.setRightArmPose(new EulerAngle(-1.75, -0.69, 0));
  9.  
  10.         new Ascend(loot,2L, 10L); // make item float up
  11.         new AroundAxisRotation(loot, location.add(0, 1.75, 0), 0.47f, 2.3f, 10L, 240L); // start item spinning
  12.         playAnimationSounds(location); // play animation sounds
  13.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement