Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected final Random rand = new Random();
- @SubscribeEvent
- public void onPlayerConsumePotion(PlayerEvent event) {
- PlayerEntity player = event.getPlayer();
- if (player.isPotionActive(LifeBindingPotion.LIFE_BINDING_EFFECT.get())) {
- if (player.getServer() != null) {
- player.world.getClosestPlayer(player, 3.0D); {
- player.removePotionEffect(LifeBindingPotion.LIFE_BINDING_EFFECT.get());
- player.world.addParticle(ParticleTypes.SMOKE, player.getPosX() + this.rand.nextDouble() / 2.0D,
- player.getPosYHeight(0.5D), player.getPosZ() + this.rand.nextDouble() / 2.0D, 0.0D, this.rand.nextDouble() / 5.0D,
- 0.0D);
- player.world.addParticle(ParticleTypes.EXPLOSION, player.getPosX() + this.rand.nextDouble() / 2.0D,
- player.getPosYHeight(1.0D), player.getPosZ() + this.rand.nextDouble() / 2.0D, 0.0D, this.rand.nextDouble() / 5.0D,
- 0.0D);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement