Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void performEffect(LivingEntity entity, int amplifier) {
- if (entity.isPotionActive(LifeBindingPotion.LIFE_BINDING_EFFECT.get())) {
- for (LivingEntity livingEntity : entity.world.getEntitiesWithinAABB(LivingEntity.class,
- entity.getBoundingBox().grow(3.0D))) {
- if (livingEntity.isAlive() && livingEntity != entity) {
- if (!(livingEntity instanceof PlayerEntity && ((PlayerEntity) livingEntity).isCreative())) {
- if (livingEntity.isPotionActive(LifeBindingPotion.LIFE_BINDING_EFFECT.get())) {
- livingEntity.removePotionEffect(LifeBindingPotion.LIFE_BINDING_EFFECT.get());
- ((ServerWorld)livingEntity.world).spawnParticle(ParticleTypes.EXPLOSION, livingEntity.getPosX(),
- livingEntity.getPosYHeight(1.0D), livingEntity.getPosZ(), 8, 1.0D, 1.0D, 1.0D, 0.0D);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement