Advertisement
JackOUT

Untitled

Mar 1st, 2022
864
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1.         final Consumer<ArmorStand> consumer = armorStand -> {
  2.             armorStand.setVisible(true);
  3.             armorStand.setSmall(true);
  4.             armorStand.setArms(true);
  5.             CompProperty.GRAVITY.apply(armorStand, false);
  6.             armorStand.setMarker(false);
  7.             armorStand.setItemInHand(itemStack);
  8.         };
  9.  
  10.         final Location standLocation = stand.getLocation();
  11.  
  12.         new BukkitRunnable() {
  13.  
  14.             @Override
  15.             public void run() {
  16.                 final EulerAngle rotation = stand.getRightArmPose().add(20, 0, 0);
  17.  
  18.                 stand.setRightArmPose(rotation);       
  19.                 vector.add(new Vector(0, descendSpeed, 0));
  20.                 stand.teleport(standLocation.add(vector.normalize()));
  21.  
  22.                 final Location armTipLocation = ArmourStandUtil.getSmallArmTip(stand);
  23.                 Common.runTimer(20, () -> CompParticle.VILLAGER_HAPPY.spawn(armTipLocation));
  24.             }
  25.         }.runTaskTimer(SimplePlugin.getInstance(), 0, 10);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement