Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void startItemAnimation(Location location, String crates) {
- Location loc = getLocationAroundCircle(location, 0.47f, 2.5f);
- // example armor stand
- ArmorStand loot = loc.getWorld().spawn(loc.add(0, 2, 0), ArmorStand.class);
- loot.setGravity(false);
- loot.setVisible(false);
- loot.setItemInHand(getRandomCrateItem(crates));
- loot.setRightArmPose(new EulerAngle(-1.75, -0.69, 0));
- new Ascend(loot,2L, 10L); // make item float up
- new AroundAxisRotation(loot, location.add(0, 1.75, 0), 0.47f, 2.3f, 10L, 240L); // start item spinning
- playAnimationSounds(location); // play animation sounds
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement