1
mirror of https://github.com/StarWishsama/Slimefun4.git synced 2024-09-20 03:35:51 +00:00

Update RitualAnimation.java

This commit is contained in:
Ajptlink 2018-07-09 16:41:22 +02:00 committed by GitHub
parent 2a492ffbf9
commit 391845fe86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -93,24 +93,29 @@ public class RitualAnimation implements Runnable {
private void abort() {
running = false;
// for (ItemStack stack: items) {
// l.getWorld().dropItemNaturally(l, stack);
// }
l.getWorld().playSound(l, Sound.BLOCK_NOTE_SNARE, 5F, 1F);
pedestals.forEach((pblock)->{
Variables.altarinuse.remove(pblock.getLocation());
});
Variables.altarinuse.remove(altar.getLocation()); // should re-enable altar blocks on craft failure.
l.getWorld().playSound(l, Sound.ENTITY_ZOMBIE_ATTACK_IRON_DOOR, 5F, 1F);
altars.remove(altar);
}
private void finish() {
l.getWorld().playSound(l, Sound.ENTITY_ZOMBIE_VILLAGER_CURE, 1F, 1F);
l.getWorld().playEffect(l, Effect.STEP_SOUND, Material.EMERALD_BLOCK);
l.getWorld().dropItemNaturally(l.add(0, 1, 0), output);
pedestals.forEach((pblock)->{
Variables.altarinuse.remove(pblock.getLocation());
});
Variables.altarinuse.remove(altar.getLocation()); // should re-enable altar blocks on craft completion.
altars.remove(altar);
if (running == true) {
l.getWorld().playSound(l, Sound.ENTITY_ZOMBIE_VILLAGER_CURE, 1F, 1F);
l.getWorld().playEffect(l, Effect.STEP_SOUND, Material.EMERALD_BLOCK);
l.getWorld().dropItemNaturally(l.add(0, 1, 0), output);
pedestals.forEach((pblock)->{
Variables.altarinuse.remove(pblock.getLocation());
});
Variables.altarinuse.remove(altar.getLocation()); // should re-enable altar blocks on craft completion.
altars.remove(altar);
}
else {
l.getWorld().playSound(l, Sound.ENTITY_ZOMBIE_BREAK_DOOR_WOOD, 1F, 1F);
}
}
}